Skip to content

Commit e1b53f5

Browse files
Define MSVC warning suppression macros in config
1 parent 90caa4c commit e1b53f5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

include/boost/http_proto/detail/config.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,18 @@ namespace http_proto {
3333
# define BOOST_HTTP_PROTO_DECL
3434
# endif
3535

36+
// MSVC-only helpers to locally suppress benign DLL-interface warnings
37+
# if defined(BOOST_MSVC)
38+
# define BOOST_HTTP_PROTO_MSVC_WARNING_PUSH __pragma(warning(push))
39+
# define BOOST_HTTP_PROTO_MSVC_WARNING_POP __pragma(warning(pop))
40+
# define BOOST_HTTP_PROTO_MSVC_DISABLE_4251_4275 \
41+
__pragma(warning(disable:4251 4275))
42+
# else
43+
# define BOOST_HTTP_PROTO_MSVC_WARNING_PUSH
44+
# define BOOST_HTTP_PROTO_MSVC_WARNING_POP
45+
# define BOOST_HTTP_PROTO_MSVC_DISABLE_4251_4275
46+
# endif
47+
3648
# if !defined(BOOST_HTTP_PROTO_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_HTTP_PROTO_NO_LIB)
3749
# define BOOST_LIB_NAME boost_http_proto
3850
# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_HTTP_PROTO_DYN_LINK)

0 commit comments

Comments
 (0)