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