mirror of
https://github.com/boostorg/container.git
synced 2025-08-03 22:44:26 +02:00
Removed unneeded includes. Refactores std forward declarations
This commit is contained in:
@@ -41,65 +41,24 @@
|
|||||||
//!
|
//!
|
||||||
//! And finally it defines the following types
|
//! And finally it defines the following types
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Standard predeclarations
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||||
|
|
||||||
|
//Std forward declarations
|
||||||
|
#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
|
||||||
|
#include <boost/container/detail/std_fwd.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace boost{
|
namespace boost{
|
||||||
namespace intrusive{
|
namespace intrusive{
|
||||||
//Create namespace to avoid compilation errors
|
//Create namespace to avoid compilation errors
|
||||||
}}
|
}}
|
||||||
|
|
||||||
namespace boost{ namespace container{ namespace container_detail{
|
namespace boost{ namespace container{ namespace container_detail{
|
||||||
|
namespace bi = boost::intrusive;
|
||||||
namespace bi = boost::intrusive;
|
|
||||||
|
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
# if defined(__clang__) && defined(_LIBCPP_VERSION)
|
|
||||||
#define BOOST_CONTAINER_CLANG_INLINE_STD_NS
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#pragma GCC diagnostic ignored "-Wc++11-extensions"
|
|
||||||
|
|
||||||
#define BOOST_CONTAINER_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD
|
|
||||||
#define BOOST_CONTAINER_STD_NS_END _LIBCPP_END_NAMESPACE_STD
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(BOOST_CONTAINER_STD_NS_BEG)
|
|
||||||
|
|
||||||
#define BOOST_CONTAINER_STD_NS_BEG namespace std{
|
|
||||||
#define BOOST_CONTAINER_STD_NS_END }
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
BOOST_CONTAINER_STD_NS_BEG
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
class allocator;
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
struct less;
|
|
||||||
|
|
||||||
template<class T1, class T2>
|
|
||||||
struct pair;
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
struct char_traits;
|
|
||||||
|
|
||||||
BOOST_CONTAINER_STD_NS_END
|
|
||||||
|
|
||||||
#ifdef BOOST_CONTAINER_CLANG_INLINE_STD_NS
|
|
||||||
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#undef BOOST_CONTAINER_CLANG_INLINE_STD_NS
|
|
||||||
|
|
||||||
#endif //BOOST_CONTAINER_CLANG_INLINE_STD_NS
|
|
||||||
|
|
||||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
@@ -32,9 +32,8 @@
|
|||||||
#include <boost/container/detail/mpl.hpp>
|
#include <boost/container/detail/mpl.hpp>
|
||||||
#include <boost/container/detail/destroyers.hpp>
|
#include <boost/container/detail/destroyers.hpp>
|
||||||
#include <boost/container/detail/memory_util.hpp>
|
#include <boost/container/detail/memory_util.hpp>
|
||||||
#include <boost/container/detail/allocator_version_traits.hpp>
|
|
||||||
#include <boost/core/no_exceptions_support.hpp>
|
|
||||||
#include <boost/container/detail/placement_new.hpp>
|
#include <boost/container/detail/placement_new.hpp>
|
||||||
|
#include <boost/core/no_exceptions_support.hpp>
|
||||||
|
|
||||||
#ifndef BOOST_CONTAINER_PERFECT_FORWARDING
|
#ifndef BOOST_CONTAINER_PERFECT_FORWARDING
|
||||||
#include <boost/container/detail/preprocessor.hpp>
|
#include <boost/container/detail/preprocessor.hpp>
|
||||||
|
@@ -32,10 +32,7 @@
|
|||||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||||
#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
|
#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
|
||||||
#include <boost/preprocessor/repetition/enum_trailing.hpp>
|
#include <boost/preprocessor/repetition/enum_trailing.hpp>
|
||||||
#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
|
|
||||||
#include <boost/preprocessor/repetition/enum_shifted.hpp>
|
|
||||||
#include <boost/preprocessor/repetition/repeat.hpp>
|
#include <boost/preprocessor/repetition/repeat.hpp>
|
||||||
#include <boost/preprocessor/logical/not.hpp>
|
|
||||||
#include <boost/preprocessor/arithmetic/sub.hpp>
|
#include <boost/preprocessor/arithmetic/sub.hpp>
|
||||||
#include <boost/preprocessor/arithmetic/add.hpp>
|
#include <boost/preprocessor/arithmetic/add.hpp>
|
||||||
#include <boost/preprocessor/iteration/iterate.hpp>
|
#include <boost/preprocessor/iteration/iterate.hpp>
|
||||||
|
59
include/boost/container/detail/std_fwd.hpp
Normal file
59
include/boost/container/detail/std_fwd.hpp
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// (C) Copyright Ion Gaztanaga 2014-2014. 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.
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
|
||||||
|
#define BOOST_CONTAINER_DETAIL_STD_FWD_HPP
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
# pragma once
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Standard predeclarations
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#if defined(__clang__) && defined(_LIBCPP_VERSION)
|
||||||
|
#define BOOST_CONTAINER_CLANG_INLINE_STD_NS
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wc++11-extensions"
|
||||||
|
#define BOOST_CONTAINER_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD
|
||||||
|
#define BOOST_CONTAINER_STD_NS_END _LIBCPP_END_NAMESPACE_STD
|
||||||
|
#else
|
||||||
|
#define BOOST_CONTAINER_STD_NS_BEG namespace std{
|
||||||
|
#define BOOST_CONTAINER_STD_NS_END }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
BOOST_CONTAINER_STD_NS_BEG
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
class allocator;
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
struct less;
|
||||||
|
|
||||||
|
template<class T1, class T2>
|
||||||
|
struct pair;
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
struct char_traits;
|
||||||
|
|
||||||
|
struct input_iterator_tag;
|
||||||
|
struct forward_iterator_tag;
|
||||||
|
struct bidirectional_iterator_tag;
|
||||||
|
struct random_access_iterator_tag;
|
||||||
|
|
||||||
|
BOOST_CONTAINER_STD_NS_END
|
||||||
|
|
||||||
|
#ifdef BOOST_CONTAINER_CLANG_INLINE_STD_NS
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#undef BOOST_CONTAINER_CLANG_INLINE_STD_NS
|
||||||
|
#endif //BOOST_CONTAINER_CLANG_INLINE_STD_NS
|
||||||
|
|
||||||
|
#endif //#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
|
@@ -22,8 +22,6 @@
|
|||||||
#include <boost/container/detail/config_begin.hpp>
|
#include <boost/container/detail/config_begin.hpp>
|
||||||
#include <boost/container/detail/workaround.hpp>
|
#include <boost/container/detail/workaround.hpp>
|
||||||
|
|
||||||
#include <boost/move/utility_core.hpp>
|
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace container {
|
namespace container {
|
||||||
namespace container_detail {
|
namespace container_detail {
|
||||||
@@ -101,6 +99,15 @@ struct remove_reference<T&&>
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
} // namespace container_detail {
|
||||||
|
} //namespace container {
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
class rv;
|
||||||
|
|
||||||
|
namespace container {
|
||||||
|
namespace container_detail {
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
struct remove_reference< ::boost::rv<T> >
|
struct remove_reference< ::boost::rv<T> >
|
||||||
{
|
{
|
||||||
@@ -206,6 +213,21 @@ struct remove_ref_const
|
|||||||
typedef typename remove_const< typename remove_reference<T>::type >::type type;
|
typedef typename remove_const< typename remove_reference<T>::type >::type type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
struct make_unsigned
|
||||||
|
{
|
||||||
|
typedef T type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <> struct make_unsigned<bool> {};
|
||||||
|
template <> struct make_unsigned<signed char> {typedef unsigned char type;};
|
||||||
|
template <> struct make_unsigned<signed short> {typedef unsigned short type;};
|
||||||
|
template <> struct make_unsigned<signed int> {typedef unsigned int type;};
|
||||||
|
template <> struct make_unsigned<signed long> {typedef unsigned long type;};
|
||||||
|
#ifdef BOOST_HAS_LONG_LONG
|
||||||
|
template <> struct make_unsigned<signed long long> {typedef unsigned long long type;};
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace container_detail
|
} // namespace container_detail
|
||||||
} //namespace container {
|
} //namespace container {
|
||||||
} //namespace boost {
|
} //namespace boost {
|
||||||
|
@@ -292,7 +292,7 @@ namespace container_detail {
|
|||||||
|
|
||||||
#else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
#else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||||
|
|
||||||
//Without variadic templates, we need to use de preprocessor to generate
|
//Without variadic templates, we need to use the preprocessor to generate
|
||||||
//some specializations.
|
//some specializations.
|
||||||
|
|
||||||
#define BOOST_CONTAINER_MAX_IS_CONSTRUCTIBLE_PARAMETERS \
|
#define BOOST_CONTAINER_MAX_IS_CONSTRUCTIBLE_PARAMETERS \
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
#include <boost/core/no_exceptions_support.hpp>
|
#include <boost/core/no_exceptions_support.hpp>
|
||||||
#include <boost/container/detail/node_alloc_holder.hpp>
|
#include <boost/container/detail/node_alloc_holder.hpp>
|
||||||
#include <boost/intrusive/slist.hpp>
|
#include <boost/intrusive/slist.hpp>
|
||||||
|
#include <iterator>
|
||||||
|
|
||||||
|
|
||||||
#if defined(BOOST_CONTAINER_PERFECT_FORWARDING) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
#if defined(BOOST_CONTAINER_PERFECT_FORWARDING) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||||
|
@@ -257,6 +257,9 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\..\boost\container\detail\singleton.hpp">
|
RelativePath="..\..\..\..\boost\container\detail\singleton.hpp">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\..\boost\container\detail\std_fwd.hpp">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\..\boost\container\detail\transform_iterator.hpp">
|
RelativePath="..\..\..\..\boost\container\detail\transform_iterator.hpp">
|
||||||
</File>
|
</File>
|
||||||
|
@@ -13,7 +13,6 @@
|
|||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <boost/container/detail/mpl.hpp>
|
#include <boost/container/detail/mpl.hpp>
|
||||||
#include <boost/move/utility_core.hpp>
|
#include <boost/move/utility_core.hpp>
|
||||||
#include <boost/type_traits/integral_constant.hpp>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
using namespace boost::container;
|
using namespace boost::container;
|
||||||
|
@@ -7,10 +7,8 @@
|
|||||||
// See http://www.boost.org/libs/container for documentation.
|
// See http://www.boost.org/libs/container for documentation.
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
#include <boost/container/detail/config_begin.hpp>
|
|
||||||
#include <algorithm>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
@@ -160,7 +158,7 @@ int main()
|
|||||||
positions[i] = 0u;
|
positions[i] = 0u;
|
||||||
}
|
}
|
||||||
for(std::size_t i = 0, max = vector_int2.size(); i != max; ++i){
|
for(std::size_t i = 0, max = vector_int2.size(); i != max; ++i){
|
||||||
vector_int2[i] = i;
|
vector_int2[i] = (int)i;
|
||||||
}
|
}
|
||||||
|
|
||||||
vector_int.insert(vector_int.begin(), 999);
|
vector_int.insert(vector_int.begin(), 999);
|
||||||
@@ -254,4 +252,3 @@ int main()
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
#include <boost/container/detail/config_end.hpp>
|
|
||||||
|
Reference in New Issue
Block a user