Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:43:20

0001 // Copyright (C) 2014, Andrzej Krzemienski.
0002 //
0003 // Use, modification, and distribution is subject to the Boost Software
0004 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0005 // http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // See http://www.boost.org/libs/optional for documentation.
0008 //
0009 // You are welcome to contact the author at:
0010 //  akrzemi1@gmail.com
0011 //
0012 #ifndef BOOST_BAD_OPTIONAL_ACCESS_22MAY2014_HPP
0013 #define BOOST_BAD_OPTIONAL_ACCESS_22MAY2014_HPP
0014 
0015 #include <stdexcept>
0016 #if __cplusplus < 201103L
0017 #include <string> // to make converting-ctor std::string(char const*) visible
0018 #endif
0019 
0020 namespace boost {
0021 
0022 #if defined(__clang__)
0023 # pragma clang diagnostic push
0024 # pragma clang diagnostic ignored "-Wweak-vtables"
0025 #endif
0026 
0027 class bad_optional_access : public std::logic_error
0028 {
0029 public:
0030   bad_optional_access()
0031     : std::logic_error("Attempted to access the value of an uninitialized optional object.")
0032     {}
0033 };
0034 
0035 #if defined(__clang__)
0036 # pragma clang diagnostic pop
0037 #endif
0038 
0039 } // namespace boost
0040 
0041 #endif