9
3

expectation_failure.hpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  3. Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. =============================================================================*/
  6. #if !defined(SPIRIT_EXPECTATION_FAILURE_JULY_19_2016)
  7. #define SPIRIT_EXPECTATION_FAILURE_JULY_19_2016
  8. #if defined(_MSC_VER)
  9. #pragma once
  10. #endif
  11. #include <boost/spirit/home/support/info.hpp>
  12. #include <boost/config.hpp> // for BOOST_SYMBOL_VISIBLE
  13. #include <stdexcept>
  14. namespace boost { namespace spirit { namespace qi {
  15. template <typename Iterator>
  16. struct BOOST_SYMBOL_VISIBLE expectation_failure : std::runtime_error
  17. {
  18. expectation_failure(Iterator first_, Iterator last_, info const& what)
  19. : std::runtime_error("boost::spirit::qi::expectation_failure")
  20. , first(first_), last(last_), what_(what)
  21. {}
  22. ~expectation_failure() BOOST_NOEXCEPT_OR_NOTHROW {}
  23. Iterator first;
  24. Iterator last;
  25. info what_;
  26. };
  27. }}}
  28. #endif