Author: marshall Date: Tue Jan 24 12:03:32 2017 New Revision: 292958 URL: http://llvm.org/viewvc/llvm-project?rev=292958&view=rev Log: Mark LWG2736 as complete. No code changes, but we have more tests now
Added: libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp Modified: libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp libcxx/trunk/www/cxx1z_status.html Added: libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp?rev=292958&view=auto ============================================================================== --- libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp (added) +++ libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp Tue Jan 24 12:03:32 2017 @@ -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 = {}; +} Modified: libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp?rev=292958&r1=292957&r2=292958&view=diff ============================================================================== --- libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp (original) +++ libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp Tue Jan 24 12:03:32 2017 @@ -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, ""); Modified: libcxx/trunk/www/cxx1z_status.html URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/cxx1z_status.html?rev=292958&r1=292957&r2=292958&view=diff ============================================================================== --- libcxx/trunk/www/cxx1z_status.html (original) +++ libcxx/trunk/www/cxx1z_status.html Tue Jan 24 12:03:32 2017 @@ -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> _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits