/usr/include/boost/core
NameSizeModeActions
addressof.hpp61530644editdlrm
allocator_access.hpp159440644editdlrm
alloc_construct.hpp34360644editdlrm
checked_delete.hpp16770644editdlrm
default_allocator.hpp33330644editdlrm
demangle.hpp30340644editdlrm
empty_value.hpp33240644editdlrm
enable_if.hpp33150644editdlrm
exchange.hpp9110644editdlrm
explicit_operator_bool.hpp53540644editdlrm
first_scalar.hpp8130644editdlrm
ignore_unused.hpp19760644editdlrm
is_same.hpp7930644editdlrm
lightweight_test.hpp184430644editdlrm
lightweight_test_trait.hpp39730644editdlrm
noinit_adaptor.hpp17910644editdlrm
noncopyable.hpp19110644editdlrm
no_exceptions_support.hpp18720644editdlrm
null_deleter.hpp12320644editdlrm
nvp.hpp10000644editdlrm
pointer_traits.hpp50720644editdlrm
quick_exit.hpp10980644editdlrm
ref.hpp59760644editdlrm
scoped_enum.hpp78800644editdlrm
swap.hpp21230644editdlrm
typeinfo.hpp31510644editdlrm
uncaught_exceptions.hpp68190644editdlrm
underlying_type.hpp22050644editdlrm
use_default.hpp3000644editdlrm
Edit: /usr/include/boost/core/lightweight_test_trait.hpp (3973B)
#ifndef BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP #define BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) # pragma once #endif // boost/core/lightweight_test_trait.hpp // // BOOST_TEST_TRAIT_TRUE, BOOST_TEST_TRAIT_FALSE, BOOST_TEST_TRAIT_SAME // // Copyright 2014 Peter Dimov // // Copyright 2019 Glen Joseph Fernandes // (glenjofe@gmail.com) // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt #include #include #include #include namespace boost { namespace detail { template struct test_print { }; template inline std::ostream& operator<<(std::ostream& o, test_print) { return o << boost::core::demangled_name(BOOST_CORE_TYPEID(T)); } template inline std::ostream& operator<<(std::ostream& o, test_print) { return o << test_print(); } template inline std::ostream& operator<<(std::ostream& o, test_print) { return o << test_print() << " const"; } template inline std::ostream& operator<<(std::ostream& o, test_print) { return o << test_print() << " volatile"; } template inline std::ostream& operator<<(std::ostream& o, test_print) { return o << test_print() << " const volatile"; } template inline std::ostream& operator<<(std::ostream& o, test_print) { return o << test_print(); } template inline std::ostream& operator<<(std::ostream& o, test_print) { return o << test_print() << " &"; } #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template inline std::ostream& operator<<(std::ostream& o, test_print) { return o << test_print() << " &&"; } #endif template< class T > inline void test_trait_impl( char const * trait, void (*)( T ), bool expected, char const * file, int line, char const * function ) { if( T::value == expected ) { test_results(); } else { BOOST_LIGHTWEIGHT_TEST_OSTREAM << file << "(" << line << "): predicate '" << trait << "' [" << boost::core::demangled_name( BOOST_CORE_TYPEID(T) ) << "]" << " test failed in function '" << function << "' (should have been " << ( expected? "true": "false" ) << ")" << std::endl; ++test_results().errors(); } } template inline bool test_trait_same_impl_( T ) { return T::value; } template inline void test_trait_same_impl( char const * types, boost::core::is_same same, char const * file, int line, char const * function ) { if( test_trait_same_impl_( same ) ) { test_results(); } else { BOOST_LIGHTWEIGHT_TEST_OSTREAM << file << "(" << line << "): test 'is_same<" << types << ">'" << " failed in function '" << function << "' ('" << test_print() << "' != '" << test_print() << "')" << std::endl; ++test_results().errors(); } } } // namespace detail } // namespace boost #define BOOST_TEST_TRAIT_TRUE(type) ( ::boost::detail::test_trait_impl(#type, (void(*)type)0, true, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) ) #define BOOST_TEST_TRAIT_FALSE(type) ( ::boost::detail::test_trait_impl(#type, (void(*)type)0, false, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) ) #if defined(__GNUC__) // ignoring -Wvariadic-macros with #pragma doesn't work under GCC # pragma GCC system_header #endif #define BOOST_TEST_TRAIT_SAME(...) ( ::boost::detail::test_trait_same_impl(#__VA_ARGS__, ::boost::core::is_same<__VA_ARGS__>(), __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) ) #endif // #ifndef BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP