summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcxx/include/experimental/utility48
-rw-r--r--libcxx/test/experimental/utilities/nothing_to_do.pass.cpp13
-rw-r--r--libcxx/test/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp20
-rw-r--r--libcxx/test/experimental/utilities/utility/utility.synop/includes.pass.cpp21
-rw-r--r--libcxx/test/experimental/utilities/utility/version.pass.cpp20
-rw-r--r--libcxx/www/ts1z_status.html2
6 files changed, 123 insertions, 1 deletions
diff --git a/libcxx/include/experimental/utility b/libcxx/include/experimental/utility
new file mode 100644
index 00000000000..12a7d050f44
--- /dev/null
+++ b/libcxx/include/experimental/utility
@@ -0,0 +1,48 @@
+// -*- C++ -*-
+//===-------------------------- utility ----------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP_EXPERIMENTAL_UTILITY
+#define _LIBCPP_EXPERIMENTAL_UTILITY
+
+/*
+ experimental/utility synopsis
+
+// C++1y
+
+#include <utility>
+
+namespace std {
+namespace experimental {
+inline namespace fundamentals_v1 {
+
+ 3.1.2, erased-type placeholder
+ struct erased_type { };
+
+} // namespace fundamentals_v1
+} // namespace experimental
+} // namespace std
+
+ */
+
+# include <experimental/__config>
+
+#if _LIBCPP_STD_VER > 11
+
+# include <utility>
+
+_LIBCPP_BEGIN_NAMESPACE_LFTS
+
+ struct _LIBCPP_TYPE_VIS_ONLY erased_type { };
+
+_LIBCPP_END_NAMESPACE_LFTS
+
+#endif /* _LIBCPP_STD_VER > 11 */
+
+#endif /* _LIBCPP_EXPERIMENTAL_UTILITY */
diff --git a/libcxx/test/experimental/utilities/nothing_to_do.pass.cpp b/libcxx/test/experimental/utilities/nothing_to_do.pass.cpp
new file mode 100644
index 00000000000..9a59227abdd
--- /dev/null
+++ b/libcxx/test/experimental/utilities/nothing_to_do.pass.cpp
@@ -0,0 +1,13 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+int main()
+{
+}
diff --git a/libcxx/test/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp b/libcxx/test/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp
new file mode 100644
index 00000000000..5f89e5367b0
--- /dev/null
+++ b/libcxx/test/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp
@@ -0,0 +1,20 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <experimental/utility>
+
+#include <experimental/utility>
+
+int main()
+{
+#if _LIBCPP_STD_VER > 11
+ using std::experimental::erased_type;
+ constexpr erased_type e{};
+#endif
+}
diff --git a/libcxx/test/experimental/utilities/utility/utility.synop/includes.pass.cpp b/libcxx/test/experimental/utilities/utility/utility.synop/includes.pass.cpp
new file mode 100644
index 00000000000..bcdd8b3879e
--- /dev/null
+++ b/libcxx/test/experimental/utilities/utility/utility.synop/includes.pass.cpp
@@ -0,0 +1,21 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <experimental/utility>
+
+#include <experimental/utility>
+
+int main()
+{
+#if _LIBCPP_STD_VER > 11
+# ifndef _LIBCPP_UTILITY
+# error "<experimental/utility> must include <utility>"
+# endif
+#endif /* _LIBCPP_STD_VER > 11 */
+}
diff --git a/libcxx/test/experimental/utilities/utility/version.pass.cpp b/libcxx/test/experimental/utilities/utility/version.pass.cpp
new file mode 100644
index 00000000000..437712454ae
--- /dev/null
+++ b/libcxx/test/experimental/utilities/utility/version.pass.cpp
@@ -0,0 +1,20 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <experimental/utility>
+
+#include <experimental/utility>
+
+#ifndef _LIBCPP_VERSION
+#error _LIBCPP_VERSION not defined
+#endif
+
+int main()
+{
+}
diff --git a/libcxx/www/ts1z_status.html b/libcxx/www/ts1z_status.html
index c06ef7b5106..3a157701fbf 100644
--- a/libcxx/www/ts1z_status.html
+++ b/libcxx/www/ts1z_status.html
@@ -59,7 +59,7 @@
<tr><td>Additions to std::promise</td><td>Not started</td></tr>
<tr><td>Additions to std::packaged_task</td><td>Not started</td></tr>
<tr><td></td><td></td></tr>
- <tr><td>Class erased_type</td><td>Not started</td></tr>
+ <tr><td>Class erased_type</td><td>Initial implementation complete</td></tr>
<tr><td>Calling a function with a tuple of arguments</td><td>Not started</td></tr>
<tr><td>Other type transformations</td><td>Not started</td></tr>
<tr><td>Compile-time Rational Arithmetic</td><td>Not started</td></tr>
OpenPOWER on IntegriCloud