forked from boostorg/container
Support types with std::allocator_arg_at with boost::container::scoped_allocator_adaptor
This commit is contained in:
1 parent
a322203a89
commit
69324174c7
8 files changed
+373
-24
No files matched your search
@@ -40,6 +40,13 @@ struct bool_ : integral_constant<bool, C_>
|
||||
operator bool() const { return bool_::value; }
|
||||
};
|
||||
|
||||
template< unsigned V_ >
|
||||
struct unsigned_ : integral_constant<unsigned, V_>
|
||||
{
|
||||
static const unsigned value = V_;
|
||||
operator unsigned() const { return unsigned_::value; }
|
||||
};
|
||||
|
||||
typedef bool_<true> true_;
|
||||
typedef bool_<false> false_;
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#ifndef BOOST_CONTAINER_DETAIL_ALLOCATOR_ARG_HPP
|
||||
#define BOOST_CONTAINER_DETAIL_ALLOCATOR_ARG_HPP
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2015. 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/container for documentation.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/container/detail/std_fwd.hpp>
|
||||
|
||||
namespace boost { namespace container {
|
||||
|
||||
template<int Dummy = 0>
|
||||
struct alloc_arg
|
||||
{
|
||||
static const std::allocator_arg_t &get() { return *palloc_arg; }
|
||||
static std::allocator_arg_t *palloc_arg;
|
||||
};
|
||||
|
||||
template<int Dummy>
|
||||
std::allocator_arg_t *alloc_arg<Dummy>::palloc_arg;
|
||||
|
||||
}} //namespace boost { namespace container {
|
||||
|
||||
#endif //BOOST_CONTAINER_DETAIL_ALLOCATOR_ARG_HPP
|
||||
@@ -52,6 +52,8 @@ struct random_access_iterator_tag;
|
||||
template<class Container>
|
||||
class insert_iterator;
|
||||
|
||||
struct allocator_arg_t;
|
||||
|
||||
BOOST_CONTAINER_STD_NS_END
|
||||
|
||||
#ifdef BOOST_CONTAINER_CLANG_INLINE_STD_NS
|
||||
|
||||
Reference in new issue
Block a user