Merge to upstream r231255.

Change-Id: Ia8ee1801b42943464b99f28b6a83647458f3efb5
This commit is contained in:
Dan Albert
2015-03-04 10:47:52 -08:00
parent 94962fba20
commit 5cb52824fc
424 changed files with 5073 additions and 1663 deletions

View File

@@ -13,6 +13,8 @@
// constexpr tuple();
// UNSUPPORTED: c++98, c++03
#include <tuple>
#include <string>
#include <cassert>
@@ -33,6 +35,16 @@ struct ThrowingDefault {
ThrowingDefault() { }
};
struct IllFormedDefault {
IllFormedDefault(int x) : value(x) {}
template <bool Pred = false>
constexpr IllFormedDefault() {
static_assert(Pred,
"The default constructor should not be instantiated");
}
int value;
};
int main()
{
{
@@ -87,5 +99,12 @@ int main()
assert(std::get<0>(t) == 0);
assert(std::get<1>(t) == nullptr);
}
{
// Check that the SFINAE on the default constructor is not evaluted when
// it isn't needed. If the default constructor is evaluted then this test
// should fail to compile.
IllFormedDefault v(0);
std::tuple<IllFormedDefault> t(v);
}
#endif
}