utility 564 B

12345678910111213141516171819202122232425262728293031
  1. // -*-c++-*-
  2. // vim: set ft=cpp:
  3. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  4. file LICENSE.rst or https://cmake.org/licensing for details. */
  5. #pragma once
  6. #if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
  7. # define CMake_HAVE_CXX_IN_PLACE
  8. #endif
  9. #include <utility> // IWYU pragma: export
  10. namespace cm {
  11. #if defined(CMake_HAVE_CXX_IN_PLACE)
  12. using std::in_place_t;
  13. using std::in_place;
  14. #else
  15. struct in_place_t
  16. {
  17. explicit in_place_t() = default;
  18. };
  19. constexpr in_place_t in_place{};
  20. #endif
  21. }