summaryrefslogtreecommitdiffstats
path: root/libcxx/test/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2014-02-25 16:11:46 +0000
committerMarshall Clow <mclow.lists@gmail.com>2014-02-25 16:11:46 +0000
commit0d1560e10e79f2d75a8fe09b07e40218d84f0ae5 (patch)
treec653b3ae355b91405b3ea5d5b2dcb71ffe156dba /libcxx/test/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp
parent6d6e87be9f8ac216b1d56df065752060bed31383 (diff)
downloadbcm5719-llvm-0d1560e10e79f2d75a8fe09b07e40218d84f0ae5.tar.gz
bcm5719-llvm-0d1560e10e79f2d75a8fe09b07e40218d84f0ae5.zip
Implement LWG issue 2301: Mark std::tie as constexpr
llvm-svn: 202158
Diffstat (limited to 'libcxx/test/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp')
-rw-r--r--libcxx/test/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libcxx/test/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp b/libcxx/test/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp
index 112ee39a367..e6ebf958e6f 100644
--- a/libcxx/test/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp
+++ b/libcxx/test/utilities/tuple/tuple.tuple/tuple.creation/tie.pass.cpp
@@ -27,4 +27,13 @@ int main()
assert(i == 42);
assert(s == "C++");
}
+#if _LIBCPP_STD_VER > 11
+ {
+ static constexpr int i = 42;
+ static constexpr double f = 1.1;
+ constexpr std::tuple<const int &, const double &> t = std::tie(i, f);
+ static_assert ( std::get<0>(t) == 42, "" );
+ static_assert ( std::get<1>(t) == 1.1, "" );
+ }
+#endif
}
OpenPOWER on IntegriCloud