Chris@102: // Copyright (C) 2014, Andrzej Krzemienski. Chris@102: // Chris@102: // Use, modification, and distribution is subject to the Boost Software Chris@102: // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at Chris@102: // http://www.boost.org/LICENSE_1_0.txt) Chris@102: // Chris@102: // See http://www.boost.org/libs/optional for documentation. Chris@102: // Chris@102: // You are welcome to contact the author at: Chris@102: // akrzemi1@gmail.com Chris@102: // Chris@102: #ifndef BOOST_BAD_OPTIONAL_ACCESS_22MAY2014_HPP Chris@102: #define BOOST_BAD_OPTIONAL_ACCESS_22MAY2014_HPP Chris@102: Chris@102: #include Chris@102: #if __cplusplus < 201103L Chris@102: #include // to make converting-ctor std::string(char const*) visible Chris@102: #endif Chris@102: Chris@102: namespace boost { Chris@102: Chris@102: class bad_optional_access : public std::logic_error Chris@102: { Chris@102: public: Chris@102: bad_optional_access() Chris@102: : std::logic_error("Attempted to access the value of an uninitialized optional object.") Chris@102: {} Chris@102: }; Chris@102: Chris@102: } // namespace boost Chris@102: Chris@102: #endif