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-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 // UNSUPPORTED: c++03, c++11, c++14 10 // <optional> 11 12 // A program that necessitates the instantiation of template optional for 13 // (possibly cv-qualified) in_place_t is ill-formed. 14 15 #include <optional> 16 17 int main(int, char**) 18 { 19 using std::optional; 20 using std::in_place_t; 21 using std::in_place; 22 23 optional<in_place_t> opt; // expected-note {{requested here}} 24 // expected-error@optional:* {{"instantiation of optional with in_place_t is ill-formed"}} 25 26 return 0; 27 } 28