From fb3f0e18a2ada57f98c3b10fab0c13fb2d504ae1 Mon Sep 17 00:00:00 2001 From: Rye Date: Mon, 1 Dec 2025 05:46:57 -0500 Subject: #5078 Replace boost::function with std::function * Replace boost::function usage with std::function for easier debugging and reduced compiler warnings * Remove a few remaining instances of boost::noncopyable that were missed in tests Signed-off-by: Rye --- indra/llcommon/llptrto.cpp | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) (limited to 'indra/llcommon/llptrto.cpp') diff --git a/indra/llcommon/llptrto.cpp b/indra/llcommon/llptrto.cpp index c4528a47a7..adf636c4d2 100644 --- a/indra/llcommon/llptrto.cpp +++ b/indra/llcommon/llptrto.cpp @@ -31,10 +31,9 @@ // associated header #include "llptrto.h" // STL headers +#include // std headers // external library headers -#include -#include // other Linden headers #include "llmemory.h" @@ -76,27 +75,27 @@ public: int main(int argc, char *argv[]) { // test LLPtrTo<> - BOOST_STATIC_ASSERT((boost::is_same::type, LLPointer >::value)); - BOOST_STATIC_ASSERT((boost::is_same::type, LLPointer >::value)); - BOOST_STATIC_ASSERT((boost::is_same::type, LLPointer >::value)); - BOOST_STATIC_ASSERT((boost::is_same::type, Bar*>::value)); - BOOST_STATIC_ASSERT((boost::is_same::type, SubBar*>::value)); - BOOST_STATIC_ASSERT((boost::is_same::type, int*>::value)); + static_assert((std::is_same_v::type, LLPointer >)); + static_assert((std::is_same_v::type, LLPointer >)); + static_assert((std::is_same_v::type, LLPointer >)); + static_assert((std::is_same_v::type, Bar*>)); + static_assert((std::is_same_v::type, SubBar*>)); + static_assert((std::is_same_v::type, int*>)); // Test LLRemovePointer<>. Note that we remove both pointer variants from // each kind of type, regardless of whether the variant makes sense. - BOOST_STATIC_ASSERT((boost::is_same::type, RCFoo>::value)); - BOOST_STATIC_ASSERT((boost::is_same >::type, RCFoo>::value)); - BOOST_STATIC_ASSERT((boost::is_same::type, RCSubFoo>::value)); - BOOST_STATIC_ASSERT((boost::is_same >::type, RCSubFoo>::value)); - BOOST_STATIC_ASSERT((boost::is_same::type, TSRCFoo>::value)); - BOOST_STATIC_ASSERT((boost::is_same >::type, TSRCFoo>::value)); - BOOST_STATIC_ASSERT((boost::is_same::type, Bar>::value)); - BOOST_STATIC_ASSERT((boost::is_same >::type, Bar>::value)); - BOOST_STATIC_ASSERT((boost::is_same::type, SubBar>::value)); - BOOST_STATIC_ASSERT((boost::is_same >::type, SubBar>::value)); - BOOST_STATIC_ASSERT((boost::is_same::type, int>::value)); - BOOST_STATIC_ASSERT((boost::is_same >::type, int>::value)); + static_assert((std::is_same_v::type, RCFoo>)); + static_assert((std::is_same_v >::type, RCFoo>)); + static_assert((std::is_same_v::type, RCSubFoo>)); + static_assert((std::is_same_v >::type, RCSubFoo>)); + static_assert((std::is_same_v::type, TSRCFoo>)); + static_assert((std::is_same_v >::type, TSRCFoo>)); + static_assert((std::is_same_v::type, Bar>)); + static_assert((std::is_same_v >::type, Bar>)); + static_assert((std::is_same_v::type, SubBar>)); + static_assert((std::is_same_v >::type, SubBar>)); + static_assert((std::is_same_v::type, int>)); + static_assert((std::is_same_v >::type, int>)); return 0; } -- cgit v1.3