diff options
author | Eric Fiselier <eric@efcs.ca> | 2014-07-17 05:31:31 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2014-07-17 05:31:31 +0000 |
commit | 531d8b2bc41f6b61bb2ff5c8b4fef1aa6703211a (patch) | |
tree | 2d8245b53a3c85804339f9f9e7ff1e8aad9b3632 /libcxx/include | |
parent | 371aac1adbf23404a1e9472a2d40139c993c84c1 (diff) | |
download | bcm5719-llvm-531d8b2bc41f6b61bb2ff5c8b4fef1aa6703211a.tar.gz bcm5719-llvm-531d8b2bc41f6b61bb2ff5c8b4fef1aa6703211a.zip |
[libcxx] Add <experimental/utility> header for LFTS.
Summary:
This patch adds the `<experimental/utility>` header as specified in the latest draft of the library fundamentals TS.
`<experimental/utility>` only contains `class erased_type`.
This patch also updates the documentation to list the `erased_type` class as "initial implementation complete".
Test Plan:
Three test cases where added:
1. Test that `_LIBCPP_VERSION` is defined.
2. Test that `<utility>` has been included.
3. Test that `erased_type` is in the correct namespace and is constexpr default constructible.
Reviewers: mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4510
llvm-svn: 213226
Diffstat (limited to 'libcxx/include')
-rw-r--r-- | libcxx/include/experimental/utility | 48 |
1 files changed, 48 insertions, 0 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 */ |