1 #ifndef JSON_SPIRIT_ERROR_POSITION
\r
2 #define JSON_SPIRIT_ERROR_POSITION
\r
4 // Copyright John W. Wilkinson 2007 - 2011
\r
5 // Distributed under the MIT License, see accompanying file LICENSE.txt
\r
7 // json spirit version 4.05
\r
9 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
\r
15 namespace json_spirit
\r
17 // An Error_position exception is thrown by the "read_or_throw" functions below on finding an error.
\r
18 // Note the "read_or_throw" functions are around 3 times slower than the standard functions "read"
\r
19 // functions that return a bool.
\r
21 struct Error_position
\r
24 Error_position( unsigned int line, unsigned int column, const std::string& reason );
\r
25 bool operator==( const Error_position& lhs ) const;
\r
27 unsigned int column_;
\r
28 std::string reason_;
\r
31 inline Error_position::Error_position()
\r
37 inline Error_position::Error_position( unsigned int line, unsigned int column, const std::string& reason )
\r
44 inline bool Error_position::operator==( const Error_position& lhs ) const
\r
46 if( this == &lhs ) return true;
\r
48 return ( reason_ == lhs.reason_ ) &&
\r
49 ( line_ == lhs.line_ ) &&
\r
50 ( column_ == lhs.column_ );
\r