mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-24 03:32:35 +08:00

* Update specification text from N4387 * Delete not_brace_initializable.fail.cpp: it's redundant with nullopt_t.fail.cpp * is_empty<T> implies is_class<T> * is_literal is deprecated; directly verify that we can create a nullopt_t in a constexpr context Differential Revision: D37024 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@312256 91177308-0d34-0410-b5e6-96231b3b80d8
26 lines
718 B
C++
26 lines
718 B
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// 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};
|
|
// inline constexpr nullopt_t nullopt(unspecified);
|
|
|
|
// [optional.nullopt]/2:
|
|
// Type nullopt_t shall not have a default constructor or an initializer-list
|
|
// constructor, and shall not be an aggregate.
|
|
|
|
#include <optional>
|
|
|
|
int main()
|
|
{
|
|
std::nullopt_t n = {};
|
|
}
|