Make std::get constexpr

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186525 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2013-07-17 18:25:36 +00:00
parent f7777e8554
commit 8fc4f5a251
12 changed files with 299 additions and 51 deletions

View File

@@ -31,10 +31,8 @@ int main()
{
typedef std::pair<int, short> P;
constexpr P p1(3, 4);
static_assert(p1.first == 3, "" ); // for now!
static_assert(p1.second == 4, "" ); // for now!
// static_assert(std::get<0>(p1) == 3, "");
// static_assert(std::get<1>(p1) == 4, "");
static_assert(std::get<0>(p1) == 3, "");
static_assert(std::get<1>(p1) == 4, "");
}
#endif
}