File indexing completed on 2025-01-18 09:40:48
0001 #ifndef BOOST_METAPARSE_V1_ERROR_UNPAIRED_HPP
0002 #define BOOST_METAPARSE_V1_ERROR_UNPAIRED_HPP
0003
0004
0005
0006
0007
0008
0009 #include <boost/mpl/vector.hpp>
0010
0011 #include <iostream>
0012 #include <string>
0013 #include <sstream>
0014
0015 namespace boost
0016 {
0017 namespace metaparse
0018 {
0019 namespace v1
0020 {
0021 namespace error
0022 {
0023 template <int Line, int Col, class Msg = boost::mpl::na>
0024 struct unpaired
0025 {
0026 typedef unpaired type;
0027
0028 static std::string get_value()
0029 {
0030 std::ostringstream s;
0031 s << Msg::get_value() << " (see " << Line << ":" << Col << ")";
0032 return s.str();
0033 }
0034 };
0035
0036 template <int Line, int Col>
0037 struct unpaired<Line, Col, boost::mpl::na>
0038 {
0039 typedef unpaired type;
0040
0041 template <class Msg = boost::mpl::na>
0042 struct apply : unpaired<Line, Col, Msg> {};
0043 };
0044 }
0045 }
0046 }
0047 }
0048
0049 #endif
0050