From 39d60cd91d74c0d05eb26650672f28e9d2c9f474 Mon Sep 17 00:00:00 2001 From: Christian Mazakas Date: Wed, 9 Feb 2022 11:06:10 -0800 Subject: [PATCH] Update test metafunction to use `boost::declval` instead of using null pointers --- test/helpers/metafunctions.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/helpers/metafunctions.hpp b/test/helpers/metafunctions.hpp index f5f13851..137aeca1 100644 --- a/test/helpers/metafunctions.hpp +++ b/test/helpers/metafunctions.hpp @@ -8,6 +8,7 @@ #include #include +#include namespace test { template @@ -23,7 +24,9 @@ namespace test { BOOST_STATIC_CONSTANT(bool, value = sizeof(long) == sizeof(flip( - ((Container*)0)->insert(*(typename Container::value_type*)0)))); + (boost::declval()) + ->insert( + boost::declval())))); }; }