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
12
12
### Fixed
13
13
14
14
- ` 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.
15
16
16
17
## 4.1.1
17
18
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);
82
82
// /
83
83
// / @throws bsoncxx::v_noabi::exception with error details if the conversion failed.
84
84
// /
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
85
88
BSONCXX_ABI_EXPORT_CDECL (document::value) operator""_bson(char const * json, size_t len);
89
+ #endif // GCC <= 4.8
86
90
87
91
} // namespace v_noabi
88
92
} // namespace bsoncxx
@@ -92,7 +96,11 @@ namespace bsoncxx {
92
96
using ::bsoncxx::v_noabi::from_json;
93
97
using ::bsoncxx::v_noabi::to_json;
94
98
99
+ #if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 8)) && !defined(__clang__)
100
+ using ::bsoncxx::v_noabi::operator " " _bson;
101
+ #else
95
102
using ::bsoncxx::v_noabi::operator " " _bson;
103
+ #endif // GCC <= 4.8
96
104
97
105
} // namespace bsoncxx
98
106
Original file line number Diff line number Diff line change @@ -107,7 +107,11 @@ document::value from_json(stdx::string_view json) {
107
107
return document::value{buf, length, bson_free_deleter};
108
108
}
109
109
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
110
113
document::value operator " " _bson (char const * str, size_t len) {
114
+ #endif // GCC <= 4.8
111
115
return from_json (stdx::string_view{str, len});
112
116
}
113
117
You can’t perform that action at this time.
0 commit comments