Skip to content

Commit b7a2ce2

Browse files
committed
Added boost headers
1 parent 497e9f0 commit b7a2ce2

File tree

14,013 files changed

+2738331
-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.

14,013 files changed

+2738331
-0
lines changed

.vscode/c_cpp_properties.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Mac",
5+
"includePath": [
6+
"${workspaceFolder}/**"
7+
],
8+
"defines": [],
9+
"macFrameworkPath": [],
10+
"compilerPath": "/usr/local/bin/gcc-11",
11+
"cStandard": "gnu17",
12+
"cppStandard": "gnu++17",
13+
"intelliSenseMode": "macos-gcc-x64"
14+
}
15+
],
16+
"version": 4
17+
}
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: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
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/core/enable_if.hpp>
13+
#include <boost/parameter/is_argument_pack.hpp>
14+
#include <boost/mpl/apply_fwd.hpp> // for mpl::na
15+
#include <boost/mpl/limits/vector.hpp>
16+
#include <boost/preprocessor/cat.hpp>
17+
#include <boost/preprocessor/arithmetic/inc.hpp>
18+
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
19+
#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
20+
#include <boost/preprocessor/repetition/enum_trailing_binary_params.hpp>
21+
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
22+
#include <boost/accumulators/numeric/functional_fwd.hpp>
23+
24+
#ifndef BOOST_ACCUMULATORS_MAX_FEATURES
25+
/// The maximum number of accumulators that may be put in an accumulator_set.
26+
/// Defaults to BOOST_MPL_LIMIT_VECTOR_SIZE (which defaults to 20).
27+
# define BOOST_ACCUMULATORS_MAX_FEATURES BOOST_MPL_LIMIT_VECTOR_SIZE
28+
#endif
29+
30+
#if BOOST_ACCUMULATORS_MAX_FEATURES > BOOST_MPL_LIMIT_VECTOR_SIZE
31+
# error BOOST_ACCUMULATORS_MAX_FEATURES cannot be larger than BOOST_MPL_LIMIT_VECTOR_SIZE
32+
#endif
33+
34+
#ifndef BOOST_ACCUMULATORS_MAX_ARGS
35+
/// The maximum number of arguments that may be specified to an accumulator_set's
36+
/// accumulation function. Defaults to 15.
37+
# define BOOST_ACCUMULATORS_MAX_ARGS 15
38+
#endif
39+
40+
#if BOOST_WORKAROUND(__GNUC__, == 3) \
41+
|| BOOST_WORKAROUND(__EDG_VERSION__, BOOST_TESTED_AT(306))
42+
# define BOOST_ACCUMULATORS_BROKEN_CONST_OVERLOADS
43+
#endif
44+
45+
#ifdef BOOST_ACCUMULATORS_BROKEN_CONST_OVERLOADS
46+
# include <boost/type_traits/is_const.hpp>
47+
# define BOOST_ACCUMULATORS_PROTO_DISABLE_IF_IS_CONST(T)\
48+
, typename boost::disable_if<boost::is_const<T> >::type * = 0
49+
#else
50+
# define BOOST_ACCUMULATORS_PROTO_DISABLE_IF_IS_CONST(T)
51+
#endif
52+
53+
#define BOOST_ACCUMULATORS_GCC_VERSION \
54+
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
55+
56+
namespace boost { namespace accumulators
57+
{
58+
59+
///////////////////////////////////////////////////////////////////////////////
60+
// Named parameters tags
61+
//
62+
namespace tag
63+
{
64+
struct sample;
65+
struct weight;
66+
struct accumulator;
67+
struct weights;
68+
}
69+
70+
///////////////////////////////////////////////////////////////////////////////
71+
// User-level features
72+
//
73+
namespace tag
74+
{
75+
template<typename ValueType, typename Tag>
76+
struct value;
77+
78+
template<typename Tag>
79+
struct value_tag;
80+
81+
template<typename Referent, typename Tag>
82+
struct reference;
83+
84+
template<typename Tag>
85+
struct reference_tag;
86+
87+
template<typename Type, typename Tag = void, typename AccumulatorSet = void>
88+
struct external;
89+
90+
template<typename Feature>
91+
struct droppable;
92+
}
93+
94+
template<typename Accumulator>
95+
struct droppable_accumulator_base;
96+
97+
template<typename Accumulator>
98+
struct droppable_accumulator;
99+
100+
template<typename Accumulator>
101+
struct with_cached_result;
102+
103+
template<typename Sample, typename Features, typename Weight = void>
104+
struct accumulator_set;
105+
106+
template<typename Feature>
107+
struct extractor;
108+
109+
template<typename Feature>
110+
struct feature_of;
111+
112+
template<typename Feature>
113+
struct as_feature;
114+
115+
template<typename Feature>
116+
struct as_weighted_feature;
117+
118+
template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_ACCUMULATORS_MAX_FEATURES, typename Feature, mpl::na)>
119+
struct depends_on;
120+
121+
template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_ACCUMULATORS_MAX_FEATURES, typename Feature, mpl::na)>
122+
struct features;
123+
124+
template<typename Feature, typename AccumulatorSet>
125+
typename mpl::apply<AccumulatorSet, Feature>::type const &
126+
find_accumulator(AccumulatorSet const &acc);
127+
128+
template<typename Feature, typename AccumulatorSet>
129+
typename mpl::apply<AccumulatorSet, Feature>::type::result_type
130+
extract_result(AccumulatorSet const &acc);
131+
132+
namespace detail
133+
{
134+
struct _enabler
135+
{
136+
};
137+
}
138+
139+
// ... other overloads generated by Boost.Preprocessor:
140+
141+
/// INTERNAL ONLY
142+
///
143+
#define BOOST_ACCUMULATORS_EXTRACT_RESULT_FWD(z, n, _) \
144+
template< \
145+
typename Feature \
146+
, typename AccumulatorSet \
147+
BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, n, typename A) \
148+
> \
149+
typename mpl::apply<AccumulatorSet, Feature>::type::result_type \
150+
extract_result( \
151+
AccumulatorSet const &acc \
152+
BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z(z, n, A, const &a) \
153+
, typename boost::enable_if< \
154+
parameter::is_argument_pack<A0> \
155+
, detail::_enabler \
156+
>::type = detail::_enabler() \
157+
); \
158+
template< \
159+
typename Feature \
160+
, typename AccumulatorSet \
161+
BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, n, typename A) \
162+
> \
163+
typename mpl::apply<AccumulatorSet, Feature>::type::result_type \
164+
extract_result( \
165+
AccumulatorSet const &acc \
166+
BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z(z, n, A, const &a) \
167+
, typename boost::disable_if< \
168+
parameter::is_argument_pack<A0> \
169+
, detail::_enabler \
170+
>::type = detail::_enabler() \
171+
);
172+
173+
/// INTERNAL ONLY
174+
///
175+
BOOST_PP_REPEAT_FROM_TO(
176+
1
177+
, BOOST_PP_INC(BOOST_ACCUMULATORS_MAX_ARGS)
178+
, BOOST_ACCUMULATORS_EXTRACT_RESULT_FWD
179+
, _
180+
)
181+
182+
#undef BOOST_ACCUMULATORS_EXTRACT_RESULT_FWD
183+
184+
#ifdef BOOST_ACCUMULATORS_DOXYGEN_INVOKED
185+
template<typename Feature, typename AccumulatorSet, typename A1, typename A2 ...>
186+
typename mpl::apply<AccumulatorSet, Feature>::type::result_type
187+
extract_result(AccumulatorSet const &acc, A1 const &a1, A2 const &a2 ...);
188+
#endif
189+
190+
namespace impl
191+
{
192+
using namespace numeric::operators;
193+
194+
template<typename Accumulator, typename Tag>
195+
struct external_impl;
196+
}
197+
198+
namespace detail
199+
{
200+
template<typename Accumulator>
201+
struct feature_tag;
202+
203+
template<typename Feature, typename Sample, typename Weight>
204+
struct to_accumulator;
205+
206+
struct accumulator_set_base;
207+
208+
template<typename T>
209+
struct is_accumulator_set;
210+
211+
inline void ignore_variable(void const *) {}
212+
}
213+
214+
}} // namespace boost::accumulators
215+
216+
#define BOOST_ACCUMULATORS_IGNORE_GLOBAL(X) \
217+
namespace detail \
218+
{ \
219+
struct BOOST_PP_CAT(ignore_, X) \
220+
{ \
221+
void ignore() \
222+
{ \
223+
boost::accumulators::detail::ignore_variable(&X); \
224+
} \
225+
}; \
226+
} \
227+
/**/
228+
229+
#include <boost/parameter/nested_keyword.hpp>
230+
231+
#endif // include guard
232+
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)