#include #include #include #include #include class S { private: int refcount = 0; private: inline friend void intrusive_ptr_add_ref(S* s) { s->refcount += 1; } inline friend void intrusive_ptr_release(S* s) { s->refcount -= 1; if (s->refcount == 0) { delete s; } } }; int main() { using S_ptr = boost::intrusive_ptr; { S_ptr p_s(new S); } std::cout << std::boolalpha; std::cout << "__cplusplus: " << __cplusplus << '\n'; std::cout << "BOOST_VERSION: " << BOOST_VERSION << '\n'; std::cout << "std::is_nothrow_move_constructible: " << std::is_nothrow_move_constructible::value << '\n'; std::cout << "BOOST_NO_CXX11_RVALUE_REFERENCES: " << #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) "" #else "" #endif << '\n'; #if defined(__INTEL_COMPILER) std::cout << "__INTEL_COMPILER: " << __INTEL_COMPILER << '\n'; #endif #if defined(BOOST_INTEL_CXX_VERSION) std::cout << "BOOST_INTEL_CXX_VERSION: " << BOOST_INTEL_CXX_VERSION << '\n'; #endif #if defined(BOOST_INTEL_GCC_VERSION) std::cout << "BOOST_INTEL_GCC_VERSION: " << BOOST_INTEL_GCC_VERSION << '\n'; #endif #if defined(_MSC_VER) std::cout << "_MSC_VER: " << _MSC_VER << '\n'; #endif }