Skip to content

Commit fa8f586

Browse files
committed
add boost::test
1 parent 3d55cb1 commit fa8f586

File tree

627 files changed

+60484
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

627 files changed

+60484
-3
lines changed

deps/boost-1.47.0/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ tools/build/v2/bjam:
1717
cd tools/build/v2 && ./bootstrap.sh
1818

1919
install: tools/build/v2/bjam
20-
tools/build/v2/bjam -d0 --v2 cxxflags="-fPIC -fvisibility=hidden" --prefix=../../build/deps --buildid=riak_client --layout=tagged link=static threading=multi install
20+
tools/build/v2/bjam --v2 cxxflags="-fPIC -fvisibility=hidden" --prefix=../../build/deps --buildid=riak_client --layout=tagged --without-test link=static threading=multi install
21+
22+
test: tools/build/v2/bjam
23+
tools/build/v2/bjam --v2 cxxflags="-fPIC -fvisibility=hidden" --prefix=../../build/deps --buildid=riak_client --layout=tagged --with-test link=static threading=multi install
2124

2225
clean:
2326
tools/build/v2/bjam --v2 clean && rm -Rf ../../build/deps/include/boost && rm -Rf ../../build/deps/lib/libriakboost*.a && rm -Rf bin.v2
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
// (C) Copyright David Abrahams 2002.
2+
// (C) Copyright Jeremy Siek 2002.
3+
// (C) Copyright Thomas Witt 2002.
4+
// Distributed under the Boost Software License, Version 1.0. (See
5+
// accompanying file LICENSE_1_0.txt or copy at
6+
// http://www.boost.org/LICENSE_1_0.txt)
7+
#ifndef BOOST_TRANSFORM_ITERATOR_23022003THW_HPP
8+
#define BOOST_TRANSFORM_ITERATOR_23022003THW_HPP
9+
10+
#include <boost/iterator.hpp>
11+
#include <boost/iterator/detail/enable_if.hpp>
12+
#include <boost/iterator/iterator_adaptor.hpp>
13+
#include <boost/iterator/iterator_categories.hpp>
14+
#include <boost/mpl/not.hpp>
15+
#include <boost/mpl/bool.hpp>
16+
#include <boost/type_traits/function_traits.hpp>
17+
#include <boost/type_traits/is_const.hpp>
18+
#include <boost/type_traits/is_class.hpp>
19+
#include <boost/type_traits/is_function.hpp>
20+
#include <boost/type_traits/is_reference.hpp>
21+
#include <boost/type_traits/remove_const.hpp>
22+
#include <boost/type_traits/remove_reference.hpp>
23+
#include <boost/utility/result_of.hpp>
24+
25+
26+
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
27+
# include <boost/type_traits/is_base_and_derived.hpp>
28+
29+
#endif
30+
#include <boost/iterator/detail/config_def.hpp>
31+
32+
33+
namespace riakboost{} namespace boost = riakboost; namespace riakboost{
34+
template <class UnaryFunction, class Iterator, class Reference = use_default, class Value = use_default>
35+
class transform_iterator;
36+
37+
namespace detail
38+
{
39+
// Compute the iterator_adaptor instantiation to be used for transform_iterator
40+
template <class UnaryFunc, class Iterator, class Reference, class Value>
41+
struct transform_iterator_base
42+
{
43+
private:
44+
// By default, dereferencing the iterator yields the same as
45+
// the function.
46+
typedef typename ia_dflt_help<
47+
Reference
48+
, result_of<UnaryFunc(typename std::iterator_traits<Iterator>::reference)>
49+
>::type reference;
50+
51+
// To get the default for Value: remove any reference on the
52+
// result type, but retain any constness to signal
53+
// non-writability. Note that if we adopt Thomas' suggestion
54+
// to key non-writability *only* on the Reference argument,
55+
// we'd need to strip constness here as well.
56+
typedef typename ia_dflt_help<
57+
Value
58+
, remove_reference<reference>
59+
>::type cv_value_type;
60+
61+
public:
62+
typedef iterator_adaptor<
63+
transform_iterator<UnaryFunc, Iterator, Reference, Value>
64+
, Iterator
65+
, cv_value_type
66+
, use_default // Leave the traversal category alone
67+
, reference
68+
> type;
69+
};
70+
}
71+
72+
template <class UnaryFunc, class Iterator, class Reference, class Value>
73+
class transform_iterator
74+
: public riakboost::detail::transform_iterator_base<UnaryFunc, Iterator, Reference, Value>::type
75+
{
76+
typedef typename
77+
riakboost::detail::transform_iterator_base<UnaryFunc, Iterator, Reference, Value>::type
78+
super_t;
79+
80+
friend class iterator_core_access;
81+
82+
public:
83+
transform_iterator() { }
84+
85+
transform_iterator(Iterator const& x, UnaryFunc f)
86+
: super_t(x), m_f(f) { }
87+
88+
explicit transform_iterator(Iterator const& x)
89+
: super_t(x)
90+
{
91+
// Pro8 is a little too aggressive about instantiating the
92+
// body of this function.
93+
#if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
94+
// don't provide this constructor if UnaryFunc is a
95+
// function pointer type, since it will be 0. Too dangerous.
96+
BOOST_STATIC_ASSERT(is_class<UnaryFunc>::value);
97+
#endif
98+
}
99+
100+
template <
101+
class OtherUnaryFunction
102+
, class OtherIterator
103+
, class OtherReference
104+
, class OtherValue>
105+
transform_iterator(
106+
transform_iterator<OtherUnaryFunction, OtherIterator, OtherReference, OtherValue> const& t
107+
, typename enable_if_convertible<OtherIterator, Iterator>::type* = 0
108+
#if !BOOST_WORKAROUND(BOOST_MSVC, == 1310)
109+
, typename enable_if_convertible<OtherUnaryFunction, UnaryFunc>::type* = 0
110+
#endif
111+
)
112+
: super_t(t.base()), m_f(t.functor())
113+
{}
114+
115+
UnaryFunc functor() const
116+
{ return m_f; }
117+
118+
private:
119+
typename super_t::reference dereference() const
120+
{ return m_f(*this->base()); }
121+
122+
// Probably should be the initial base class so it can be
123+
// optimized away via EBO if it is an empty class.
124+
UnaryFunc m_f;
125+
};
126+
127+
template <class UnaryFunc, class Iterator>
128+
transform_iterator<UnaryFunc, Iterator>
129+
make_transform_iterator(Iterator it, UnaryFunc fun)
130+
{
131+
return transform_iterator<UnaryFunc, Iterator>(it, fun);
132+
}
133+
134+
// Version which allows explicit specification of the UnaryFunc
135+
// type.
136+
//
137+
// This generator is not provided if UnaryFunc is a function
138+
// pointer type, because it's too dangerous: the default-constructed
139+
// function pointer in the iterator be 0, leading to a runtime
140+
// crash.
141+
template <class UnaryFunc, class Iterator>
142+
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
143+
typename mpl::if_<
144+
#else
145+
typename iterators::enable_if<
146+
#endif
147+
is_class<UnaryFunc> // We should probably find a cheaper test than is_class<>
148+
, transform_iterator<UnaryFunc, Iterator>
149+
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
150+
, int[3]
151+
#endif
152+
>::type
153+
make_transform_iterator(Iterator it)
154+
{
155+
return transform_iterator<UnaryFunc, Iterator>(it, UnaryFunc());
156+
}
157+
158+
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
159+
template <class Return, class Argument, class Iterator>
160+
transform_iterator< Return (*)(Argument), Iterator, Return>
161+
make_transform_iterator(Iterator it, Return (*fun)(Argument))
162+
{
163+
return transform_iterator<Return (*)(Argument), Iterator, Return>(it, fun);
164+
}
165+
#endif
166+
167+
} // namespace riakboost
168+
169+
#include <boost/iterator/detail/config_undef.hpp>
170+
171+
#endif // BOOST_TRANSFORM_ITERATOR_23022003THW_HPP
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
#ifndef BOOST_MPL_O1_SIZE_HPP_INCLUDED
3+
#define BOOST_MPL_O1_SIZE_HPP_INCLUDED
4+
5+
// Copyright Aleksey Gurtovoy 2000-2004
6+
//
7+
// Distributed under the Boost Software License, Version 1.0.
8+
// (See accompanying file LICENSE_1_0.txt or copy at
9+
// http://www.boost.org/LICENSE_1_0.txt)
10+
//
11+
// See http://www.boost.org/libs/mpl for documentation.
12+
13+
// $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
14+
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
15+
// $Revision: 49267 $
16+
17+
#include <boost/mpl/O1_size_fwd.hpp>
18+
#include <boost/mpl/sequence_tag.hpp>
19+
#include <boost/mpl/aux_/O1_size_impl.hpp>
20+
#include <boost/mpl/aux_/na_spec.hpp>
21+
#include <boost/mpl/aux_/lambda_support.hpp>
22+
23+
namespace riakboost{} namespace boost = riakboost; namespace riakboost{ namespace mpl {
24+
25+
// returns sequence size if it's an O(1) operation; otherwise returns -1
26+
template<
27+
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
28+
>
29+
struct O1_size
30+
: O1_size_impl< typename sequence_tag<Sequence>::type >
31+
::template apply< Sequence >
32+
{
33+
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, O1_size, (Sequence))
34+
};
35+
36+
BOOST_MPL_AUX_NA_SPEC(1, O1_size)
37+
38+
}}
39+
40+
#endif // BOOST_MPL_O1_SIZE_HPP_INCLUDED
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
#ifndef BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED
3+
#define BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED
4+
5+
// Copyright Aleksey Gurtovoy 2000-2004
6+
//
7+
// Distributed under the Boost Software License, Version 1.0.
8+
// (See accompanying file LICENSE_1_0.txt or copy at
9+
// http://www.boost.org/LICENSE_1_0.txt)
10+
//
11+
// See http://www.boost.org/libs/mpl for documentation.
12+
13+
// $Id: O1_size_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
14+
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
15+
// $Revision: 49267 $
16+
17+
namespace riakboost{} namespace boost = riakboost; namespace riakboost{ namespace mpl {
18+
19+
template< typename Tag > struct O1_size_impl;
20+
template< typename Sequence > struct O1_size;
21+
22+
}}
23+
24+
#endif // BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
2+
#ifndef BOOST_MPL_ADVANCE_HPP_INCLUDED
3+
#define BOOST_MPL_ADVANCE_HPP_INCLUDED
4+
5+
// Copyright Aleksey Gurtovoy 2000-2004
6+
//
7+
// Distributed under the Boost Software License, Version 1.0.
8+
// (See accompanying file LICENSE_1_0.txt or copy at
9+
// http://www.boost.org/LICENSE_1_0.txt)
10+
//
11+
// See http://www.boost.org/libs/mpl for documentation.
12+
13+
// $Id: advance.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
14+
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
15+
// $Revision: 49267 $
16+
17+
#include <boost/mpl/advance_fwd.hpp>
18+
#include <boost/mpl/less.hpp>
19+
#include <boost/mpl/negate.hpp>
20+
#include <boost/mpl/long.hpp>
21+
#include <boost/mpl/if.hpp>
22+
#include <boost/mpl/tag.hpp>
23+
#include <boost/mpl/apply_wrap.hpp>
24+
#include <boost/mpl/aux_/advance_forward.hpp>
25+
#include <boost/mpl/aux_/advance_backward.hpp>
26+
#include <boost/mpl/aux_/value_wknd.hpp>
27+
#include <boost/mpl/aux_/na_spec.hpp>
28+
#include <boost/mpl/aux_/nttp_decl.hpp>
29+
30+
namespace riakboost{} namespace boost = riakboost; namespace riakboost{ namespace mpl {
31+
32+
// default implementation for forward/bidirectional iterators
33+
template< typename Tag >
34+
struct advance_impl
35+
{
36+
template< typename Iterator, typename N > struct apply
37+
{
38+
typedef typename less< N,long_<0> >::type backward_;
39+
typedef typename if_< backward_, negate<N>, N >::type offset_;
40+
41+
typedef typename if_<
42+
backward_
43+
, aux::advance_backward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value >
44+
, aux::advance_forward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value >
45+
>::type f_;
46+
47+
typedef typename apply_wrap1<f_,Iterator>::type type;
48+
};
49+
};
50+
51+
52+
template<
53+
typename BOOST_MPL_AUX_NA_PARAM(Iterator)
54+
, typename BOOST_MPL_AUX_NA_PARAM(N)
55+
>
56+
struct advance
57+
: advance_impl< typename tag<Iterator>::type >
58+
::template apply<Iterator,N>
59+
{
60+
};
61+
62+
template<
63+
typename Iterator
64+
, BOOST_MPL_AUX_NTTP_DECL(long, N)
65+
>
66+
struct advance_c
67+
: advance_impl< typename tag<Iterator>::type >
68+
::template apply<Iterator,long_<N> >
69+
{
70+
};
71+
72+
BOOST_MPL_AUX_NA_SPEC(2, advance)
73+
74+
}}
75+
76+
#endif // BOOST_MPL_ADVANCE_HPP_INCLUDED
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
#ifndef BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED
3+
#define BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED
4+
5+
// Copyright Aleksey Gurtovoy 2000-2004
6+
//
7+
// Distributed under the Boost Software License, Version 1.0.
8+
// (See accompanying file LICENSE_1_0.txt or copy at
9+
// http://www.boost.org/LICENSE_1_0.txt)
10+
//
11+
// See http://www.boost.org/libs/mpl for documentation.
12+
13+
// $Id: advance_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
14+
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
15+
// $Revision: 49267 $
16+
17+
#include <boost/mpl/aux_/common_name_wknd.hpp>
18+
19+
namespace riakboost{} namespace boost = riakboost; namespace riakboost{ namespace mpl {
20+
21+
BOOST_MPL_AUX_COMMON_NAME_WKND(advance)
22+
23+
template< typename Tag > struct advance_impl;
24+
template< typename Iterator, typename N > struct advance;
25+
26+
}}
27+
28+
#endif // BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
#ifndef BOOST_MPL_AT_FWD_HPP_INCLUDED
3+
#define BOOST_MPL_AT_FWD_HPP_INCLUDED
4+
5+
// Copyright Aleksey Gurtovoy 2000-2004
6+
//
7+
// Distributed under the Boost Software License, Version 1.0.
8+
// (See accompanying file LICENSE_1_0.txt or copy at
9+
// http://www.boost.org/LICENSE_1_0.txt)
10+
//
11+
// See http://www.boost.org/libs/mpl for documentation.
12+
13+
// $Id: at_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
14+
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
15+
// $Revision: 49267 $
16+
17+
namespace riakboost{} namespace boost = riakboost; namespace riakboost{ namespace mpl {
18+
19+
template< typename Tag > struct at_impl;
20+
template< typename Sequence, typename N > struct at;
21+
22+
}}
23+
24+
#endif // BOOST_MPL_AT_FWD_HPP_INCLUDED

0 commit comments

Comments
 (0)