|
1 | | -// Copyright (c) 2015 Dr. Colin Hirsch and Daniel Frey |
| 1 | +// Copyright (c) 2015-2016 Dr. Colin Hirsch and Daniel Frey |
2 | 2 | // Please see LICENSE for license or visit https://github.com/taocpp/json/ |
3 | 3 |
|
4 | 4 | #ifndef TAOCPP_JSON_INCLUDE_INTERNAL_ERRORS_HH |
@@ -30,24 +30,24 @@ namespace tao |
30 | 30 | } |
31 | 31 | }; |
32 | 32 |
|
33 | | - template<> const std::string errors< rules::text >::error_message = "no valid JSON"; |
| 33 | + template<> const std::string errors< rules::text >::error_message __attribute__(( weak )) = "no valid JSON"; |
34 | 34 |
|
35 | | - template<> const std::string errors< rules::end_array >::error_message = "incomplete array, expected ']'"; |
36 | | - template<> const std::string errors< rules::end_object >::error_message = "incomplete object, expected '}'"; |
37 | | - template<> const std::string errors< rules::member >::error_message = "expected member"; |
38 | | - template<> const std::string errors< rules::name_separator >::error_message = "expected ':'"; |
39 | | - template<> const std::string errors< rules::array_element >::error_message = "expected value"; |
40 | | - template<> const std::string errors< rules::value >::error_message = "expected value"; |
| 35 | + template<> const std::string errors< rules::end_array >::error_message __attribute__(( weak )) = "incomplete array, expected ']'"; |
| 36 | + template<> const std::string errors< rules::end_object >::error_message __attribute__(( weak )) = "incomplete object, expected '}'"; |
| 37 | + template<> const std::string errors< rules::member >::error_message __attribute__(( weak )) = "expected member"; |
| 38 | + template<> const std::string errors< rules::name_separator >::error_message __attribute__(( weak )) = "expected ':'"; |
| 39 | + template<> const std::string errors< rules::array_element >::error_message __attribute__(( weak )) = "expected value"; |
| 40 | + template<> const std::string errors< rules::value >::error_message __attribute__(( weak )) = "expected value"; |
41 | 41 |
|
42 | | - template<> const std::string errors< rules::edigits >::error_message = "expected at least one exponent digit"; |
43 | | - template<> const std::string errors< rules::fdigits >::error_message = "expected at least one fraction digit"; |
44 | | - template<> const std::string errors< rules::xdigit >::error_message = "incomplete universal character name"; |
45 | | - template<> const std::string errors< rules::escaped >::error_message = "unknown escape sequence"; |
46 | | - template<> const std::string errors< rules::chars >::error_message = "invalid character in string"; |
47 | | - template<> const std::string errors< rules::string::content >::error_message = "unterminated string"; |
48 | | - template<> const std::string errors< rules::key::content >::error_message = "unterminated key"; |
| 42 | + template<> const std::string errors< rules::edigits >::error_message __attribute__(( weak )) = "expected at least one exponent digit"; |
| 43 | + template<> const std::string errors< rules::fdigits >::error_message __attribute__(( weak )) = "expected at least one fraction digit"; |
| 44 | + template<> const std::string errors< rules::xdigit >::error_message __attribute__(( weak )) = "incomplete universal character name"; |
| 45 | + template<> const std::string errors< rules::escaped >::error_message __attribute__(( weak )) = "unknown escape sequence"; |
| 46 | + template<> const std::string errors< rules::chars >::error_message __attribute__(( weak )) = "invalid character in string"; |
| 47 | + template<> const std::string errors< rules::string::content >::error_message __attribute__(( weak )) = "unterminated string"; |
| 48 | + template<> const std::string errors< rules::key::content >::error_message __attribute__(( weak )) = "unterminated key"; |
49 | 49 |
|
50 | | - template<> const std::string errors< tao_json_pegtl::eof >::error_message = "unexpected character after JSON value"; |
| 50 | + template<> const std::string errors< tao_json_pegtl::eof >::error_message __attribute__(( weak )) = "unexpected character after JSON value"; |
51 | 51 |
|
52 | 52 | } // internal |
53 | 53 |
|
|
0 commit comments