summaryrefslogtreecommitdiffstats
path: root/libcxx/test/utilities/tuple/tuple.tuple/tuple.cnstr
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-07-06 20:39:45 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-07-06 20:39:45 +0000
commita62ebe043e3d9364a7b55e05a123bbadd8cfbd99 (patch)
tree05ca1a23b7d6c0ff35c2d0486a5bddb8f494d5cd /libcxx/test/utilities/tuple/tuple.tuple/tuple.cnstr
parent239ae7186b72ef7e9f773a1182b5e3fab07529d9 (diff)
downloadbcm5719-llvm-a62ebe043e3d9364a7b55e05a123bbadd8cfbd99.tar.gz
bcm5719-llvm-a62ebe043e3d9364a7b55e05a123bbadd8cfbd99.zip
Give tuple a constexpr default constructor.
llvm-svn: 159857
Diffstat (limited to 'libcxx/test/utilities/tuple/tuple.tuple/tuple.cnstr')
-rw-r--r--libcxx/test/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/libcxx/test/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp b/libcxx/test/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp
index eb902ac683b..84ecd8d2cd1 100644
--- a/libcxx/test/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp
+++ b/libcxx/test/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp
@@ -46,4 +46,18 @@ int main()
assert(std::get<2>(t) == "");
assert(std::get<3>(t) == DefaultOnly());
}
+#ifndef _LIBCPP_HAS_NO_CONSTEXPR
+ {
+ constexpr std::tuple<> t;
+ }
+ {
+ constexpr std::tuple<int> t;
+ assert(std::get<0>(t) == 0);
+ }
+ {
+ constexpr std::tuple<int, char*> t;
+ assert(std::get<0>(t) == 0);
+ assert(std::get<1>(t) == nullptr);
+ }
+#endif
}
OpenPOWER on IntegriCloud