27 lines · cpp
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++03, c++11, c++1410// <optional>11 12// struct nullopt_t{see below};13// inline constexpr nullopt_t nullopt(unspecified);14 15// [optional.nullopt]/2:16// Type nullopt_t shall not have a default constructor or an initializer-list17// constructor, and shall not be an aggregate.18 19#include <optional>20 21int main(int, char**)22{23 std::nullopt_t n = {};24 25 return 0;26}27