/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/default_allocator.hpp (3333B)
/* Copyright 2019 Glen Joseph Fernandes (glenjofe@gmail.com) Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_CORE_DEFAULT_ALLOCATOR_HPP #define BOOST_CORE_DEFAULT_ALLOCATOR_HPP #include #include namespace boost { #if defined(BOOST_NO_EXCEPTIONS) BOOST_NORETURN void throw_exception(const std::exception&); #endif namespace default_ { struct true_type { typedef bool value_type; typedef true_type type; BOOST_STATIC_CONSTANT(bool, value = true); BOOST_CONSTEXPR operator bool() const BOOST_NOEXCEPT { return true; } BOOST_CONSTEXPR bool operator()() const BOOST_NOEXCEPT { return true; } }; template struct add_reference { typedef T& type; }; template<> struct add_reference { typedef void type; }; template<> struct add_reference { typedef const void type; }; template struct default_allocator { typedef T value_type; typedef T* pointer; typedef const T* const_pointer; typedef typename add_reference::type reference; typedef typename add_reference::type const_reference; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef true_type propagate_on_container_move_assignment; typedef true_type is_always_equal; template struct rebind { typedef default_allocator other; }; #if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) default_allocator() = default; #else BOOST_CONSTEXPR default_allocator() BOOST_NOEXCEPT { } #endif template BOOST_CONSTEXPR default_allocator(const default_allocator&) BOOST_NOEXCEPT { } BOOST_CONSTEXPR std::size_t max_size() const BOOST_NOEXCEPT { return static_cast(-1) / (2 < sizeof(T) ? sizeof(T) : 2); } #if !defined(BOOST_NO_EXCEPTIONS) T* allocate(std::size_t n) { if (n > max_size()) { throw std::bad_alloc(); } return static_cast(::operator new(sizeof(T) * n)); } void deallocate(T* p, std::size_t) { ::operator delete(p); } #else T* allocate(std::size_t n) { if (n > max_size()) { boost::throw_exception(std::bad_alloc()); } void* p = ::operator new(sizeof(T) * n, std::nothrow); if (!p) { boost::throw_exception(std::bad_alloc()); } return static_cast(p); } void deallocate(T* p, std::size_t) { ::operator delete(p, std::nothrow); } #endif #if (defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION < 60000) || \ defined(BOOST_NO_CXX11_ALLOCATOR) template void construct(U* p, const V& v) { ::new(p) U(v); } template void destroy(U* p) { p->~U(); (void)p; } #endif }; template BOOST_CONSTEXPR inline bool operator==(const default_allocator&, const default_allocator&) BOOST_NOEXCEPT { return true; } template BOOST_CONSTEXPR inline bool operator!=(const default_allocator&, const default_allocator&) BOOST_NOEXCEPT { return false; } } /* default_ */ using default_::default_allocator; } /* boost */ #endif