Changes during Git migration:

- Added Extended Allocator support for Boost.Container.
- Improved Doxygen generated reference
- Fixed ticket #9338 ("VS2005 compiler errors in swap() definition after including container/memory_util.hpp")
This commit is contained in:
Ion Gaztañaga committed 2013-12-23 10:47:20 +01:00
1 parent b1d4ef3a2e
commit f2947c115e
95 files changed
+2248 -2692

No files matched your search

+1 -1
View File
@@ -21,7 +21,7 @@ rule test_all
for local fileb in [ glob *.cpp ]
{
all_rules += [ run $(fileb) /boost/timer//boost_timer
all_rules += [ run $(fileb) /boost/timer//boost_timer /boost/container//boost_container
: # additional args
: # test-files
: # requirements
+13 -9
View File
@@ -10,6 +10,7 @@
#include "boost/container/set.hpp"
#include "boost/container/flat_set.hpp"
#include "boost/container/allocator.hpp"
#include <set>
#include <vector>
#include <iostream>
@@ -22,9 +23,9 @@ using boost::timer::cpu_times;
using boost::timer::nanosecond_type;
#ifdef NDEBUG
static const std::size_t N = 5000;
#else
static const std::size_t N = 500;
#else
static const std::size_t N = 50;
#endif
void compare_times(cpu_times time_numerator, cpu_times time_denominator){
@@ -334,15 +335,18 @@ int main()
{
//set vs std::set
launch_tests< boost::container::set<int> , std::set<int> >
("boost::container::set<int>", "std::set<int>");/*
("boost::container::set<int>", "std::set<int>");
//set vs set<..., allocator_v2>
launch_tests< boost::container::set<int> , boost::container::set<int, std::less<int>, boost::container::allocator<int> > >
("boost::container::set<int>", "boost::container::set<int, ..., boost::container::allocator<int>" );
//multiset vs std::set
launch_tests< boost::container::multiset<int> , std::multiset<int> >
("boost::container::multiset<int>", "std::multiset<int>");*/
("boost::container::multiset<int>", "std::multiset<int>");
//flat_set vs set
//launch_tests< boost::container::flat_set<int> , boost::container::set<int> >
//("boost::container::flat_set<int>", "boost::container::set<int>");
launch_tests< boost::container::flat_set<int> , boost::container::set<int> >
("boost::container::flat_set<int>", "boost::container::set<int>");
//flat_multiset vs multiset
//launch_tests< boost::container::flat_multiset<int> , boost::container::multiset<int> >
//("boost::container::flat_multiset<int>", "boost::container::multiset<int>");
return 1;
launch_tests< boost::container::flat_multiset<int> , boost::container::multiset<int> >
("boost::container::flat_multiset<int>", "boost::container::multiset<int>");
return 0;
}
+4 -4
View File
@@ -4,8 +4,8 @@
// @date Aug 14, 2011
// @author Andrew Hundt <ATHundt@gmail.com>
//
// (C) 2011-2012 Andrew Hundt <ATHundt@gmail.com>
// (C) 2013 Ion Gaztanaga
// (C) 2011-2013 Andrew Hundt <ATHundt@gmail.com>
// (C) 2013-2013 Ion Gaztanaga
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -28,7 +28,7 @@ using boost::timer::cpu_times;
using boost::timer::nanosecond_type;
#ifdef NDEBUG
static const std::size_t N = 1000;
static const std::size_t N = 300;
#else
static const std::size_t N = 100;
#endif
@@ -141,5 +141,5 @@ int main()
}catch(std::exception e){
std::cout << e.what();
}
return 1;
return 0;
}
+10 -10
View File
@@ -10,7 +10,7 @@
#ifndef BOOST_CONTAINER_DETAIL_VARRAY_HPP
#define BOOST_CONTAINER_DETAIL_VARRAY_HPP
#if (defined _MSC_VER)
#if defined(_MSC_VER)
# pragma once
#endif
@@ -19,8 +19,8 @@
#include <boost/container/detail/preprocessor.hpp>
#include "varray_util.hpp"
#include "varray_concept.hpp"
#include <boost/iterator/iterator_concepts.hpp>
//#include "varray_concept.hpp"
//#include <boost/iterator/iterator_concepts.hpp>
#ifndef BOOST_NO_EXCEPTIONS
#include <stdexcept>
@@ -229,7 +229,7 @@ class varray
(varray)
);
BOOST_CONCEPT_ASSERT((concept::VArrayStrategy<Strategy>));
//BOOST_CONCEPT_ASSERT((concept::VArrayStrategy<Strategy>));
typedef boost::aligned_storage<
sizeof(Value[Capacity]),
@@ -353,7 +353,7 @@ public:
varray(Iterator first, Iterator last)
: m_size(0)
{
BOOST_CONCEPT_ASSERT((boost_concepts::ForwardTraversal<Iterator>)); // Make sure you passed a ForwardIterator
//BOOST_CONCEPT_ASSERT((boost_concepts::ForwardTraversal<Iterator>)); // Make sure you passed a ForwardIterator
this->assign(first, last); // may throw
}
@@ -890,7 +890,7 @@ public:
template <typename Iterator>
iterator insert(iterator position, Iterator first, Iterator last)
{
BOOST_CONCEPT_ASSERT((boost_concepts::ForwardTraversal<Iterator>)); // Make sure you passed a ForwardIterator
//BOOST_CONCEPT_ASSERT((boost_concepts::ForwardTraversal<Iterator>)); // Make sure you passed a ForwardIterator
typedef typename boost::iterator_traversal<Iterator>::type traversal;
this->insert_dispatch(position, first, last, traversal());
@@ -975,7 +975,7 @@ public:
template <typename Iterator>
void assign(Iterator first, Iterator last)
{
BOOST_CONCEPT_ASSERT((boost_concepts::ForwardTraversal<Iterator>)); // Make sure you passed a ForwardIterator
//BOOST_CONCEPT_ASSERT((boost_concepts::ForwardTraversal<Iterator>)); // Make sure you passed a ForwardIterator
typedef typename boost::iterator_traversal<Iterator>::type traversal;
this->assign_dispatch(first, last, traversal()); // may throw
@@ -1728,7 +1728,7 @@ private:
template <typename Iterator>
void insert_dispatch(iterator position, Iterator first, Iterator last, boost::random_access_traversal_tag const&)
{
BOOST_CONCEPT_ASSERT((boost_concepts::RandomAccessTraversal<Iterator>)); // Make sure you passed a RandomAccessIterator
//BOOST_CONCEPT_ASSERT((boost_concepts::RandomAccessTraversal<Iterator>)); // Make sure you passed a RandomAccessIterator
errh::check_iterator_end_eq(*this, position);
@@ -2015,7 +2015,7 @@ public:
void insert(iterator, Iterator first, Iterator last)
{
// TODO - add MPL_ASSERT, check if Iterator is really an iterator
typedef typename boost::iterator_traversal<Iterator>::type traversal;
//typedef typename boost::iterator_traversal<Iterator>::type traversal;
errh::check_capacity(*this, std::distance(first, last)); // may throw
}
@@ -2039,7 +2039,7 @@ public:
void assign(Iterator first, Iterator last)
{
// TODO - add MPL_ASSERT, check if Iterator is really an iterator
typedef typename boost::iterator_traversal<Iterator>::type traversal;
//typedef typename boost::iterator_traversal<Iterator>::type traversal;
errh::check_capacity(*this, std::distance(first, last)); // may throw
}
-7
View File
@@ -566,13 +566,6 @@ template <typename DisableTrivialInit, typename I, typename P>
inline
void construct(DisableTrivialInit const&, I pos, BOOST_RV_REF(P) p)
{
typedef typename
::boost::mpl::and_<
is_corresponding_value<I, P>,
::boost::has_trivial_copy<P>
>::type
use_memcpy;
typedef typename boost::iterator_value<I>::type V;
new (static_cast<void*>(boost::addressof(*pos))) V(::boost::move(p)); // may throw
}
+2 -1
View File
@@ -10,13 +10,14 @@
#ifndef BOOST_CONTAINER_VARRAY_HPP
#define BOOST_CONTAINER_VARRAY_HPP
#if (defined _MSC_VER)
#if defined(_MSC_VER)
# pragma once
#endif
#include <boost/container/detail/config_begin.hpp>
#include "detail/varray.hpp"
#include <boost/move/move.hpp>
namespace boost { namespace container {