diff options
| author | Erik Kundiman <erik@megapahit.org> | 2025-12-04 13:58:12 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2025-12-04 16:48:50 +0800 |
| commit | e3a35af2c676fb211ff7d01a79eb1a3299bc82f3 (patch) | |
| tree | 0ff7a0a15d1a53850399250b65f0a2a42f7bbf22 /indra/llcommon/llptrto.cpp | |
| parent | ac052bed7f9f97efc63f0a0322214d4dcdcd5664 (diff) | |
| parent | c4ec3d866082d588de671e833413474d7ab19524 (diff) | |
Merge remote-tracking branch 'secondlife/release/2026.01' into 2026.01
Diffstat (limited to 'indra/llcommon/llptrto.cpp')
| -rw-r--r-- | indra/llcommon/llptrto.cpp | 39 |
1 files changed, 19 insertions, 20 deletions
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 <type_traits> // std headers // external library headers -#include <boost/type_traits/is_same.hpp> -#include <boost/static_assert.hpp> // 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<LLPtrTo<RCFoo>::type, LLPointer<RCFoo> >::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLPtrTo<RCSubFoo>::type, LLPointer<RCSubFoo> >::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLPtrTo<TSRCFoo>::type, LLPointer<TSRCFoo> >::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLPtrTo<Bar>::type, Bar*>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLPtrTo<SubBar>::type, SubBar*>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLPtrTo<int>::type, int*>::value)); + static_assert((std::is_same_v<LLPtrTo<RCFoo>::type, LLPointer<RCFoo> >)); + static_assert((std::is_same_v<LLPtrTo<RCSubFoo>::type, LLPointer<RCSubFoo> >)); + static_assert((std::is_same_v<LLPtrTo<TSRCFoo>::type, LLPointer<TSRCFoo> >)); + static_assert((std::is_same_v<LLPtrTo<Bar>::type, Bar*>)); + static_assert((std::is_same_v<LLPtrTo<SubBar>::type, SubBar*>)); + static_assert((std::is_same_v<LLPtrTo<int>::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<LLRemovePointer<RCFoo*>::type, RCFoo>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer< LLPointer<RCFoo> >::type, RCFoo>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer<RCSubFoo*>::type, RCSubFoo>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer< LLPointer<RCSubFoo> >::type, RCSubFoo>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer<TSRCFoo*>::type, TSRCFoo>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer< LLPointer<TSRCFoo> >::type, TSRCFoo>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer<Bar*>::type, Bar>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer< LLPointer<Bar> >::type, Bar>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer<SubBar*>::type, SubBar>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer< LLPointer<SubBar> >::type, SubBar>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer<int*>::type, int>::value)); - BOOST_STATIC_ASSERT((boost::is_same<LLRemovePointer< LLPointer<int> >::type, int>::value)); + static_assert((std::is_same_v<LLRemovePointer<RCFoo*>::type, RCFoo>)); + static_assert((std::is_same_v<LLRemovePointer< LLPointer<RCFoo> >::type, RCFoo>)); + static_assert((std::is_same_v<LLRemovePointer<RCSubFoo*>::type, RCSubFoo>)); + static_assert((std::is_same_v<LLRemovePointer< LLPointer<RCSubFoo> >::type, RCSubFoo>)); + static_assert((std::is_same_v<LLRemovePointer<TSRCFoo*>::type, TSRCFoo>)); + static_assert((std::is_same_v<LLRemovePointer< LLPointer<TSRCFoo> >::type, TSRCFoo>)); + static_assert((std::is_same_v<LLRemovePointer<Bar*>::type, Bar>)); + static_assert((std::is_same_v<LLRemovePointer< LLPointer<Bar> >::type, Bar>)); + static_assert((std::is_same_v<LLRemovePointer<SubBar*>::type, SubBar>)); + static_assert((std::is_same_v<LLRemovePointer< LLPointer<SubBar> >::type, SubBar>)); + static_assert((std::is_same_v<LLRemovePointer<int*>::type, int>)); + static_assert((std::is_same_v<LLRemovePointer< LLPointer<int> >::type, int>)); return 0; } |
