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 11 // Throwing bad_optional_access is supported starting in macosx10.13 12 // XFAIL: use_system_cxx_lib && x86_64-apple-macosx10.12 13 // XFAIL: use_system_cxx_lib && x86_64-apple-macosx10.11 14 // XFAIL: use_system_cxx_lib && x86_64-apple-macosx10.10 15 // XFAIL: use_system_cxx_lib && x86_64-apple-macosx10.9 16 17 // <optional> 18 19 // class bad_optional_access is default constructible 20 21 #include <optional> 22 #include <type_traits> 23 24 #include "test_macros.h" 25 26 int main(int, char**) 27 { 28 using std::bad_optional_access; 29 bad_optional_access ex; 30 31 return 0; 32 } 33