[libcxx] expose experimental::erased_type for all standard versions.
authorEric Fiselier <eric@efcs.ca>
Thu, 24 Jul 2014 19:17:38 +0000 (19:17 +0000)
committerEric Fiselier <eric@efcs.ca>
Thu, 24 Jul 2014 19:17:38 +0000 (19:17 +0000)
Summary: The polymorphic allocator implementation would greatly benefit by defining virtual functions in the dynlib instead of inline. In order to do that some types are going to have to be available outside of c++1y. This is the first step.

Reviewers: mclow.lists, EricWF

Reviewed By: EricWF

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4554

llvm-svn: 213889

libcxx/include/experimental/utility
libcxx/test/experimental/utilities/utility/utility.erased.type/erased_type.pass.cpp
libcxx/test/experimental/utilities/utility/utility.synop/includes.pass.cpp

index 12a7d05..84e461a 100644 (file)
@@ -33,8 +33,6 @@ inline namespace fundamentals_v1 {
 
 # include <experimental/__config>
 
-#if _LIBCPP_STD_VER > 11
-
 # include <utility>
 
 _LIBCPP_BEGIN_NAMESPACE_LFTS
@@ -43,6 +41,4 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS
 
 _LIBCPP_END_NAMESPACE_LFTS
 
-#endif /* _LIBCPP_STD_VER > 11 */
-
 #endif /* _LIBCPP_EXPERIMENTAL_UTILITY */
index 5f89e53..3e38d5e 100644 (file)
@@ -13,8 +13,5 @@
 
 int main()
 {
-#if _LIBCPP_STD_VER > 11
-    using std::experimental::erased_type;
-    constexpr erased_type e{};
-#endif
+    std::experimental::erased_type e();
 }
index bcdd8b3..2583d43 100644 (file)
 
 #include <experimental/utility>
 
+#ifndef _LIBCPP_UTILITY
+#   error "<experimental/utility> must include <utility>"
+#endif
+
 int main()
 {
-#if _LIBCPP_STD_VER > 11
-# ifndef _LIBCPP_UTILITY
-#   error "<experimental/utility> must include <utility>"
-# endif
-#endif /* _LIBCPP_STD_VER > 11 */
 }