Skip to content

Commit 94d0149

Browse files
committed
Mark symbols as weak symbols
1 parent 1ada251 commit 94d0149

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

include/tao/json/internal/errors.hh

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2015 Dr. Colin Hirsch and Daniel Frey
1+
// Copyright (c) 2015-2016 Dr. Colin Hirsch and Daniel Frey
22
// Please see LICENSE for license or visit https://github.com/taocpp/json/
33

44
#ifndef TAOCPP_JSON_INCLUDE_INTERNAL_ERRORS_HH
@@ -30,24 +30,24 @@ namespace tao
3030
}
3131
};
3232

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";
3434

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";
4141
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";
4949
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";
5151
5252
} // internal
5353

0 commit comments

Comments
 (0)