File tree Expand file tree Collapse file tree 8 files changed +30
-21
lines changed
bsoncxx/include/bsoncxx/v_noabi/bsoncxx
mongocxx/include/mongocxx/v_noabi/mongocxx Expand file tree Collapse file tree 8 files changed +30
-21
lines changed Original file line number Diff line number Diff line change 36
36
37
37
// clang-format on
38
38
39
- // Disable MSVC warnings that cause a lot of noise related to DLL visibility
40
- // for types that we don't control (like std::unique_ptr).
41
- BSONCXX_PUSH_WARNINGS ();
42
- BSONCXX_DISABLE_WARNING (MSVC(4251 ));
43
- BSONCXX_DISABLE_WARNING (MSVC(5275 ));
44
-
45
39
// For backward compatibility. Use `inline` instead.
46
40
#define BSONCXX_INLINE inline BSONCXX_ABI_NO_EXPORT
47
41
Original file line number Diff line number Diff line change 15
15
// compiler.hpp
16
16
#undef BSONCXX_INLINE
17
17
#pragma pop_macro("BSONCXX_INLINE")
18
- BSONCXX_POP_WARNINGS ();
19
18
#undef BSONCXX_CALL
20
19
#pragma pop_macro("BSONCXX_CALL")
21
20
Original file line number Diff line number Diff line change 23
23
namespace bsoncxx {
24
24
namespace v_noabi {
25
25
26
+ BSONCXX_PUSH_WARNINGS ();
27
+ BSONCXX_DISABLE_WARNING (MSVC(4251 ));
28
+ BSONCXX_DISABLE_WARNING (MSVC(4275 ));
29
+
26
30
// /
27
31
// / Class representing any exceptions emitted from the bsoncxx library or
28
32
// / its underlying implementation.
@@ -39,6 +43,8 @@ class exception : public std::system_error {
39
43
using std::system_error::system_error;
40
44
};
41
45
46
+ BSONCXX_POP_WARNINGS ();
47
+
42
48
} // namespace v_noabi
43
49
} // namespace bsoncxx
44
50
Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
- // TODO: DRY this definition with the one from bsoncxx/config/compiler.hpp per discussion
16
- // here - https://github.com/mongodb/mongo-cxx-driver/pull/374#issuecomment-158179295
17
- #if defined(_MSC_VER)
18
-
19
- // Disable MSVC warnings that cause a lot of noise related to DLL visibility
20
- // for types that we don't control (like std::unique_ptr).
21
- #pragma warning(push)
22
- #pragma warning(disable : 4251 4275)
23
-
24
- #endif
25
-
26
15
// For backward compatibility. Use `inline` instead.
27
16
#define MONGOCXX_INLINE inline MONGOCXX_ABI_NO_EXPORT
28
17
Original file line number Diff line number Diff line change 15
15
// compiler.hpp
16
16
#undef MONGOCXX_INLINE
17
17
#pragma pop_macro("MONGOCXX_INLINE")
18
- #if defined(_MSC_VER)
19
- #pragma warning(pop)
20
- #endif
21
18
#undef MONGOCXX_CALL
22
19
#pragma pop_macro("MONGOCXX_CALL")
23
20
Original file line number Diff line number Diff line change 19
19
20
20
#include < mongocxx/exception/exception-fwd.hpp>
21
21
22
+ #include < bsoncxx/config/prelude.hpp>
22
23
#include < mongocxx/config/prelude.hpp>
23
24
24
25
namespace mongocxx {
25
26
namespace v_noabi {
26
27
28
+ BSONCXX_PUSH_WARNINGS ();
29
+ BSONCXX_DISABLE_WARNING (MSVC(4251 ));
30
+ BSONCXX_DISABLE_WARNING (MSVC(4275 ));
31
+
27
32
// /
28
33
// / A class to be used as the base class for all mongocxx exceptions.
29
34
// /
@@ -39,9 +44,12 @@ class exception : public std::system_error {
39
44
using system_error::system_error;
40
45
};
41
46
47
+ BSONCXX_POP_WARNINGS ();
48
+
42
49
} // namespace v_noabi
43
50
} // namespace mongocxx
44
51
52
+ #include < bsoncxx/config/postlude.hpp>
45
53
#include < mongocxx/config/postlude.hpp>
46
54
47
55
// /
Original file line number Diff line number Diff line change 23
23
#include < mongocxx/exception/exception.hpp>
24
24
#include < mongocxx/stdx.hpp>
25
25
26
+ #include < bsoncxx/config/prelude.hpp>
26
27
#include < mongocxx/config/prelude.hpp>
27
28
28
29
namespace mongocxx {
29
30
namespace v_noabi {
30
31
32
+ BSONCXX_PUSH_WARNINGS ();
33
+ BSONCXX_DISABLE_WARNING (MSVC(4251 ));
34
+ BSONCXX_DISABLE_WARNING (MSVC(4275 ));
35
+
31
36
// /
32
37
// / Class representing an exception received from a MongoDB server. It includes the server-provided
33
38
// / error code, if one was available.
@@ -84,9 +89,12 @@ class operation_exception : public exception {
84
89
stdx::optional<bsoncxx::v_noabi::document::value> _raw_server_error;
85
90
};
86
91
92
+ BSONCXX_POP_WARNINGS ();
93
+
87
94
} // namespace v_noabi
88
95
} // namespace mongocxx
89
96
97
+ #include < bsoncxx/config/postlude.hpp>
90
98
#include < mongocxx/config/postlude.hpp>
91
99
92
100
// /
Original file line number Diff line number Diff line change 27
27
#include < bsoncxx/string/view_or_value.hpp>
28
28
#include < mongocxx/stdx.hpp>
29
29
30
+ #include < bsoncxx/config/prelude.hpp>
30
31
#include < mongocxx/config/prelude.hpp>
31
32
32
33
namespace mongocxx {
@@ -40,6 +41,10 @@ namespace options {
40
41
// /
41
42
class index {
42
43
public:
44
+ BSONCXX_PUSH_WARNINGS ();
45
+ BSONCXX_DISABLE_WARNING (MSVC(4251 ));
46
+ BSONCXX_DISABLE_WARNING (MSVC(4275 ));
47
+
43
48
// /
44
49
// / Base class representing the optional storage engine options for indexes.
45
50
// /
@@ -97,6 +102,8 @@ class index {
97
102
stdx::optional<bsoncxx::v_noabi::string::view_or_value> _config_string;
98
103
};
99
104
105
+ BSONCXX_POP_WARNINGS ();
106
+
100
107
MONGOCXX_ABI_EXPORT_CDECL () index();
101
108
102
109
// /
@@ -537,6 +544,7 @@ class index {
537
544
} // namespace v_noabi
538
545
} // namespace mongocxx
539
546
547
+ #include < bsoncxx/config/postlude.hpp>
540
548
#include < mongocxx/config/postlude.hpp>
541
549
542
550
// /
You can’t perform that action at this time.
0 commit comments