File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
include/bsoncxx/v_noabi/bsoncxx
lib/bsoncxx/v_noabi/bsoncxx Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ Changes prior to 3.9.0 are documented as [release notes on GitHub](https://githu
1212### Fixed
1313
1414- ` storage_engine() const ` in ` mongocxx::v_noabi::options::index ` is correctly exported using mongocxx export macros instead of bsoncxx export macros.
15+ - Fix ` -Wdeprecated-literal-operator ` warning.
1516
1617## 4.1.1
1718
Original file line number Diff line number Diff line change @@ -82,7 +82,11 @@ BSONCXX_ABI_EXPORT_CDECL(document::value) from_json(stdx::string_view json);
8282// /
8383// / @throws bsoncxx::v_noabi::exception with error details if the conversion failed.
8484// /
85+ #if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 8)) && !defined(__clang__)
86+ BSONCXX_ABI_EXPORT_CDECL (document::value) operator"" _bson(char const * json, size_t len);
87+ #else
8588BSONCXX_ABI_EXPORT_CDECL (document::value) operator""_bson(char const * json, size_t len);
89+ #endif // GCC <= 4.8
8690
8791} // namespace v_noabi
8892} // namespace bsoncxx
@@ -92,7 +96,11 @@ namespace bsoncxx {
9296using ::bsoncxx::v_noabi::from_json;
9397using ::bsoncxx::v_noabi::to_json;
9498
99+ #if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 8)) && !defined(__clang__)
100+ using ::bsoncxx::v_noabi::operator " " _bson;
101+ #else
95102using ::bsoncxx::v_noabi::operator " " _bson;
103+ #endif // GCC <= 4.8
96104
97105} // namespace bsoncxx
98106
Original file line number Diff line number Diff line change @@ -107,7 +107,11 @@ document::value from_json(stdx::string_view json) {
107107 return document::value{buf, length, bson_free_deleter};
108108}
109109
110+ #if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 8)) && !defined(__clang__)
111+ document::value operator " " _bson(char const * str, size_t len) {
112+ #else
110113document::value operator " " _bson (char const * str, size_t len) {
114+ #endif // GCC <= 4.8
111115 return from_json (stdx::string_view{str, len});
112116}
113117
You can’t perform that action at this time.
0 commit comments