1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #ifndef BOOST_METAPARSE_V1_ERROR_UNPAIRED_HPP
- #define BOOST_METAPARSE_V1_ERROR_UNPAIRED_HPP
- #include <boost/mpl/vector.hpp>
- #include <iostream>
- #include <string>
- #include <sstream>
- namespace boost
- {
- namespace metaparse
- {
- namespace v1
- {
- namespace error
- {
- template <int Line, int Col, class Msg = boost::mpl::na>
- struct unpaired
- {
- typedef unpaired type;
- static std::string get_value()
- {
- std::ostringstream s;
- s << Msg::get_value() << " (see " << Line << ":" << Col << ")";
- return s.str();
- }
- };
- template <int Line, int Col>
- struct unpaired<Line, Col, boost::mpl::na>
- {
- typedef unpaired type;
- template <class Msg = boost::mpl::na>
- struct apply : unpaired<Line, Col, Msg> {};
- };
- }
- }
- }
- }
- #endif
|