22 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 11// <optional>12 13// A program that necessitates the instantiation of template optional for14// (possibly cv-qualified) in_place_t is ill-formed.15 16#include <optional>17 18void f() {19 std::optional<std::in_place_t> opt; // expected-note {{requested here}}20 // expected-error@optional:* {{instantiation of optional with in_place_t is ill-formed}}21}22