Merged from trunk

[SVN r79559]
This commit is contained in:
Ion Gaztañaga committed 2012-07-16 09:04:33 +00:00
1 parent bd7e6c3fd9
commit d535f151e7
9 files changed
+40 -72

No files matched your search

+1 -1
View File
@@ -111,7 +111,7 @@ class dummy_test_allocator
dummy_test_allocator(const dummy_test_allocator<T2> &)
{}
pointer address(reference value)
pointer address(reference value)
{ return pointer(container_detail::addressof(value)); }
const_pointer address(const_reference value) const
+1 -1
View File
@@ -108,7 +108,7 @@ class expand_bwd_test_allocator
{ return m_size; }
friend void swap(self_t &alloc1, self_t &alloc2)
{
{
container_detail::do_swap(alloc1.mp_buffer, alloc2.mp_buffer);
container_detail::do_swap(alloc1.m_size, alloc2.m_size);
container_detail::do_swap(alloc1.m_offset, alloc2.m_offset);
+2 -54
View File
@@ -26,7 +26,7 @@ using namespace boost::container;
namespace boost {
namespace container {
/*
//Explicit instantiation to detect compilation errors
//flat_map
@@ -115,7 +115,7 @@ template class flat_multiset
, std::less<test::movable_and_copyable_int>
, std::allocator<test::movable_and_copyable_int>
>;
*/
}} //boost::container
@@ -627,55 +627,3 @@ int main()
}
#include <boost/container/detail/config_end.hpp>
/*
#include <boost/container/map.hpp>
#include <boost/container/flat_map.hpp>
#include <boost/container/vector.hpp>
#include <boost/move/move.hpp>
#include <iostream>
struct Request
{
Request() {};
//Move semantics...
Request(BOOST_RV_REF(Request) r) : rvals() //Move constructor
{
rvals.swap(r.rvals);
};
Request& operator=(BOOST_RV_REF(Request) r) //Move assignment
{
if (this != &r){
rvals.swap(r.rvals);
}
return *this;
};
// Values I want to be moved, not copied.
boost::container::vector<int> rvals;
private:
// Mark this class movable but not copyable
BOOST_MOVABLE_BUT_NOT_COPYABLE(Request)
};
typedef boost::container::flat_map<int, Request> Requests;
//typedef boost::container::map<int, Request> Requests2;
int
main() {
Requests req;
Requests::value_type v;
std::pair<Requests::iterator, bool> ret = req.insert( boost::move(v));
//std::cout << "Insert success for req: " << ret.second << std::endl;
//Requests2 req2;
//std::pair<Requests::iterator, bool> ret2 = req2.insert( Requests2::value_type( 7, Request() ) );
//std::cout << "Insert success for req2: " << ret2.second << std::endl;
return 0;
}
*/
+8 -7
View File
@@ -8,20 +8,15 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/container/detail/config_begin.hpp>
#include <boost/container/scoped_allocator.hpp>
#include <boost/container/scoped_allocator_fwd.hpp>
#include <cstddef>
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/container/detail/function_detector.hpp>
#include <boost/container/detail/mpl.hpp>
#include <boost/move/move.hpp>
#include <boost/type_traits/integral_constant.hpp>
#include <memory>
#include <boost/container/vector.hpp>
#include <boost/container/detail/pair.hpp>
using namespace boost::container;
template<class T, unsigned int Id, bool Propagate = false>
class test_allocator
{
@@ -242,6 +237,12 @@ struct constructible_with_allocator_suffix
} //namespace boost {
#include <boost/container/scoped_allocator.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/vector.hpp>
#include <boost/container/detail/pair.hpp>
int main()
{
typedef test_allocator<tagged_integer<0>, 0> OuterAlloc;
+3 -3
View File
@@ -30,13 +30,13 @@ namespace boost {
namespace container {
//Explicit instantiation to detect compilation errors
template class stable_vector<test::movable_and_copyable_int,
template class stable_vector<test::movable_and_copyable_int,
test::dummy_test_allocator<test::movable_and_copyable_int> >;
template class stable_vector<test::movable_and_copyable_int,
template class stable_vector<test::movable_and_copyable_int,
test::simple_allocator<test::movable_and_copyable_int> >;
template class stable_vector<test::movable_and_copyable_int,
template class stable_vector<test::movable_and_copyable_int,
std::allocator<test::movable_and_copyable_int> >;
}}
+1 -1
View File
@@ -71,7 +71,7 @@ inline bool in_range(const boost::posix_time::ptime& xt, int secs=1)
boost::xtime xsecs(int secs)
{
boost::xtime ret;
boost::xtime_get(&ret, boost::TIME_UTC_);
boost::xtime_get(&ret, boost::TIME_UTC);
ret.sec += secs;
return ret;
}