Bug 16599 part 2: Make std::pair's constructors and comparison operators (and make_pair) constexpr.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186430 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -18,8 +18,19 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
{
|
||||
typedef std::pair<float, short*> P;
|
||||
P p;
|
||||
assert(p.first == 0.0f);
|
||||
assert(p.second == nullptr);
|
||||
}
|
||||
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
{
|
||||
typedef std::pair<float, short*> P;
|
||||
constexpr P p;
|
||||
static_assert(p.first == 0.0f, "");
|
||||
static_assert(p.second == nullptr, "");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user