2
0
mirror of https://github.com/boostorg/json.git synced 2026-01-30 20:02:15 +00:00

Squelch class dllexport warning

This commit is contained in:
Vinnie Falco
2020-10-29 13:33:28 -07:00
parent 3a39b8cf9f
commit 74fb1effd1
4 changed files with 37 additions and 0 deletions

View File

@@ -16,6 +16,12 @@
BOOST_JSON_NS_BEGIN
namespace detail {
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4251) // class needs to have dll-interface to be used by clients of class
#pragma warning(disable: 4275) // non dll-interface class used as base for dll-interface class
#endif
// A simple memory resource that uses operator new and delete.
class
BOOST_SYMBOL_VISIBLE
@@ -65,6 +71,9 @@ public:
memory_resource const& mr) const noexcept override;
};
#ifdef _MSC_VER
#pragma warning(pop)
#endif
union default_resource::
holder

View File

@@ -17,6 +17,11 @@
BOOST_JSON_NS_BEGIN
namespace detail {
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4275) // non dll-interface class used as base for dll-interface class
#endif
struct BOOST_SYMBOL_VISIBLE
shared_resource
: memory_resource
@@ -70,6 +75,10 @@ public:
}
};
#ifdef _MSC_VER
#pragma warning(pop)
#endif
} // detail
BOOST_JSON_NS_END

View File

@@ -19,6 +19,12 @@
BOOST_JSON_NS_BEGIN
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4251) // class needs to have dll-interface to be used by clients of class
#pragma warning(disable: 4275) // non dll-interface class used as base for dll-interface class
#endif
//----------------------------------------------------------
/** A dynamically allocating resource with a trivial deallocate
@@ -328,6 +334,10 @@ protected:
#endif
};
#ifdef _MSC_VER
#pragma warning(pop)
#endif
template<>
struct is_deallocate_trivial<
monotonic_resource>

View File

@@ -16,6 +16,11 @@
BOOST_JSON_NS_BEGIN
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4275) // non dll-interface class used as base for dll-interface class
#endif
//----------------------------------------------------------
/** A resource using a caller-owned buffer, with a trivial deallocate
@@ -222,6 +227,10 @@ protected:
#endif
};
#ifdef _MSC_VER
#pragma warning(pop)
#endif
template<>
struct is_deallocate_trivial<
static_resource>