Path: blob/main/contrib/llvm-project/libcxx/src/optional.cpp
35154 views
//===----------------------------------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include <optional>9#include <stdexcept>1011namespace std {1213bad_optional_access::~bad_optional_access() noexcept = default;1415const char* bad_optional_access::what() const noexcept { return "bad_optional_access"; }1617} // namespace std1819#include <experimental/__config>2021// Preserve std::experimental::bad_optional_access for ABI compatibility22// Even though it no longer exists in a header file23_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL2425class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access : public std::logic_error {26public:27bad_optional_access() : std::logic_error("Bad optional Access") {}2829// Get the key function ~bad_optional_access() into the dylib30virtual ~bad_optional_access() noexcept;31};3233bad_optional_access::~bad_optional_access() noexcept = default;3435_LIBCPP_END_NAMESPACE_EXPERIMENTAL363738