Give tuple a constexpr default constructor.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159857 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2012-07-06 20:39:45 +00:00
parent a0b5befbd3
commit 5394c1ed30
2 changed files with 23 additions and 3 deletions

View File

@@ -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
}