Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:30:22

0001 //////////////////////////////////////////////////////////////////////////////
0002 //
0003 // (C) Copyright Ion Gaztanaga 2015-2015. Distributed under the Boost
0004 // Software License, Version 1.0. (See accompanying file
0005 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // See http://www.boost.org/libs/container for documentation.
0008 //
0009 //////////////////////////////////////////////////////////////////////////////
0010 
0011 #ifndef BOOST_CONTAINER_USES_ALLOCATOR_FWD_HPP
0012 #define BOOST_CONTAINER_USES_ALLOCATOR_FWD_HPP
0013 
0014 #include <boost/container/detail/workaround.hpp>
0015 #include <boost/container/detail/std_fwd.hpp>
0016 
0017 //! \file
0018 //!   This header forward declares boost::container::constructible_with_allocator_prefix,
0019 //!   boost::container::constructible_with_allocator_suffix and
0020 //!   boost::container::uses_allocator. Also defines the following types:
0021 
0022 namespace boost {
0023 namespace container {
0024 
0025 #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
0026 
0027    template <int Dummy = 0>
0028    struct std_allocator_arg_holder
0029    {
0030       static ::std::allocator_arg_t *dummy;
0031    };
0032 
0033    template <int Dummy>                                             //Silence null-reference compiler warnings
0034    ::std::allocator_arg_t *std_allocator_arg_holder<Dummy>::dummy = reinterpret_cast< ::std::allocator_arg_t * >(0x1234);
0035 
0036 typedef const std::allocator_arg_t & allocator_arg_t;
0037 
0038 #else
0039 
0040 //! The allocator_arg_t struct is an empty structure type used as a unique type to
0041 //! disambiguate constructor and function overloading. Specifically, several types
0042 //! have constructors with allocator_arg_t as the first argument, immediately followed
0043 //! by an argument of a type that satisfies Allocator requirements
0044 typedef unspecified allocator_arg_t;
0045 
0046 #endif   //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
0047 
0048 //! The `erased_type` struct is an empty struct that serves as a placeholder for a type
0049 //! T in situations where the actual type T is determined at runtime. For example,
0050 //! the nested type, `allocator_type`, is an alias for `erased_type` in classes that
0051 //! use type-erased allocators.
0052 struct erased_type {};
0053 
0054 //! A instance of type
0055 //! allocator_arg_t
0056 static allocator_arg_t allocator_arg = BOOST_CONTAINER_DOC1ST(unspecified, *std_allocator_arg_holder<>::dummy);
0057 
0058 // @cond
0059 
0060 template <class T>
0061 struct constructible_with_allocator_suffix;
0062 
0063 template <class T>
0064 struct constructible_with_allocator_prefix;
0065 
0066 template <typename T, typename Allocator>
0067 struct uses_allocator;
0068 
0069 // @endcond
0070 
0071 }} // namespace boost { namespace container {
0072 
0073 #endif   //BOOST_CONTAINER_USES_ALLOCATOR_HPP