diff --git a/include/boost/smart_ptr/intrusive_ref_counter.hpp b/include/boost/smart_ptr/intrusive_ref_counter.hpp index 8714153..82fa8bc 100644 --- a/include/boost/smart_ptr/intrusive_ref_counter.hpp +++ b/include/boost/smart_ptr/intrusive_ref_counter.hpp @@ -22,6 +22,14 @@ #pragma once #endif +#if defined(_MSC_VER) +#pragma warning(push) +// This is a bogus MSVC warning, which is flagged by friend declarations of intrusive_ptr_add_ref and intrusive_ptr_release in intrusive_ref_counter: +// 'name' : the inline specifier cannot be used when a friend declaration refers to a specialization of a function template +// Note that there is no inline specifier in the declarations. +#pragma warning(disable: 4396) +#endif + namespace boost { namespace sp_adl_block { @@ -172,4 +180,8 @@ using sp_adl_block::thread_safe_counter; } // namespace boost +#if defined(_MSC_VER) +#pragma warning(pop) +#endif + #endif // BOOST_SMART_PTR_INTRUSIVE_REF_COUNTER_HPP_INCLUDED_