Mark LWG2736 as complete. No code changes, but we have more tests now

llvm-svn: 292958
This commit is contained in:
Marshall Clow 2017-01-24 18:03:32 +00:00
parent d90f5f6698
commit 77dd30b557
3 changed files with 36 additions and 4 deletions

View File

@ -0,0 +1,27 @@
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03, c++11, c++14
// <optional>
// struct nullopt_t{see below};
// constexpr nullopt_t nullopt(unspecified);
// [optional.nullopt]/2:
// Type nullopt_t shall not have a default constructor or an initializer-list constructor.
// It shall not be an aggregate and shall be a literal type.
// Constant nullopt shall be initialized with an argument of literal type.
#include <optional>
#include "test_macros.h"
int main()
{
std::nullopt_t n = {};
}

View File

@ -13,6 +13,11 @@
// struct nullopt_t{see below};
// constexpr nullopt_t nullopt(unspecified);
// [optional.nullopt]/2:
// Type nullopt_t shall not have a default constructor or an initializer-list constructor.
// It shall not be an aggregate and shall be a literal type.
// Constant nullopt shall be initialized with an argument of literal type.
#include <optional>
#include <type_traits>
@ -29,9 +34,9 @@ test(const nullopt_t&)
int main()
{
static_assert((std::is_class<nullopt_t>::value), "");
static_assert((std::is_empty<nullopt_t>::value), "");
static_assert((std::is_literal_type<nullopt_t>::value), "");
static_assert(( std::is_class<nullopt_t>::value), "");
static_assert(( std::is_empty<nullopt_t>::value), "");
static_assert(( std::is_literal_type<nullopt_t>::value), "");
static_assert((!std::is_default_constructible<nullopt_t>::value), "");
static_assert(test(nullopt) == 3, "");

View File

@ -386,7 +386,7 @@
<tr><td><a href="http://wg21.link/LWG2732">2732</a></td><td>Questionable specification of path::operator/= and path::append</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2733">2733</a></td><td>[fund.ts.v2] gcd / lcm and bool</td><td>Issaquah</td><td></td></tr>
<tr><td><a href="http://wg21.link/LWG2735">2735</a></td><td>std::abs(short), std::abs(signed char) and others should return int instead of double in order to be compatible with C++98 and C</td><td>Issaquah</td><td></td></tr>
<tr><td><a href="http://wg21.link/LWG2736">2736</a></td><td>nullopt_t insufficiently constrained</td><td>Issaquah</td><td></td></tr>
<tr><td><a href="http://wg21.link/LWG2736">2736</a></td><td>nullopt_t insufficiently constrained</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2738">2738</a></td><td>is_constructible with void types</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2739">2739</a></td><td>Issue with time_point non-member subtraction with an unsigned duration</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2740">2740</a></td><td>constexpr optional<T>::operator-></td><td>Issaquah</td><td>Complete</td></tr>