Skip to content

Commit 74032fe

Browse files
committed
Add Boost 1.57.0 source code and license without docs and other unused files
0 parents  commit 74032fe

File tree

10,484 files changed

+2070095
-0
lines changed

Some content is hidden

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

10,484 files changed

+2070095
-0
lines changed

LICENSE_1_0.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Boost Software License - Version 1.0 - August 17th, 2003
2+
3+
Permission is hereby granted, free of charge, to any person or organization
4+
obtaining a copy of the software and accompanying documentation covered by
5+
this license (the "Software") to use, reproduce, display, distribute,
6+
execute, and transmit the Software, and to prepare derivative works of the
7+
Software, and to permit third-parties to whom the Software is furnished to
8+
do so, all subject to the following:
9+
10+
The copyright notices in the Software and this entire statement, including
11+
the above license grant, this restriction and the following disclaimer,
12+
must be included in all copies of the Software, in whole or in part, and
13+
all derivative works of the Software, unless such copies or derivative
14+
works are solely in the form of machine-executable object code generated by
15+
a source language processor.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
20+
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
21+
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
22+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23+
DEALINGS IN THE SOFTWARE.

boost/accumulators/accumulators.hpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
///////////////////////////////////////////////////////////////////////////////
2+
/// \file accumulators.hpp
3+
/// Includes all of the Accumulators Framework
4+
//
5+
// Copyright 2005 Eric Niebler. Distributed under the Boost
6+
// Software License, Version 1.0. (See accompanying file
7+
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8+
9+
#ifndef BOOST_ACCUMULATORS_ACCUMULATORS_HPP_EAN_28_10_2005
10+
#define BOOST_ACCUMULATORS_ACCUMULATORS_HPP_EAN_28_10_2005
11+
12+
#include <boost/accumulators/framework/accumulator_set.hpp>
13+
#include <boost/accumulators/framework/accumulator_concept.hpp>
14+
#include <boost/accumulators/framework/accumulator_base.hpp>
15+
#include <boost/accumulators/framework/extractor.hpp>
16+
#include <boost/accumulators/framework/external.hpp>
17+
#include <boost/accumulators/framework/features.hpp>
18+
#include <boost/accumulators/framework/parameters/accumulator.hpp>
19+
#include <boost/accumulators/framework/parameters/sample.hpp>
20+
#include <boost/accumulators/framework/parameters/weight.hpp>
21+
#include <boost/accumulators/framework/parameters/weights.hpp>
22+
#include <boost/accumulators/framework/accumulators/external_accumulator.hpp>
23+
#include <boost/accumulators/framework/accumulators/droppable_accumulator.hpp>
24+
#include <boost/accumulators/framework/accumulators/reference_accumulator.hpp>
25+
#include <boost/accumulators/framework/accumulators/value_accumulator.hpp>
26+
27+
#endif
Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,230 @@
1+
///////////////////////////////////////////////////////////////////////////////
2+
// accumulators_fwd.hpp
3+
//
4+
// Copyright 2005 Eric Niebler. Distributed under the Boost
5+
// Software License, Version 1.0. (See accompanying file
6+
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7+
8+
#ifndef BOOST_ACCUMULATORS_ACCUMULATORS_FWD_HPP_EAN_28_10_2005
9+
#define BOOST_ACCUMULATORS_ACCUMULATORS_FWD_HPP_EAN_28_10_2005
10+
11+
#include <boost/config.hpp>
12+
#include <boost/mpl/apply_fwd.hpp> // for mpl::na
13+
#include <boost/mpl/limits/vector.hpp>
14+
#include <boost/preprocessor/cat.hpp>
15+
#include <boost/preprocessor/arithmetic/inc.hpp>
16+
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
17+
#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
18+
#include <boost/preprocessor/repetition/enum_trailing_binary_params.hpp>
19+
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
20+
#include <boost/accumulators/numeric/functional_fwd.hpp>
21+
22+
#ifndef BOOST_ACCUMULATORS_MAX_FEATURES
23+
/// The maximum number of accumulators that may be put in an accumulator_set.
24+
/// Defaults to BOOST_MPL_LIMIT_VECTOR_SIZE (which defaults to 20).
25+
# define BOOST_ACCUMULATORS_MAX_FEATURES BOOST_MPL_LIMIT_VECTOR_SIZE
26+
#endif
27+
28+
#if BOOST_ACCUMULATORS_MAX_FEATURES > BOOST_MPL_LIMIT_VECTOR_SIZE
29+
# error BOOST_ACCUMULATORS_MAX_FEATURES cannot be larger than BOOST_MPL_LIMIT_VECTOR_SIZE
30+
#endif
31+
32+
#ifndef BOOST_ACCUMULATORS_MAX_ARGS
33+
/// The maximum number of arguments that may be specified to an accumulator_set's
34+
/// accumulation function. Defaults to 15.
35+
# define BOOST_ACCUMULATORS_MAX_ARGS 15
36+
#endif
37+
38+
#if BOOST_WORKAROUND(__GNUC__, == 3) \
39+
|| BOOST_WORKAROUND(__EDG_VERSION__, BOOST_TESTED_AT(306))
40+
# define BOOST_ACCUMULATORS_BROKEN_CONST_OVERLOADS
41+
#endif
42+
43+
#ifdef BOOST_ACCUMULATORS_BROKEN_CONST_OVERLOADS
44+
# include <boost/utility/enable_if.hpp>
45+
# include <boost/type_traits/is_const.hpp>
46+
# define BOOST_ACCUMULATORS_PROTO_DISABLE_IF_IS_CONST(T)\
47+
, typename boost::disable_if<boost::is_const<T> >::type * = 0
48+
#else
49+
# define BOOST_ACCUMULATORS_PROTO_DISABLE_IF_IS_CONST(T)
50+
#endif
51+
52+
#define BOOST_ACCUMULATORS_GCC_VERSION \
53+
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
54+
55+
namespace boost { namespace accumulators
56+
{
57+
58+
///////////////////////////////////////////////////////////////////////////////
59+
// Named parameters tags
60+
//
61+
namespace tag
62+
{
63+
struct sample;
64+
struct weight;
65+
struct accumulator;
66+
struct weights;
67+
}
68+
69+
///////////////////////////////////////////////////////////////////////////////
70+
// User-level features
71+
//
72+
namespace tag
73+
{
74+
template<typename ValueType, typename Tag>
75+
struct value;
76+
77+
template<typename Tag>
78+
struct value_tag;
79+
80+
template<typename Referent, typename Tag>
81+
struct reference;
82+
83+
template<typename Tag>
84+
struct reference_tag;
85+
86+
template<typename Type, typename Tag = void, typename AccumulatorSet = void>
87+
struct external;
88+
89+
template<typename Feature>
90+
struct droppable;
91+
}
92+
93+
template<typename Accumulator>
94+
struct droppable_accumulator_base;
95+
96+
template<typename Accumulator>
97+
struct droppable_accumulator;
98+
99+
template<typename Accumulator>
100+
struct with_cached_result;
101+
102+
template<typename Sample, typename Features, typename Weight = void>
103+
struct accumulator_set;
104+
105+
template<typename Feature>
106+
struct extractor;
107+
108+
template<typename Feature>
109+
struct feature_of;
110+
111+
template<typename Feature>
112+
struct as_feature;
113+
114+
template<typename Feature>
115+
struct as_weighted_feature;
116+
117+
template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_ACCUMULATORS_MAX_FEATURES, typename Feature, mpl::na)>
118+
struct depends_on;
119+
120+
template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_ACCUMULATORS_MAX_FEATURES, typename Feature, mpl::na)>
121+
struct features;
122+
123+
template<typename Feature, typename AccumulatorSet>
124+
typename mpl::apply<AccumulatorSet, Feature>::type const &
125+
find_accumulator(AccumulatorSet const &acc);
126+
127+
template<typename Feature, typename AccumulatorSet>
128+
typename mpl::apply<AccumulatorSet, Feature>::type::result_type
129+
extract_result(AccumulatorSet const &acc);
130+
131+
template<typename Feature, typename AccumulatorSet, typename A1>
132+
typename mpl::apply<AccumulatorSet, Feature>::type::result_type
133+
extract_result(AccumulatorSet const &acc, A1 const &a1);
134+
135+
// ... other overloads generated by Boost.Preprocessor:
136+
137+
/// INTERNAL ONLY
138+
///
139+
#define BOOST_ACCUMULATORS_EXTRACT_RESULT_FWD(z, n, _) \
140+
template< \
141+
typename Feature \
142+
, typename AccumulatorSet \
143+
BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, n, typename A) \
144+
> \
145+
typename mpl::apply<AccumulatorSet, Feature>::type::result_type \
146+
extract_result( \
147+
AccumulatorSet const &acc \
148+
BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z(z, n, A, const &a) \
149+
);
150+
151+
/// INTERNAL ONLY
152+
///
153+
BOOST_PP_REPEAT_FROM_TO(
154+
2
155+
, BOOST_PP_INC(BOOST_ACCUMULATORS_MAX_ARGS)
156+
, BOOST_ACCUMULATORS_EXTRACT_RESULT_FWD
157+
, _
158+
)
159+
160+
#ifdef BOOST_ACCUMULATORS_DOXYGEN_INVOKED
161+
template<typename Feature, typename AccumulatorSet, typename A1, typename A2 ...>
162+
typename mpl::apply<AccumulatorSet, Feature>::type::result_type
163+
extract_result(AccumulatorSet const &acc, A1 const &a1, A2 const &a2 ...);
164+
#endif
165+
166+
namespace impl
167+
{
168+
using namespace numeric::operators;
169+
170+
template<typename Accumulator, typename Tag>
171+
struct external_impl;
172+
}
173+
174+
namespace detail
175+
{
176+
template<typename Accumulator>
177+
struct feature_tag;
178+
179+
template<typename Feature, typename Sample, typename Weight>
180+
struct to_accumulator;
181+
182+
struct accumulator_set_base;
183+
184+
template<typename T>
185+
struct is_accumulator_set;
186+
187+
inline void ignore_variable(void const *) {}
188+
189+
#define BOOST_ACCUMULATORS_IGNORE_GLOBAL(X) \
190+
namespace detail \
191+
{ \
192+
struct BOOST_PP_CAT(ignore_, X) \
193+
{ \
194+
void ignore() \
195+
{ \
196+
boost::accumulators::detail::ignore_variable(&X); \
197+
} \
198+
}; \
199+
} \
200+
/**/
201+
}
202+
203+
}} // namespace boost::accumulators
204+
205+
// For defining boost::parameter keywords that can be inherited from to
206+
// get a nested, class-scoped keyword with the requested alias
207+
#define BOOST_PARAMETER_NESTED_KEYWORD(tag_namespace, name, alias) \
208+
namespace tag_namespace \
209+
{ \
210+
template<int Dummy = 0> \
211+
struct name ## _ \
212+
{ \
213+
static char const* keyword_name() \
214+
{ \
215+
return #name; \
216+
} \
217+
static ::boost::parameter::keyword<name ## _<Dummy> > &alias; \
218+
}; \
219+
template<int Dummy> \
220+
::boost::parameter::keyword<name ## _<Dummy> > &name ## _<Dummy>::alias = \
221+
::boost::parameter::keyword<name ## _<Dummy> >::get(); \
222+
typedef name ## _ <> name; \
223+
} \
224+
namespace \
225+
{ \
226+
::boost::parameter::keyword<tag_namespace::name> &name = \
227+
::boost::parameter::keyword<tag_namespace::name>::get(); \
228+
}
229+
230+
#endif
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
///////////////////////////////////////////////////////////////////////////////
2+
// accumulator_base.hpp
3+
//
4+
// Copyright 2005 Eric Niebler. Distributed under the Boost
5+
// Software License, Version 1.0. (See accompanying file
6+
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7+
8+
#ifndef BOOST_ACCUMULATORS_FRAMEWORK_ACCUMULATORS_BASE_HPP_EAN_28_10_2005
9+
#define BOOST_ACCUMULATORS_FRAMEWORK_ACCUMULATORS_BASE_HPP_EAN_28_10_2005
10+
11+
#include <boost/mpl/placeholders.hpp>
12+
#include <boost/mpl/joint_view.hpp>
13+
#include <boost/mpl/single_view.hpp>
14+
#include <boost/mpl/fold.hpp>
15+
#include <boost/mpl/contains.hpp>
16+
#include <boost/mpl/empty_sequence.hpp>
17+
#include <boost/accumulators/framework/accumulator_concept.hpp>
18+
19+
namespace boost { namespace accumulators
20+
{
21+
22+
namespace detail
23+
{
24+
typedef void void_;
25+
}
26+
27+
///////////////////////////////////////////////////////////////////////////////
28+
// dont_care
29+
//
30+
struct dont_care
31+
{
32+
template<typename Args>
33+
dont_care(Args const &)
34+
{
35+
}
36+
};
37+
38+
///////////////////////////////////////////////////////////////////////////////
39+
// accumulator_base
40+
//
41+
struct accumulator_base
42+
{
43+
// hidden if defined in derived classes
44+
detail::void_ operator ()(dont_care)
45+
{
46+
}
47+
48+
typedef mpl::false_ is_droppable;
49+
50+
detail::void_ add_ref(dont_care)
51+
{
52+
}
53+
54+
detail::void_ drop(dont_care)
55+
{
56+
}
57+
58+
detail::void_ on_drop(dont_care)
59+
{
60+
}
61+
};
62+
63+
}} // namespace boost::accumulators
64+
65+
#endif
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
///////////////////////////////////////////////////////////////////////////////
2+
// accumulator_concept.hpp
3+
//
4+
// Copyright 2005 Eric Niebler. Distributed under the Boost
5+
// Software License, Version 1.0. (See accompanying file
6+
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7+
8+
#ifndef BOOST_ACCUMULATORS_FRAMEWORK_ACCUMULATOR_CONCEPT_HPP_EAN_28_10_2005
9+
#define BOOST_ACCUMULATORS_FRAMEWORK_ACCUMULATOR_CONCEPT_HPP_EAN_28_10_2005
10+
11+
#include <boost/concept_check.hpp>
12+
13+
namespace boost { namespace accumulators
14+
{
15+
16+
template<typename Stat>
17+
struct accumulator_concept
18+
{
19+
void constraints()
20+
{
21+
// TODO: define the stat concept
22+
}
23+
24+
Stat stat;
25+
};
26+
27+
}} // namespace boost::accumulators
28+
29+
#endif

0 commit comments

Comments
 (0)