140006Sphk//===------------------------ optional.cpp --------------------------------===// 240006Sphk// 366830Sobrien// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 466830Sobrien// See https://llvm.org/LICENSE.txt for license information. 540006Sphk// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 666830Sobrien// 766830Sobrien//===----------------------------------------------------------------------===// 866830Sobrien 966830Sobrien#include "optional" 1066830Sobrien 1166830Sobriennamespace std 1266830Sobrien{ 1366830Sobrien 1466830Sobrienbad_optional_access::~bad_optional_access() _NOEXCEPT = default; 1566830Sobrien 1666830Sobrienconst char* bad_optional_access::what() const _NOEXCEPT { 1766830Sobrien return "bad_optional_access"; 1866830Sobrien } 1966830Sobrien 2066830Sobrien} // std 2166830Sobrien 2266830Sobrien 2366830Sobrien#include <experimental/__config> 2466830Sobrien 2566830Sobrien// Preserve std::experimental::bad_optional_access for ABI compatibility 2666830Sobrien// Even though it no longer exists in a header file 2750472Speter_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL 2866830Sobrien 2940006Sphkclass _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access 30100280Sgordon : public std::logic_error 3140006Sphk{ 32100280Sgordonpublic: 33100280Sgordon bad_optional_access() : std::logic_error("Bad optional Access") {} 34100280Sgordon 35136224Smtm// Get the key function ~bad_optional_access() into the dylib 3640006Sphk virtual ~bad_optional_access() _NOEXCEPT; 37100280Sgordon}; 3840006Sphk 39118123Shartibad_optional_access::~bad_optional_access() _NOEXCEPT = default; 40118123Sharti 41118123Sharti_LIBCPP_END_NAMESPACE_EXPERIMENTAL 42118123Sharti