mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +00:00
fix optional
This commit is contained in:
parent
a1c119a9bb
commit
6a78f64feb
9 changed files with 233 additions and 67 deletions
25
sprout/optional/exceptions.hpp
Normal file
25
sprout/optional/exceptions.hpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#ifndef SPROUT_OPTIONAL_EXCEPTIONS_HPP
|
||||
#define SPROUT_OPTIONAL_EXCEPTIONS_HPP
|
||||
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <sprout/config.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
// bad_optional_access
|
||||
//
|
||||
class bad_optional_access
|
||||
: public std::logic_error
|
||||
{
|
||||
public:
|
||||
explicit bad_optional_access(std::string const& what_arg)
|
||||
: std::logic_error(what_arg)
|
||||
{}
|
||||
explicit bad_optional_access(char const* what_arg)
|
||||
: std::logic_error(what_arg)
|
||||
{}
|
||||
};
|
||||
} // namespace sprout
|
||||
|
||||
#endif // SPROUT_OPTIONAL_EXCEPTIONS_HPP
|
Loading…
Add table
Add a link
Reference in a new issue