summaryrefslogtreecommitdiff
path: root/Utilities/std/cm/utility
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/std/cm/utility')
-rw-r--r--Utilities/std/cm/utility34
1 files changed, 34 insertions, 0 deletions
diff --git a/Utilities/std/cm/utility b/Utilities/std/cm/utility
new file mode 100644
index 000000000..3acac4f69
--- /dev/null
+++ b/Utilities/std/cm/utility
@@ -0,0 +1,34 @@
+// -*-c++-*-
+// vim: set ft=cpp:
+
+/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+ file Copyright.txt or https://cmake.org/licensing for details. */
+#ifndef cm_utility
+#define cm_utility
+
+#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
+# define CMake_HAVE_CXX_IN_PLACE
+#endif
+
+#include <utility> // IWYU pragma: export
+
+namespace cm {
+
+#if defined(CMake_HAVE_CXX_IN_PLACE)
+
+using std::in_place_t;
+using std::in_place;
+
+#else
+
+struct in_place_t
+{
+ explicit in_place_t() = default;
+};
+
+constexpr in_place_t in_place{};
+
+#endif
+}
+
+#endif