diff --git a/doc/default_allocator.qbk b/doc/default_allocator.qbk index f92e51b..74fa427 100644 --- a/doc/default_allocator.qbk +++ b/doc/default_allocator.qbk @@ -27,6 +27,19 @@ detects the absence of these members to provide more optimal construction. [endsect] +[section Examples] + +The following snippet shows the use of this allocator as the default allocator +for a container. + +``` +template, + class Allocator = boost::default_allocator > +class FlatSet; +``` + +[endsect] + [section Reference] ``` @@ -64,7 +77,7 @@ constexpr bool operator==(const default_allocator&, const default_allocator&) noexcept; template -constexpr operator!=(const default_allocator&, +constexpr bool operator!=(const default_allocator&, const default_allocator&) noexcept; } /* boost */ @@ -73,7 +86,6 @@ constexpr operator!=(const default_allocator&, [section Members] [variablelist - [[`constexpr std::size_t max_size() const noexcept;`] [[variablelist [[Returns][The largest value `N` for which the call `allocate(N)` might diff --git a/include/boost/core/default_allocator.hpp b/include/boost/core/default_allocator.hpp index 20bf39e..a202f66 100644 --- a/include/boost/core/default_allocator.hpp +++ b/include/boost/core/default_allocator.hpp @@ -12,9 +12,7 @@ Distributed under the Boost Software License, Version 1.0. #include #include -#if defined(BOOST_NO_CXX11_ALLOCATOR) -#define BOOST_CORE_NO_CXX11_ALLOCATOR -#elif defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION < 60000 +#if defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION < 60000 #define BOOST_CORE_NO_CXX11_ALLOCATOR #endif @@ -122,7 +120,7 @@ struct default_allocator { } #endif -#if defined(BOOST_CORE_NO_CXX11_ALLOCATOR) +#if defined(BOOST_NO_CXX11_ALLOCATOR) || defined(BOOST_CORE_NO_CXX11_ALLOCATOR) template void construct(U* p, const V& v) { ::new(p) U(v);