Initial Commit
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
/* boost random.hpp header file
|
||||
*
|
||||
* Copyright Jens Maurer 2000-2001
|
||||
* Distributed under the Boost Software License, Version 1.0. (See
|
||||
* accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
* See http://www.boost.org/libs/random for documentation.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Revision history
|
||||
* 2000-02-18 portability fixes (thanks to Beman Dawes)
|
||||
* 2000-02-21 shuffle_output, inversive_congruential_schrage,
|
||||
* generator_iterator, uniform_smallint
|
||||
* 2000-02-23 generic modulus arithmetic helper, removed *_schrage classes,
|
||||
* implemented Streamable and EqualityComparable concepts for
|
||||
* generators, added Bernoulli distribution and Box-Muller
|
||||
* transform
|
||||
* 2000-03-01 cauchy, lognormal, triangle distributions; fixed
|
||||
* uniform_smallint; renamed gaussian to normal distribution
|
||||
* 2000-03-05 implemented iterator syntax for distribution functions
|
||||
* 2000-04-21 removed some optimizations for better BCC/MSVC compatibility
|
||||
* 2000-05-10 adapted to BCC and MSVC
|
||||
* 2000-06-13 incorporated review results
|
||||
* 2000-07-06 moved basic templates from namespace detail to random
|
||||
* 2000-09-23 warning removals and int64 fixes (Ed Brey)
|
||||
* 2000-09-24 added lagged_fibonacci generator (Matthias Troyer)
|
||||
* 2001-02-18 moved to individual header files
|
||||
*/
|
||||
|
||||
#ifndef BOOST_RANDOM_HPP
|
||||
#define BOOST_RANDOM_HPP
|
||||
|
||||
// generators
|
||||
#include <boost/random/additive_combine.hpp>
|
||||
#include <boost/random/discard_block.hpp>
|
||||
#include <boost/random/independent_bits.hpp>
|
||||
#include <boost/random/inversive_congruential.hpp>
|
||||
#include <boost/random/lagged_fibonacci.hpp>
|
||||
#include <boost/random/linear_congruential.hpp>
|
||||
#include <boost/random/linear_feedback_shift.hpp>
|
||||
#include <boost/random/mersenne_twister.hpp>
|
||||
#include <boost/random/ranlux.hpp>
|
||||
#include <boost/random/shuffle_order.hpp>
|
||||
#include <boost/random/shuffle_output.hpp>
|
||||
#include <boost/random/subtract_with_carry.hpp>
|
||||
#include <boost/random/taus88.hpp>
|
||||
#include <boost/random/xor_combine.hpp>
|
||||
|
||||
// misc
|
||||
#include <boost/random/generate_canonical.hpp>
|
||||
#include <boost/random/seed_seq.hpp>
|
||||
#include <boost/random/random_number_generator.hpp>
|
||||
#include <boost/random/variate_generator.hpp>
|
||||
|
||||
// distributions
|
||||
#include <boost/random/bernoulli_distribution.hpp>
|
||||
#include <boost/random/beta_distribution.hpp>
|
||||
#include <boost/random/binomial_distribution.hpp>
|
||||
#include <boost/random/cauchy_distribution.hpp>
|
||||
#include <boost/random/chi_squared_distribution.hpp>
|
||||
#include <boost/random/discrete_distribution.hpp>
|
||||
#include <boost/random/exponential_distribution.hpp>
|
||||
#include <boost/random/extreme_value_distribution.hpp>
|
||||
#include <boost/random/fisher_f_distribution.hpp>
|
||||
#include <boost/random/gamma_distribution.hpp>
|
||||
#include <boost/random/geometric_distribution.hpp>
|
||||
#include <boost/random/hyperexponential_distribution.hpp>
|
||||
#include <boost/random/laplace_distribution.hpp>
|
||||
#include <boost/random/lognormal_distribution.hpp>
|
||||
#include <boost/random/negative_binomial_distribution.hpp>
|
||||
#include <boost/random/non_central_chi_squared_distribution.hpp>
|
||||
#include <boost/random/normal_distribution.hpp>
|
||||
#include <boost/random/piecewise_constant_distribution.hpp>
|
||||
#include <boost/random/piecewise_linear_distribution.hpp>
|
||||
#include <boost/random/poisson_distribution.hpp>
|
||||
#include <boost/random/student_t_distribution.hpp>
|
||||
#include <boost/random/triangle_distribution.hpp>
|
||||
#include <boost/random/uniform_01.hpp>
|
||||
#include <boost/random/uniform_int.hpp>
|
||||
#include <boost/random/uniform_int_distribution.hpp>
|
||||
#include <boost/random/uniform_on_sphere.hpp>
|
||||
#include <boost/random/uniform_real.hpp>
|
||||
#include <boost/random/uniform_real_distribution.hpp>
|
||||
#include <boost/random/uniform_smallint.hpp>
|
||||
#include <boost/random/weibull_distribution.hpp>
|
||||
|
||||
#include <boost/random/generate_canonical.hpp>
|
||||
|
||||
#endif // BOOST_RANDOM_HPP
|
||||
@@ -0,0 +1,148 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2011 Eric Niebler
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_SEGMENTED_ITERATOR_SEGMENTED_ITERATOR_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_SEGMENTED_ITERATOR_SEGMENTED_ITERATOR_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic_fwd.hpp>
|
||||
#include <boost/fusion/iterator/iterator_facade.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/deref_data.hpp>
|
||||
#include <boost/fusion/iterator/key_of.hpp>
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
#include <boost/fusion/iterator/value_of_data.hpp>
|
||||
#include <boost/fusion/iterator/detail/segmented_equal_to.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nil_;
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <typename Stack>
|
||||
struct segmented_next_impl;
|
||||
}
|
||||
|
||||
// A segmented iterator wraps a "context", which is a cons list
|
||||
// of ranges, the frontmost is range over values and the rest
|
||||
// are ranges over internal segments.
|
||||
template <typename Context>
|
||||
struct segmented_iterator
|
||||
: iterator_facade<segmented_iterator<Context>, forward_traversal_tag>
|
||||
{
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED explicit segmented_iterator(Context const& ctx)
|
||||
: context(ctx)
|
||||
{}
|
||||
|
||||
//auto deref(it)
|
||||
//{
|
||||
// return deref(begin(car(it.context)))
|
||||
//}
|
||||
template <typename It>
|
||||
struct deref
|
||||
{
|
||||
typedef
|
||||
typename result_of::deref<
|
||||
typename It::context_type::car_type::begin_type
|
||||
>::type
|
||||
type;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type call(It const& it)
|
||||
{
|
||||
return *it.context.car.first;
|
||||
}
|
||||
};
|
||||
|
||||
//auto deref_data(it)
|
||||
//{
|
||||
// return deref_data(begin(car(it.context)))
|
||||
//}
|
||||
template <typename It>
|
||||
struct deref_data
|
||||
{
|
||||
typedef
|
||||
typename result_of::deref_data<
|
||||
typename It::context_type::car_type::begin_type
|
||||
>::type
|
||||
type;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type call(It const& it)
|
||||
{
|
||||
return fusion::deref_data(it.context.car.first);
|
||||
}
|
||||
};
|
||||
|
||||
//auto key_of(it)
|
||||
//{
|
||||
// return key_of(begin(car(it.context)))
|
||||
//}
|
||||
template <typename It>
|
||||
struct key_of
|
||||
: result_of::key_of<typename It::context_type::car_type::begin_type>
|
||||
{};
|
||||
|
||||
//auto value_of(it)
|
||||
//{
|
||||
// return value_of(begin(car(it.context)))
|
||||
//}
|
||||
template <typename It>
|
||||
struct value_of
|
||||
: result_of::value_of<typename It::context_type::car_type::begin_type>
|
||||
{};
|
||||
|
||||
//auto value_of_data(it)
|
||||
//{
|
||||
// return value_of_data(begin(car(it.context)))
|
||||
//}
|
||||
template <typename It>
|
||||
struct value_of_data
|
||||
: result_of::value_of_data<typename It::context_type::car_type::begin_type>
|
||||
{};
|
||||
|
||||
// Compare all the segment iterators in each stack, starting with
|
||||
// the bottom-most.
|
||||
template <
|
||||
typename It1
|
||||
, typename It2
|
||||
, int Size1 = It1::context_type::size::value
|
||||
, int Size2 = It2::context_type::size::value
|
||||
>
|
||||
struct equal_to
|
||||
: mpl::false_
|
||||
{};
|
||||
|
||||
template <typename It1, typename It2, int Size>
|
||||
struct equal_to<It1, It2, Size, Size>
|
||||
: detail::segmented_equal_to<
|
||||
typename It1::context_type
|
||||
, typename It2::context_type
|
||||
>
|
||||
{};
|
||||
|
||||
template <typename It>
|
||||
struct next
|
||||
{
|
||||
typedef detail::segmented_next_impl<typename It::context_type> impl;
|
||||
typedef segmented_iterator<typename impl::type> type;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type call(It const& it)
|
||||
{
|
||||
return type(impl::call(it.context));
|
||||
}
|
||||
};
|
||||
|
||||
typedef Context context_type;
|
||||
context_type context;
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,21 @@
|
||||
// Copyright David Abrahams 2002.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BORROWED_DWA2002614_HPP
|
||||
# define BORROWED_DWA2002614_HPP
|
||||
|
||||
# include <boost/python/detail/prefix.hpp>
|
||||
# include <boost/python/detail/borrowed_ptr.hpp>
|
||||
|
||||
namespace boost { namespace python {
|
||||
|
||||
template <class T>
|
||||
inline python::detail::borrowed<T>* borrowed(T* p)
|
||||
{
|
||||
return (detail::borrowed<T>*)p;
|
||||
}
|
||||
|
||||
}} // namespace boost::python
|
||||
|
||||
#endif // BORROWED_DWA2002614_HPP
|
||||
@@ -0,0 +1,34 @@
|
||||
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
|
||||
// unit/quantity manipulation and conversion
|
||||
//
|
||||
// Copyright (C) 2003-2008 Matthias Christian Schabel
|
||||
// Copyright (C) 2008 Steven Watanabe
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_UNITS_SI_ENERGY_HPP
|
||||
#define BOOST_UNITS_SI_ENERGY_HPP
|
||||
|
||||
#include <boost/units/systems/si/base.hpp>
|
||||
#include <boost/units/physical_dimensions/energy.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace units {
|
||||
|
||||
namespace si {
|
||||
|
||||
typedef unit<energy_dimension,si::system> energy;
|
||||
|
||||
BOOST_UNITS_STATIC_CONSTANT(joule,energy);
|
||||
BOOST_UNITS_STATIC_CONSTANT(joules,energy);
|
||||
|
||||
} // namespace si
|
||||
|
||||
} // namespace units
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_UNITS_SI_ENERGY_HPP
|
||||
@@ -0,0 +1,130 @@
|
||||
// (C) Copyright Gennadiy Rozental 2001.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org/libs/test for the library home page.
|
||||
//
|
||||
//! @file
|
||||
//! @brief Floating point comparison tolerance manipulators
|
||||
//!
|
||||
//! This file defines several manipulators for floating point comparison. These
|
||||
//! manipulators are intended to be used with BOOST_TEST.
|
||||
// ***************************************************************************
|
||||
|
||||
#ifndef BOOST_TEST_TOOLS_DETAIL_TOLERANCE_MANIP_HPP_012705GER
|
||||
#define BOOST_TEST_TOOLS_DETAIL_TOLERANCE_MANIP_HPP_012705GER
|
||||
|
||||
// Boost Test
|
||||
#include <boost/test/tools/detail/fwd.hpp>
|
||||
#include <boost/test/tools/detail/indirections.hpp>
|
||||
|
||||
#include <boost/test/tools/fpc_tolerance.hpp>
|
||||
#include <boost/test/tools/floating_point_comparison.hpp>
|
||||
|
||||
#include <boost/test/detail/suppress_warnings.hpp>
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
namespace boost {
|
||||
namespace test_tools {
|
||||
namespace tt_detail {
|
||||
|
||||
// ************************************************************************** //
|
||||
// ************** fpc tolerance manipulator ************** //
|
||||
// ************************************************************************** //
|
||||
|
||||
template<typename FPT>
|
||||
struct tolerance_manip {
|
||||
explicit tolerance_manip( FPT const & tol ) : m_value( tol ) {}
|
||||
|
||||
FPT m_value;
|
||||
};
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
struct tolerance_manip_delay {};
|
||||
|
||||
template<typename FPT>
|
||||
inline tolerance_manip<FPT>
|
||||
operator%( FPT v, tolerance_manip_delay const& )
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG( (fpc::tolerance_based<FPT>::value),
|
||||
"tolerance should be specified using a floating points type" );
|
||||
|
||||
return tolerance_manip<FPT>( FPT(v / 100) );
|
||||
}
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
template<typename E, typename FPT>
|
||||
inline assertion_result
|
||||
operator<<(assertion_evaluate_t<E> const& ae, tolerance_manip<FPT> const& tol)
|
||||
{
|
||||
local_fpc_tolerance<FPT> lt( tol.m_value );
|
||||
|
||||
return ae.m_e.evaluate();
|
||||
}
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
template<typename FPT>
|
||||
inline int
|
||||
operator<<( unit_test::lazy_ostream const&, tolerance_manip<FPT> const& ) { return 0; }
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
template<typename FPT>
|
||||
inline check_type
|
||||
operator<<( assertion_type const& /*at*/, tolerance_manip<FPT> const& ) { return CHECK_BUILT_ASSERTION; }
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
} // namespace tt_detail
|
||||
|
||||
|
||||
/*! Tolerance manipulator
|
||||
*
|
||||
* These functions return a manipulator that can be used in conjunction with BOOST_TEST
|
||||
* in order to specify the tolerance with which floating point comparisons are made.
|
||||
*/
|
||||
template<typename FPT>
|
||||
inline tt_detail::tolerance_manip<FPT>
|
||||
tolerance( FPT v )
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG( (fpc::tolerance_based<FPT>::value),
|
||||
"tolerance only for floating points" );
|
||||
|
||||
return tt_detail::tolerance_manip<FPT>( v );
|
||||
}
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
//! @overload tolerance( FPT v )
|
||||
template<typename FPT>
|
||||
inline tt_detail::tolerance_manip<FPT>
|
||||
tolerance( fpc::percent_tolerance_t<FPT> v )
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG( (fpc::tolerance_based<FPT>::value),
|
||||
"tolerance only for floating points" );
|
||||
|
||||
return tt_detail::tolerance_manip<FPT>( static_cast<FPT>(v.m_value / 100) );
|
||||
}
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
//! @overload tolerance( FPT v )
|
||||
inline tt_detail::tolerance_manip_delay
|
||||
tolerance()
|
||||
{
|
||||
return tt_detail::tolerance_manip_delay();
|
||||
}
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
} // namespace test_tools
|
||||
} // namespace boost
|
||||
|
||||
#include <boost/test/detail/enable_warnings.hpp>
|
||||
|
||||
#endif // BOOST_TEST_TOOLS_DETAIL_TOLERANCE_MANIP_HPP_012705GER
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,199 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Copyright 2013 John Maddock. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
|
||||
|
||||
#ifndef BOOST_MP_CPP_INT_SERIALIZE_HPP
|
||||
#define BOOST_MP_CPP_INT_SERIALIZE_HPP
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace archive{
|
||||
|
||||
class binary_oarchive;
|
||||
class binary_iarchive;
|
||||
|
||||
}
|
||||
|
||||
namespace serialization {
|
||||
|
||||
namespace mp = boost::multiprecision;
|
||||
|
||||
namespace cpp_int_detail{
|
||||
|
||||
using namespace boost::multiprecision;
|
||||
using namespace boost::multiprecision::backends;
|
||||
|
||||
template <class T>
|
||||
struct is_binary_archive : public mpl::false_ {};
|
||||
template <>
|
||||
struct is_binary_archive<boost::archive::binary_oarchive> : public mpl::true_ {};
|
||||
template <>
|
||||
struct is_binary_archive<boost::archive::binary_iarchive> : public mpl::true_ {};
|
||||
|
||||
//
|
||||
// We have 8 serialization methods to fill out (and test), they are all permutations of:
|
||||
// Load vs Store.
|
||||
// Trivial or non-trivial cpp_int type.
|
||||
// Binary or not archive.
|
||||
//
|
||||
template <class Archive, class Int>
|
||||
void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::false_ const&, mpl::false_ const&)
|
||||
{
|
||||
// Load.
|
||||
// Non-trivial.
|
||||
// Non binary.
|
||||
|
||||
bool s;
|
||||
ar & s;
|
||||
std::size_t limb_count;
|
||||
std::size_t byte_count;
|
||||
ar & byte_count;
|
||||
limb_count = byte_count / sizeof(limb_type) + ((byte_count % sizeof(limb_type)) ? 1 : 0);
|
||||
val.resize(limb_count, limb_count);
|
||||
limb_type* pl = val.limbs();
|
||||
for(std::size_t i = 0; i < limb_count; ++i)
|
||||
{
|
||||
pl[i] = 0;
|
||||
for(std::size_t j = 0; (j < sizeof(limb_type)) && byte_count; ++j)
|
||||
{
|
||||
unsigned char byte;
|
||||
ar & byte;
|
||||
pl[i] |= static_cast<limb_type>(byte) << (j * CHAR_BIT);
|
||||
--byte_count;
|
||||
}
|
||||
}
|
||||
if(s != val.sign())
|
||||
val.negate();
|
||||
val.normalize();
|
||||
}
|
||||
template <class Archive, class Int>
|
||||
void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::false_ const&, mpl::false_ const&)
|
||||
{
|
||||
// Store.
|
||||
// Non-trivial.
|
||||
// Non binary.
|
||||
|
||||
bool s = val.sign();
|
||||
ar & s;
|
||||
limb_type* pl = val.limbs();
|
||||
std::size_t limb_count = val.size();
|
||||
std::size_t byte_count = limb_count * sizeof(limb_type);
|
||||
ar & byte_count;
|
||||
|
||||
for(std::size_t i = 0; i < limb_count; ++i)
|
||||
{
|
||||
limb_type l = pl[i];
|
||||
for(std::size_t j = 0; j < sizeof(limb_type); ++j)
|
||||
{
|
||||
unsigned char byte = static_cast<unsigned char>((l >> (j * CHAR_BIT)) & ((1u << CHAR_BIT) - 1));
|
||||
ar & byte;
|
||||
}
|
||||
}
|
||||
}
|
||||
template <class Archive, class Int>
|
||||
void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::true_ const&, mpl::false_ const&)
|
||||
{
|
||||
// Load.
|
||||
// Trivial.
|
||||
// Non binary.
|
||||
bool s;
|
||||
typename Int::local_limb_type l = 0;
|
||||
ar & s;
|
||||
std::size_t byte_count;
|
||||
ar & byte_count;
|
||||
for(std::size_t i = 0; i < byte_count; ++i)
|
||||
{
|
||||
unsigned char b;
|
||||
ar & b;
|
||||
l |= static_cast<typename Int::local_limb_type>(b) << (i * CHAR_BIT);
|
||||
}
|
||||
*val.limbs() = l;
|
||||
if(s != val.sign())
|
||||
val.negate();
|
||||
}
|
||||
template <class Archive, class Int>
|
||||
void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::true_ const&, mpl::false_ const&)
|
||||
{
|
||||
// Store.
|
||||
// Trivial.
|
||||
// Non binary.
|
||||
bool s = val.sign();
|
||||
typename Int::local_limb_type l = *val.limbs();
|
||||
ar & s;
|
||||
std::size_t limb_count = sizeof(l);
|
||||
ar & limb_count;
|
||||
for(std::size_t i = 0; i < limb_count; ++i)
|
||||
{
|
||||
unsigned char b = static_cast<unsigned char>(static_cast<typename Int::local_limb_type>(l >> (i * CHAR_BIT)) & static_cast<typename Int::local_limb_type>((1u << CHAR_BIT) - 1));
|
||||
ar & b;
|
||||
}
|
||||
}
|
||||
template <class Archive, class Int>
|
||||
void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::false_ const&, mpl::true_ const&)
|
||||
{
|
||||
// Load.
|
||||
// Non-trivial.
|
||||
// Binary.
|
||||
bool s;
|
||||
std::size_t c;
|
||||
ar & s;
|
||||
ar & c;
|
||||
val.resize(c, c);
|
||||
ar.load_binary(val.limbs(), c * sizeof(limb_type));
|
||||
if(s != val.sign())
|
||||
val.negate();
|
||||
val.normalize();
|
||||
}
|
||||
template <class Archive, class Int>
|
||||
void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::false_ const&, mpl::true_ const&)
|
||||
{
|
||||
// Store.
|
||||
// Non-trivial.
|
||||
// Binary.
|
||||
bool s = val.sign();
|
||||
std::size_t c = val.size();
|
||||
ar & s;
|
||||
ar & c;
|
||||
ar.save_binary(val.limbs(), c * sizeof(limb_type));
|
||||
}
|
||||
template <class Archive, class Int>
|
||||
void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::true_ const&, mpl::true_ const&)
|
||||
{
|
||||
// Load.
|
||||
// Trivial.
|
||||
// Binary.
|
||||
bool s;
|
||||
ar & s;
|
||||
ar.load_binary(val.limbs(), sizeof(*val.limbs()));
|
||||
if(s != val.sign())
|
||||
val.negate();
|
||||
}
|
||||
template <class Archive, class Int>
|
||||
void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::true_ const&, mpl::true_ const&)
|
||||
{
|
||||
// Store.
|
||||
// Trivial.
|
||||
// Binary.
|
||||
bool s = val.sign();
|
||||
ar & s;
|
||||
ar.save_binary(val.limbs(), sizeof(*val.limbs()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
template<class Archive, unsigned MinBits, unsigned MaxBits, mp::cpp_integer_type SignType, mp::cpp_int_check_type Checked, class Allocator>
|
||||
void serialize(Archive & ar, mp::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& val, const unsigned int /*version*/)
|
||||
{
|
||||
typedef typename Archive::is_saving save_tag;
|
||||
typedef mpl::bool_<mp::backends::is_trivial_cpp_int<mp::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value> trivial_tag;
|
||||
typedef typename cpp_int_detail::is_binary_archive<Archive>::type binary_tag;
|
||||
|
||||
// Just dispatch to the correct method:
|
||||
cpp_int_detail::do_serialize(ar, val, save_tag(), trivial_tag(), binary_tag());
|
||||
}
|
||||
|
||||
}} // namespaces
|
||||
|
||||
#endif // BOOST_MP_CPP_INT_SERIALIZE_HPP
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
// -*- Mode: C++ -*-
|
||||
/*
|
||||
* Class to handle the formatted string as returned from the fortran decoder
|
||||
*
|
||||
* VK3ACF August 2013
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DECODEDTEXT_H
|
||||
#define DECODEDTEXT_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
|
||||
|
||||
/*
|
||||
0123456789012345678901234567890123456789
|
||||
^ ^ ^ ^ ^ ^
|
||||
2343 -11 0.8 1259 # YV6BFE F6GUU R-08
|
||||
2343 -19 0.3 718 # VE6WQ SQ2NIJ -14
|
||||
2343 -7 0.3 815 # KK4DSD W7VP -16
|
||||
2343 -13 0.1 3627 @ CT1FBK IK5YZT R+02
|
||||
|
||||
0605 Tx 1259 # CQ VK3ACF QF22
|
||||
*/
|
||||
|
||||
class DecodedText
|
||||
{
|
||||
public:
|
||||
void operator=(const QString &rhs)
|
||||
{
|
||||
_string = rhs;
|
||||
padding_ = _string.indexOf (" ") > 4 ? 2 : 0; // allow for seconds
|
||||
};
|
||||
void operator=(const QByteArray &rhs)
|
||||
{
|
||||
_string = rhs;
|
||||
padding_ = _string.indexOf (" ") > 4 ? 2 : 0; // allow for seconds
|
||||
};
|
||||
|
||||
void operator+=(const QString &rhs)
|
||||
{
|
||||
_string += rhs;
|
||||
};
|
||||
|
||||
QString string() { return _string; };
|
||||
|
||||
int indexOf(QString s) { return _string.indexOf(s); };
|
||||
int indexOf(QString s, int i) { return _string.indexOf(s,i); };
|
||||
QString mid(int f, int t) { return _string.mid(f,t); };
|
||||
QString left(int i) { return _string.left(i); };
|
||||
|
||||
void clear() { _string.clear(); };
|
||||
|
||||
QString CQersCall();
|
||||
|
||||
bool isJT65();
|
||||
bool isJT9();
|
||||
bool isTX();
|
||||
bool isLowConfidence ();
|
||||
int frequencyOffset(); // hertz offset from the tuned dial or rx frequency, aka audio frequency
|
||||
int snr();
|
||||
float dt();
|
||||
|
||||
// find and extract any report. Returns true if this is a standard message
|
||||
bool report(QString const& myBaseCall, QString const& dxBaseCall, /*mod*/QString& report);
|
||||
|
||||
// get the first message text word, usually the call
|
||||
QString call();
|
||||
|
||||
// get the second word, most likely the de call and the third word, most likely grid
|
||||
void deCallAndGrid(/*out*/QString& call, QString& grid);
|
||||
|
||||
int timeInSeconds();
|
||||
|
||||
// returns a string of the SNR field with a leading + or - followed by two digits
|
||||
QString report();
|
||||
|
||||
private:
|
||||
// These define the columns in the decoded text where fields are to be found.
|
||||
// We rely on these columns being the same in the fortran code (lib/decoder.f90) that formats the decoded text
|
||||
enum Columns {column_time = 0,
|
||||
column_snr = 5,
|
||||
column_dt = 9,
|
||||
column_freq = 14,
|
||||
column_mode = 19,
|
||||
column_qsoText = 22 };
|
||||
|
||||
QString _string;
|
||||
int padding_;
|
||||
};
|
||||
|
||||
#endif // DECODEDTEXT_H
|
||||
@@ -0,0 +1,40 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2011 Eric Niebler
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_SINGLE_VIEW_VALUE_OF_IMPL_05052005_0324)
|
||||
#define BOOST_FUSION_SINGLE_VIEW_VALUE_OF_IMPL_05052005_0324
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/mpl/equal_to.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct single_view_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct value_of_impl;
|
||||
|
||||
template <>
|
||||
struct value_of_impl<single_view_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
BOOST_MPL_ASSERT((mpl::equal_to<typename Iterator::position, mpl::int_<0> >));
|
||||
typedef typename Iterator::value_type type;
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// archive_serializer_map.ipp:
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// implementation of basic_text_iprimitive overrides for the combination
|
||||
// of template parameters used to implement a text_iprimitive
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/archive/detail/archive_serializer_map.hpp>
|
||||
#include <boost/archive/detail/basic_serializer_map.hpp>
|
||||
#include <boost/serialization/singleton.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
namespace detail {
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable : 4511 4512)
|
||||
#endif
|
||||
|
||||
namespace extra_detail { // anon
|
||||
template<class Archive>
|
||||
class map : public basic_serializer_map
|
||||
{};
|
||||
}
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
template<class Archive>
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL bool
|
||||
archive_serializer_map<Archive>::insert(const basic_serializer * bs){
|
||||
return boost::serialization::singleton<
|
||||
extra_detail::map<Archive>
|
||||
>::get_mutable_instance().insert(bs);
|
||||
}
|
||||
|
||||
template<class Archive>
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
archive_serializer_map<Archive>::erase(const basic_serializer * bs){
|
||||
if(boost::serialization::singleton<
|
||||
extra_detail::map<Archive>
|
||||
>::is_destroyed())
|
||||
return;
|
||||
boost::serialization::singleton<
|
||||
extra_detail::map<Archive>
|
||||
>::get_mutable_instance().erase(bs);
|
||||
}
|
||||
|
||||
template<class Archive>
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL const basic_serializer *
|
||||
archive_serializer_map<Archive>::find(
|
||||
const boost::serialization::extended_type_info & eti
|
||||
) {
|
||||
return boost::serialization::singleton<
|
||||
extra_detail::map<Archive>
|
||||
>::get_const_instance().find(eti);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
} // namespace archive
|
||||
} // namespace boost
|
||||
@@ -0,0 +1,31 @@
|
||||
// Copyright David Abrahams 2004. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef UNWRAP_TYPE_ID_DWA2004722_HPP
|
||||
# define UNWRAP_TYPE_ID_DWA2004722_HPP
|
||||
|
||||
# include <boost/python/type_id.hpp>
|
||||
|
||||
# include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace python {
|
||||
|
||||
template <class T> class wrapper;
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <class T>
|
||||
inline type_info unwrap_type_id(T*, ...)
|
||||
{
|
||||
return type_id<T>();
|
||||
}
|
||||
|
||||
template <class U, class T>
|
||||
inline type_info unwrap_type_id(U*, wrapper<T>*)
|
||||
{
|
||||
return type_id<T>();
|
||||
}
|
||||
|
||||
}}} // namespace boost::python::detail
|
||||
|
||||
#endif // UNWRAP_TYPE_ID_DWA2004722_HPP
|
||||
@@ -0,0 +1,516 @@
|
||||
// boost\math\distributions\geometric.hpp
|
||||
|
||||
// Copyright John Maddock 2010.
|
||||
// Copyright Paul A. Bristow 2010.
|
||||
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt
|
||||
// or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// geometric distribution is a discrete probability distribution.
|
||||
// It expresses the probability distribution of the number (k) of
|
||||
// events, occurrences, failures or arrivals before the first success.
|
||||
// supported on the set {0, 1, 2, 3...}
|
||||
|
||||
// Note that the set includes zero (unlike some definitions that start at one).
|
||||
|
||||
// The random variate k is the number of events, occurrences or arrivals.
|
||||
// k argument may be integral, signed, or unsigned, or floating point.
|
||||
// If necessary, it has already been promoted from an integral type.
|
||||
|
||||
// Note that the geometric distribution
|
||||
// (like others including the binomial, geometric & Bernoulli)
|
||||
// is strictly defined as a discrete function:
|
||||
// only integral values of k are envisaged.
|
||||
// However because the method of calculation uses a continuous gamma function,
|
||||
// it is convenient to treat it as if a continous function,
|
||||
// and permit non-integral values of k.
|
||||
// To enforce the strict mathematical model, users should use floor or ceil functions
|
||||
// on k outside this function to ensure that k is integral.
|
||||
|
||||
// See http://en.wikipedia.org/wiki/geometric_distribution
|
||||
// http://documents.wolfram.com/v5/Add-onsLinks/StandardPackages/Statistics/DiscreteDistributions.html
|
||||
// http://mathworld.wolfram.com/GeometricDistribution.html
|
||||
|
||||
#ifndef BOOST_MATH_SPECIAL_GEOMETRIC_HPP
|
||||
#define BOOST_MATH_SPECIAL_GEOMETRIC_HPP
|
||||
|
||||
#include <boost/math/distributions/fwd.hpp>
|
||||
#include <boost/math/special_functions/beta.hpp> // for ibeta(a, b, x) == Ix(a, b).
|
||||
#include <boost/math/distributions/complement.hpp> // complement.
|
||||
#include <boost/math/distributions/detail/common_error_handling.hpp> // error checks domain_error & logic_error.
|
||||
#include <boost/math/special_functions/fpclassify.hpp> // isnan.
|
||||
#include <boost/math/tools/roots.hpp> // for root finding.
|
||||
#include <boost/math/distributions/detail/inv_discrete_quantile.hpp>
|
||||
|
||||
#include <boost/type_traits/is_floating_point.hpp>
|
||||
#include <boost/type_traits/is_integral.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
#include <limits> // using std::numeric_limits;
|
||||
#include <utility>
|
||||
|
||||
#if defined (BOOST_MSVC)
|
||||
# pragma warning(push)
|
||||
// This believed not now necessary, so commented out.
|
||||
//# pragma warning(disable: 4702) // unreachable code.
|
||||
// in domain_error_imp in error_handling.
|
||||
#endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace math
|
||||
{
|
||||
namespace geometric_detail
|
||||
{
|
||||
// Common error checking routines for geometric distribution function:
|
||||
template <class RealType, class Policy>
|
||||
inline bool check_success_fraction(const char* function, const RealType& p, RealType* result, const Policy& pol)
|
||||
{
|
||||
if( !(boost::math::isfinite)(p) || (p < 0) || (p > 1) )
|
||||
{
|
||||
*result = policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"Success fraction argument is %1%, but must be >= 0 and <= 1 !", p, pol);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline bool check_dist(const char* function, const RealType& p, RealType* result, const Policy& pol)
|
||||
{
|
||||
return check_success_fraction(function, p, result, pol);
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline bool check_dist_and_k(const char* function, const RealType& p, RealType k, RealType* result, const Policy& pol)
|
||||
{
|
||||
if(check_dist(function, p, result, pol) == false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if( !(boost::math::isfinite)(k) || (k < 0) )
|
||||
{ // Check k failures.
|
||||
*result = policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"Number of failures argument is %1%, but must be >= 0 !", k, pol);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} // Check_dist_and_k
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline bool check_dist_and_prob(const char* function, RealType p, RealType prob, RealType* result, const Policy& pol)
|
||||
{
|
||||
if((check_dist(function, p, result, pol) && detail::check_probability(function, prob, result, pol)) == false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} // check_dist_and_prob
|
||||
} // namespace geometric_detail
|
||||
|
||||
template <class RealType = double, class Policy = policies::policy<> >
|
||||
class geometric_distribution
|
||||
{
|
||||
public:
|
||||
typedef RealType value_type;
|
||||
typedef Policy policy_type;
|
||||
|
||||
geometric_distribution(RealType p) : m_p(p)
|
||||
{ // Constructor stores success_fraction p.
|
||||
RealType result;
|
||||
geometric_detail::check_dist(
|
||||
"geometric_distribution<%1%>::geometric_distribution",
|
||||
m_p, // Check success_fraction 0 <= p <= 1.
|
||||
&result, Policy());
|
||||
} // geometric_distribution constructor.
|
||||
|
||||
// Private data getter class member functions.
|
||||
RealType success_fraction() const
|
||||
{ // Probability of success as fraction in range 0 to 1.
|
||||
return m_p;
|
||||
}
|
||||
RealType successes() const
|
||||
{ // Total number of successes r = 1 (for compatibility with negative binomial?).
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Parameter estimation.
|
||||
// (These are copies of negative_binomial distribution with successes = 1).
|
||||
static RealType find_lower_bound_on_p(
|
||||
RealType trials,
|
||||
RealType alpha) // alpha 0.05 equivalent to 95% for one-sided test.
|
||||
{
|
||||
static const char* function = "boost::math::geometric<%1%>::find_lower_bound_on_p";
|
||||
RealType result = 0; // of error checks.
|
||||
RealType successes = 1;
|
||||
RealType failures = trials - successes;
|
||||
if(false == detail::check_probability(function, alpha, &result, Policy())
|
||||
&& geometric_detail::check_dist_and_k(
|
||||
function, RealType(0), failures, &result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
// Use complement ibeta_inv function for lower bound.
|
||||
// This is adapted from the corresponding binomial formula
|
||||
// here: http://www.itl.nist.gov/div898/handbook/prc/section2/prc241.htm
|
||||
// This is a Clopper-Pearson interval, and may be overly conservative,
|
||||
// see also "A Simple Improved Inferential Method for Some
|
||||
// Discrete Distributions" Yong CAI and K. KRISHNAMOORTHY
|
||||
// http://www.ucs.louisiana.edu/~kxk4695/Discrete_new.pdf
|
||||
//
|
||||
return ibeta_inv(successes, failures + 1, alpha, static_cast<RealType*>(0), Policy());
|
||||
} // find_lower_bound_on_p
|
||||
|
||||
static RealType find_upper_bound_on_p(
|
||||
RealType trials,
|
||||
RealType alpha) // alpha 0.05 equivalent to 95% for one-sided test.
|
||||
{
|
||||
static const char* function = "boost::math::geometric<%1%>::find_upper_bound_on_p";
|
||||
RealType result = 0; // of error checks.
|
||||
RealType successes = 1;
|
||||
RealType failures = trials - successes;
|
||||
if(false == geometric_detail::check_dist_and_k(
|
||||
function, RealType(0), failures, &result, Policy())
|
||||
&& detail::check_probability(function, alpha, &result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
if(failures == 0)
|
||||
{
|
||||
return 1;
|
||||
}// Use complement ibetac_inv function for upper bound.
|
||||
// Note adjusted failures value: *not* failures+1 as usual.
|
||||
// This is adapted from the corresponding binomial formula
|
||||
// here: http://www.itl.nist.gov/div898/handbook/prc/section2/prc241.htm
|
||||
// This is a Clopper-Pearson interval, and may be overly conservative,
|
||||
// see also "A Simple Improved Inferential Method for Some
|
||||
// Discrete Distributions" Yong CAI and K. Krishnamoorthy
|
||||
// http://www.ucs.louisiana.edu/~kxk4695/Discrete_new.pdf
|
||||
//
|
||||
return ibetac_inv(successes, failures, alpha, static_cast<RealType*>(0), Policy());
|
||||
} // find_upper_bound_on_p
|
||||
|
||||
// Estimate number of trials :
|
||||
// "How many trials do I need to be P% sure of seeing k or fewer failures?"
|
||||
|
||||
static RealType find_minimum_number_of_trials(
|
||||
RealType k, // number of failures (k >= 0).
|
||||
RealType p, // success fraction 0 <= p <= 1.
|
||||
RealType alpha) // risk level threshold 0 <= alpha <= 1.
|
||||
{
|
||||
static const char* function = "boost::math::geometric<%1%>::find_minimum_number_of_trials";
|
||||
// Error checks:
|
||||
RealType result = 0;
|
||||
if(false == geometric_detail::check_dist_and_k(
|
||||
function, p, k, &result, Policy())
|
||||
&& detail::check_probability(function, alpha, &result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
result = ibeta_inva(k + 1, p, alpha, Policy()); // returns n - k
|
||||
return result + k;
|
||||
} // RealType find_number_of_failures
|
||||
|
||||
static RealType find_maximum_number_of_trials(
|
||||
RealType k, // number of failures (k >= 0).
|
||||
RealType p, // success fraction 0 <= p <= 1.
|
||||
RealType alpha) // risk level threshold 0 <= alpha <= 1.
|
||||
{
|
||||
static const char* function = "boost::math::geometric<%1%>::find_maximum_number_of_trials";
|
||||
// Error checks:
|
||||
RealType result = 0;
|
||||
if(false == geometric_detail::check_dist_and_k(
|
||||
function, p, k, &result, Policy())
|
||||
&& detail::check_probability(function, alpha, &result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
result = ibetac_inva(k + 1, p, alpha, Policy()); // returns n - k
|
||||
return result + k;
|
||||
} // RealType find_number_of_trials complemented
|
||||
|
||||
private:
|
||||
//RealType m_r; // successes fixed at unity.
|
||||
RealType m_p; // success_fraction
|
||||
}; // template <class RealType, class Policy> class geometric_distribution
|
||||
|
||||
typedef geometric_distribution<double> geometric; // Reserved name of type double.
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline const std::pair<RealType, RealType> range(const geometric_distribution<RealType, Policy>& /* dist */)
|
||||
{ // Range of permissible values for random variable k.
|
||||
using boost::math::tools::max_value;
|
||||
return std::pair<RealType, RealType>(static_cast<RealType>(0), max_value<RealType>()); // max_integer?
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline const std::pair<RealType, RealType> support(const geometric_distribution<RealType, Policy>& /* dist */)
|
||||
{ // Range of supported values for random variable k.
|
||||
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
|
||||
using boost::math::tools::max_value;
|
||||
return std::pair<RealType, RealType>(static_cast<RealType>(0), max_value<RealType>()); // max_integer?
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType mean(const geometric_distribution<RealType, Policy>& dist)
|
||||
{ // Mean of geometric distribution = (1-p)/p.
|
||||
return (1 - dist.success_fraction() ) / dist.success_fraction();
|
||||
} // mean
|
||||
|
||||
// median implemented via quantile(half) in derived accessors.
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType mode(const geometric_distribution<RealType, Policy>&)
|
||||
{ // Mode of geometric distribution = zero.
|
||||
BOOST_MATH_STD_USING // ADL of std functions.
|
||||
return 0;
|
||||
} // mode
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType variance(const geometric_distribution<RealType, Policy>& dist)
|
||||
{ // Variance of Binomial distribution = (1-p) / p^2.
|
||||
return (1 - dist.success_fraction())
|
||||
/ (dist.success_fraction() * dist.success_fraction());
|
||||
} // variance
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType skewness(const geometric_distribution<RealType, Policy>& dist)
|
||||
{ // skewness of geometric distribution = 2-p / (sqrt(r(1-p))
|
||||
BOOST_MATH_STD_USING // ADL of std functions.
|
||||
RealType p = dist.success_fraction();
|
||||
return (2 - p) / sqrt(1 - p);
|
||||
} // skewness
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType kurtosis(const geometric_distribution<RealType, Policy>& dist)
|
||||
{ // kurtosis of geometric distribution
|
||||
// http://en.wikipedia.org/wiki/geometric is kurtosis_excess so add 3
|
||||
RealType p = dist.success_fraction();
|
||||
return 3 + (p*p - 6*p + 6) / (1 - p);
|
||||
} // kurtosis
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType kurtosis_excess(const geometric_distribution<RealType, Policy>& dist)
|
||||
{ // kurtosis excess of geometric distribution
|
||||
// http://mathworld.wolfram.com/Kurtosis.html table of kurtosis_excess
|
||||
RealType p = dist.success_fraction();
|
||||
return (p*p - 6*p + 6) / (1 - p);
|
||||
} // kurtosis_excess
|
||||
|
||||
// RealType standard_deviation(const geometric_distribution<RealType, Policy>& dist)
|
||||
// standard_deviation provided by derived accessors.
|
||||
// RealType hazard(const geometric_distribution<RealType, Policy>& dist)
|
||||
// hazard of geometric distribution provided by derived accessors.
|
||||
// RealType chf(const geometric_distribution<RealType, Policy>& dist)
|
||||
// chf of geometric distribution provided by derived accessors.
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType pdf(const geometric_distribution<RealType, Policy>& dist, const RealType& k)
|
||||
{ // Probability Density/Mass Function.
|
||||
BOOST_FPU_EXCEPTION_GUARD
|
||||
BOOST_MATH_STD_USING // For ADL of math functions.
|
||||
static const char* function = "boost::math::pdf(const geometric_distribution<%1%>&, %1%)";
|
||||
|
||||
RealType p = dist.success_fraction();
|
||||
RealType result = 0;
|
||||
if(false == geometric_detail::check_dist_and_k(
|
||||
function,
|
||||
p,
|
||||
k,
|
||||
&result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
if (k == 0)
|
||||
{
|
||||
return p; // success_fraction
|
||||
}
|
||||
RealType q = 1 - p; // Inaccurate for small p?
|
||||
// So try to avoid inaccuracy for large or small p.
|
||||
// but has little effect > last significant bit.
|
||||
//cout << "p * pow(q, k) " << result << endl; // seems best whatever p
|
||||
//cout << "exp(p * k * log1p(-p)) " << p * exp(k * log1p(-p)) << endl;
|
||||
//if (p < 0.5)
|
||||
//{
|
||||
// result = p * pow(q, k);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// result = p * exp(k * log1p(-p));
|
||||
//}
|
||||
result = p * pow(q, k);
|
||||
return result;
|
||||
} // geometric_pdf
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType cdf(const geometric_distribution<RealType, Policy>& dist, const RealType& k)
|
||||
{ // Cumulative Distribution Function of geometric.
|
||||
static const char* function = "boost::math::cdf(const geometric_distribution<%1%>&, %1%)";
|
||||
|
||||
// k argument may be integral, signed, or unsigned, or floating point.
|
||||
// If necessary, it has already been promoted from an integral type.
|
||||
RealType p = dist.success_fraction();
|
||||
// Error check:
|
||||
RealType result = 0;
|
||||
if(false == geometric_detail::check_dist_and_k(
|
||||
function,
|
||||
p,
|
||||
k,
|
||||
&result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
if(k == 0)
|
||||
{
|
||||
return p; // success_fraction
|
||||
}
|
||||
//RealType q = 1 - p; // Bad for small p
|
||||
//RealType probability = 1 - std::pow(q, k+1);
|
||||
|
||||
RealType z = boost::math::log1p(-p, Policy()) * (k + 1);
|
||||
RealType probability = -boost::math::expm1(z, Policy());
|
||||
|
||||
return probability;
|
||||
} // cdf Cumulative Distribution Function geometric.
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType cdf(const complemented2_type<geometric_distribution<RealType, Policy>, RealType>& c)
|
||||
{ // Complemented Cumulative Distribution Function geometric.
|
||||
BOOST_MATH_STD_USING
|
||||
static const char* function = "boost::math::cdf(const geometric_distribution<%1%>&, %1%)";
|
||||
// k argument may be integral, signed, or unsigned, or floating point.
|
||||
// If necessary, it has already been promoted from an integral type.
|
||||
RealType const& k = c.param;
|
||||
geometric_distribution<RealType, Policy> const& dist = c.dist;
|
||||
RealType p = dist.success_fraction();
|
||||
// Error check:
|
||||
RealType result = 0;
|
||||
if(false == geometric_detail::check_dist_and_k(
|
||||
function,
|
||||
p,
|
||||
k,
|
||||
&result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
RealType z = boost::math::log1p(-p, Policy()) * (k+1);
|
||||
RealType probability = exp(z);
|
||||
return probability;
|
||||
} // cdf Complemented Cumulative Distribution Function geometric.
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType quantile(const geometric_distribution<RealType, Policy>& dist, const RealType& x)
|
||||
{ // Quantile, percentile/100 or Percent Point geometric function.
|
||||
// Return the number of expected failures k for a given probability p.
|
||||
|
||||
// Inverse cumulative Distribution Function or Quantile (percentile / 100) of geometric Probability.
|
||||
// k argument may be integral, signed, or unsigned, or floating point.
|
||||
|
||||
static const char* function = "boost::math::quantile(const geometric_distribution<%1%>&, %1%)";
|
||||
BOOST_MATH_STD_USING // ADL of std functions.
|
||||
|
||||
RealType success_fraction = dist.success_fraction();
|
||||
// Check dist and x.
|
||||
RealType result = 0;
|
||||
if(false == geometric_detail::check_dist_and_prob
|
||||
(function, success_fraction, x, &result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
// Special cases.
|
||||
if (x == 1)
|
||||
{ // Would need +infinity failures for total confidence.
|
||||
result = policies::raise_overflow_error<RealType>(
|
||||
function,
|
||||
"Probability argument is 1, which implies infinite failures !", Policy());
|
||||
return result;
|
||||
// usually means return +std::numeric_limits<RealType>::infinity();
|
||||
// unless #define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
|
||||
}
|
||||
if (x == 0)
|
||||
{ // No failures are expected if P = 0.
|
||||
return 0; // Total trials will be just dist.successes.
|
||||
}
|
||||
// if (P <= pow(dist.success_fraction(), 1))
|
||||
if (x <= success_fraction)
|
||||
{ // p <= pdf(dist, 0) == cdf(dist, 0)
|
||||
return 0;
|
||||
}
|
||||
if (x == 1)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// log(1-x) /log(1-success_fraction) -1; but use log1p in case success_fraction is small
|
||||
result = boost::math::log1p(-x, Policy()) / boost::math::log1p(-success_fraction, Policy()) - 1;
|
||||
// Subtract a few epsilons here too?
|
||||
// to make sure it doesn't slip over, so ceil would be one too many.
|
||||
return result;
|
||||
} // RealType quantile(const geometric_distribution dist, p)
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType quantile(const complemented2_type<geometric_distribution<RealType, Policy>, RealType>& c)
|
||||
{ // Quantile or Percent Point Binomial function.
|
||||
// Return the number of expected failures k for a given
|
||||
// complement of the probability Q = 1 - P.
|
||||
static const char* function = "boost::math::quantile(const geometric_distribution<%1%>&, %1%)";
|
||||
BOOST_MATH_STD_USING
|
||||
// Error checks:
|
||||
RealType x = c.param;
|
||||
const geometric_distribution<RealType, Policy>& dist = c.dist;
|
||||
RealType success_fraction = dist.success_fraction();
|
||||
RealType result = 0;
|
||||
if(false == geometric_detail::check_dist_and_prob(
|
||||
function,
|
||||
success_fraction,
|
||||
x,
|
||||
&result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
// Special cases:
|
||||
if(x == 1)
|
||||
{ // There may actually be no answer to this question,
|
||||
// since the probability of zero failures may be non-zero,
|
||||
return 0; // but zero is the best we can do:
|
||||
}
|
||||
if (-x <= boost::math::powm1(dist.success_fraction(), dist.successes(), Policy()))
|
||||
{ // q <= cdf(complement(dist, 0)) == pdf(dist, 0)
|
||||
return 0; //
|
||||
}
|
||||
if(x == 0)
|
||||
{ // Probability 1 - Q == 1 so infinite failures to achieve certainty.
|
||||
// Would need +infinity failures for total confidence.
|
||||
result = policies::raise_overflow_error<RealType>(
|
||||
function,
|
||||
"Probability argument complement is 0, which implies infinite failures !", Policy());
|
||||
return result;
|
||||
// usually means return +std::numeric_limits<RealType>::infinity();
|
||||
// unless #define BOOST_MATH_THROW_ON_OVERFLOW_ERROR
|
||||
}
|
||||
// log(x) /log(1-success_fraction) -1; but use log1p in case success_fraction is small
|
||||
result = log(x) / boost::math::log1p(-success_fraction, Policy()) - 1;
|
||||
return result;
|
||||
|
||||
} // quantile complement
|
||||
|
||||
} // namespace math
|
||||
} // namespace boost
|
||||
|
||||
// This include must be at the end, *after* the accessors
|
||||
// for this distribution have been defined, in order to
|
||||
// keep compilers that support two-phase lookup happy.
|
||||
#include <boost/math/distributions/detail/derived_accessors.hpp>
|
||||
|
||||
#if defined (BOOST_MSVC)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MATH_SPECIAL_GEOMETRIC_HPP
|
||||
@@ -0,0 +1,739 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/interprocess for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTERPROCESS_DETAIL_OS_FILE_FUNCTIONS_HPP
|
||||
#define BOOST_INTERPROCESS_DETAIL_OS_FILE_FUNCTIONS_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/interprocess/detail/config_begin.hpp>
|
||||
#include <boost/interprocess/detail/workaround.hpp>
|
||||
#include <boost/interprocess/errors.hpp>
|
||||
#include <boost/interprocess/permissions.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <limits>
|
||||
#include <climits>
|
||||
#include <boost/move/detail/type_traits.hpp> //make_unsigned
|
||||
|
||||
#if defined (BOOST_INTERPROCESS_WINDOWS)
|
||||
# include <boost/interprocess/detail/win32_api.hpp>
|
||||
#else
|
||||
# ifdef BOOST_HAS_UNISTD_H
|
||||
# include <fcntl.h>
|
||||
# include <unistd.h>
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
# include <errno.h>
|
||||
# include <cstdio>
|
||||
# include <dirent.h>
|
||||
# if 0
|
||||
# include <sys/file.h>
|
||||
# endif
|
||||
# else
|
||||
# error Unknown platform
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
|
||||
namespace boost {
|
||||
namespace interprocess {
|
||||
|
||||
#if defined (BOOST_INTERPROCESS_WINDOWS)
|
||||
|
||||
typedef void * file_handle_t;
|
||||
typedef __int64 offset_t;
|
||||
typedef struct mapping_handle_impl_t{
|
||||
void * handle;
|
||||
bool is_shm;
|
||||
} mapping_handle_t;
|
||||
|
||||
typedef enum { read_only = winapi::generic_read
|
||||
, read_write = winapi::generic_read | winapi::generic_write
|
||||
, copy_on_write
|
||||
, read_private
|
||||
, invalid_mode = 0xffff
|
||||
} mode_t;
|
||||
|
||||
typedef enum { file_begin = winapi::file_begin
|
||||
, file_end = winapi::file_end
|
||||
, file_current = winapi::file_current
|
||||
} file_pos_t;
|
||||
|
||||
typedef unsigned long map_options_t;
|
||||
static const map_options_t default_map_options = map_options_t(-1);
|
||||
|
||||
namespace ipcdetail{
|
||||
|
||||
inline mapping_handle_t mapping_handle_from_file_handle(file_handle_t hnd)
|
||||
{
|
||||
mapping_handle_t ret;
|
||||
ret.handle = hnd;
|
||||
ret.is_shm = false;
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline mapping_handle_t mapping_handle_from_shm_handle(file_handle_t hnd)
|
||||
{
|
||||
mapping_handle_t ret;
|
||||
ret.handle = hnd;
|
||||
ret.is_shm = true;
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline file_handle_t file_handle_from_mapping_handle(mapping_handle_t hnd)
|
||||
{ return hnd.handle; }
|
||||
|
||||
inline bool create_directory(const char *path)
|
||||
{ return winapi::create_directory(path); }
|
||||
|
||||
inline bool get_temporary_path(char *buffer, std::size_t buf_len, std::size_t &required_len)
|
||||
{
|
||||
required_len = 0;
|
||||
//std::size_t is always bigger or equal than unsigned long in Windows systems
|
||||
//In case std::size_t is bigger than unsigned long
|
||||
unsigned long buf = buf_len;
|
||||
if(buf_len != buf){ //maybe overflowed
|
||||
return false;
|
||||
}
|
||||
required_len = winapi::get_temp_path(buf_len, buffer);
|
||||
const bool ret = !(buf_len < required_len);
|
||||
if(ret && buffer[required_len-1] == '\\'){
|
||||
buffer[required_len-1] = 0;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline file_handle_t create_new_file
|
||||
(const char *name, mode_t mode, const permissions & perm = permissions(), bool temporary = false)
|
||||
{
|
||||
unsigned long attr = temporary ? winapi::file_attribute_temporary : 0;
|
||||
return winapi::create_file
|
||||
( name, (unsigned int)mode, winapi::create_new, attr
|
||||
, (winapi::interprocess_security_attributes*)perm.get_permissions());
|
||||
}
|
||||
|
||||
inline file_handle_t create_or_open_file
|
||||
(const char *name, mode_t mode, const permissions & perm = permissions(), bool temporary = false)
|
||||
{
|
||||
unsigned long attr = temporary ? winapi::file_attribute_temporary : 0;
|
||||
return winapi::create_file
|
||||
( name, (unsigned int)mode, winapi::open_always, attr
|
||||
, (winapi::interprocess_security_attributes*)perm.get_permissions());
|
||||
}
|
||||
|
||||
inline file_handle_t open_existing_file
|
||||
(const char *name, mode_t mode, bool temporary = false)
|
||||
{
|
||||
unsigned long attr = temporary ? winapi::file_attribute_temporary : 0;
|
||||
return winapi::create_file
|
||||
(name, (unsigned int)mode, winapi::open_existing, attr, 0);
|
||||
}
|
||||
|
||||
inline bool delete_file(const char *name)
|
||||
{ return winapi::unlink_file(name); }
|
||||
|
||||
inline bool truncate_file (file_handle_t hnd, std::size_t size)
|
||||
{
|
||||
offset_t filesize;
|
||||
if(!winapi::get_file_size(hnd, filesize))
|
||||
return false;
|
||||
|
||||
typedef ::boost::move_detail::make_unsigned<offset_t>::type uoffset_t;
|
||||
const uoffset_t max_filesize = uoffset_t((std::numeric_limits<offset_t>::max)());
|
||||
const uoffset_t uoff_size = uoffset_t(size);
|
||||
//Avoid unused variable warnings in 32 bit systems
|
||||
if(uoff_size > max_filesize){
|
||||
winapi::set_last_error(winapi::error_file_too_large);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(offset_t(size) > filesize){
|
||||
if(!winapi::set_file_pointer_ex(hnd, filesize, 0, winapi::file_begin)){
|
||||
return false;
|
||||
}
|
||||
//We will write zeros in the end of the file
|
||||
//since set_end_of_file does not guarantee this
|
||||
for(std::size_t remaining = size - filesize, write_size = 0
|
||||
;remaining > 0
|
||||
;remaining -= write_size){
|
||||
const std::size_t DataSize = 512;
|
||||
static char data [DataSize];
|
||||
write_size = DataSize < remaining ? DataSize : remaining;
|
||||
unsigned long written;
|
||||
winapi::write_file(hnd, data, (unsigned long)write_size, &written, 0);
|
||||
if(written != write_size){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(!winapi::set_file_pointer_ex(hnd, size, 0, winapi::file_begin)){
|
||||
return false;
|
||||
}
|
||||
if(!winapi::set_end_of_file(hnd)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool get_file_size(file_handle_t hnd, offset_t &size)
|
||||
{ return winapi::get_file_size(hnd, size); }
|
||||
|
||||
inline bool set_file_pointer(file_handle_t hnd, offset_t off, file_pos_t pos)
|
||||
{ return winapi::set_file_pointer_ex(hnd, off, 0, (unsigned long) pos); }
|
||||
|
||||
inline bool get_file_pointer(file_handle_t hnd, offset_t &off)
|
||||
{ return winapi::set_file_pointer_ex(hnd, 0, &off, winapi::file_current); }
|
||||
|
||||
inline bool write_file(file_handle_t hnd, const void *data, std::size_t numdata)
|
||||
{
|
||||
unsigned long written;
|
||||
return 0 != winapi::write_file(hnd, data, (unsigned long)numdata, &written, 0);
|
||||
}
|
||||
|
||||
inline file_handle_t invalid_file()
|
||||
{ return winapi::invalid_handle_value; }
|
||||
|
||||
inline bool close_file(file_handle_t hnd)
|
||||
{ return 0 != winapi::close_handle(hnd); }
|
||||
|
||||
inline bool acquire_file_lock(file_handle_t hnd)
|
||||
{
|
||||
static winapi::interprocess_overlapped overlapped;
|
||||
const unsigned long len = ((unsigned long)-1);
|
||||
// winapi::interprocess_overlapped overlapped;
|
||||
// std::memset(&overlapped, 0, sizeof(overlapped));
|
||||
return winapi::lock_file_ex
|
||||
(hnd, winapi::lockfile_exclusive_lock, 0, len, len, &overlapped);
|
||||
}
|
||||
|
||||
inline bool try_acquire_file_lock(file_handle_t hnd, bool &acquired)
|
||||
{
|
||||
const unsigned long len = ((unsigned long)-1);
|
||||
winapi::interprocess_overlapped overlapped;
|
||||
std::memset(&overlapped, 0, sizeof(overlapped));
|
||||
if(!winapi::lock_file_ex
|
||||
(hnd, winapi::lockfile_exclusive_lock | winapi::lockfile_fail_immediately,
|
||||
0, len, len, &overlapped)){
|
||||
return winapi::get_last_error() == winapi::error_lock_violation ?
|
||||
acquired = false, true : false;
|
||||
|
||||
}
|
||||
return (acquired = true);
|
||||
}
|
||||
|
||||
inline bool release_file_lock(file_handle_t hnd)
|
||||
{
|
||||
const unsigned long len = ((unsigned long)-1);
|
||||
winapi::interprocess_overlapped overlapped;
|
||||
std::memset(&overlapped, 0, sizeof(overlapped));
|
||||
return winapi::unlock_file_ex(hnd, 0, len, len, &overlapped);
|
||||
}
|
||||
|
||||
inline bool acquire_file_lock_sharable(file_handle_t hnd)
|
||||
{
|
||||
const unsigned long len = ((unsigned long)-1);
|
||||
winapi::interprocess_overlapped overlapped;
|
||||
std::memset(&overlapped, 0, sizeof(overlapped));
|
||||
return winapi::lock_file_ex(hnd, 0, 0, len, len, &overlapped);
|
||||
}
|
||||
|
||||
inline bool try_acquire_file_lock_sharable(file_handle_t hnd, bool &acquired)
|
||||
{
|
||||
const unsigned long len = ((unsigned long)-1);
|
||||
winapi::interprocess_overlapped overlapped;
|
||||
std::memset(&overlapped, 0, sizeof(overlapped));
|
||||
if(!winapi::lock_file_ex
|
||||
(hnd, winapi::lockfile_fail_immediately, 0, len, len, &overlapped)){
|
||||
return winapi::get_last_error() == winapi::error_lock_violation ?
|
||||
acquired = false, true : false;
|
||||
}
|
||||
return (acquired = true);
|
||||
}
|
||||
|
||||
inline bool release_file_lock_sharable(file_handle_t hnd)
|
||||
{ return release_file_lock(hnd); }
|
||||
|
||||
inline bool delete_subdirectories_recursive
|
||||
(const std::string &refcstrRootDirectory, const char *dont_delete_this, unsigned int count)
|
||||
{
|
||||
bool bSubdirectory = false; // Flag, indicating whether
|
||||
// subdirectories have been found
|
||||
void * hFile; // Handle to directory
|
||||
std::string strFilePath; // Filepath
|
||||
std::string strPattern; // Pattern
|
||||
winapi::win32_find_data FileInformation; // File information
|
||||
|
||||
//Find all files and directories
|
||||
strPattern = refcstrRootDirectory + "\\*.*";
|
||||
hFile = winapi::find_first_file(strPattern.c_str(), &FileInformation);
|
||||
if(hFile != winapi::invalid_handle_value){
|
||||
do{
|
||||
//If it's not "." or ".." or the pointed root_level dont_delete_this erase it
|
||||
if(FileInformation.cFileName[0] != '.' &&
|
||||
!(dont_delete_this && count == 0 && std::strcmp(dont_delete_this, FileInformation.cFileName) == 0)){
|
||||
strFilePath.erase();
|
||||
strFilePath = refcstrRootDirectory + "\\" + FileInformation.cFileName;
|
||||
|
||||
//If it's a directory, go recursive
|
||||
if(FileInformation.dwFileAttributes & winapi::file_attribute_directory){
|
||||
// Delete subdirectory
|
||||
if(!delete_subdirectories_recursive(strFilePath, dont_delete_this, count+1)){
|
||||
winapi::find_close(hFile);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//If it's a file, just delete it
|
||||
else{
|
||||
// Set file attributes
|
||||
//if(::SetFileAttributes(strFilePath.c_str(), winapi::file_attribute_normal) == 0)
|
||||
//return winapi::get_last_error();
|
||||
// Delete file
|
||||
winapi::unlink_file(strFilePath.c_str());
|
||||
}
|
||||
}
|
||||
//Go to the next file
|
||||
} while(winapi::find_next_file(hFile, &FileInformation) == 1);
|
||||
|
||||
// Close handle
|
||||
winapi::find_close(hFile);
|
||||
|
||||
//See if the loop has ended with an error or just because we've traversed all the files
|
||||
if(winapi::get_last_error() != winapi::error_no_more_files){
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Erase empty subdirectories or original refcstrRootDirectory
|
||||
if(!bSubdirectory && count)
|
||||
{
|
||||
// Set directory attributes
|
||||
//if(::SetFileAttributes(refcstrRootDirectory.c_str(), FILE_ATTRIBUTE_NORMAL) == 0)
|
||||
//return ::GetLastError();
|
||||
// Delete directory
|
||||
if(winapi::remove_directory(refcstrRootDirectory.c_str()) == 0)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//This function erases all the subdirectories of a directory except the one pointed by "dont_delete_this"
|
||||
inline bool delete_subdirectories(const std::string &refcstrRootDirectory, const char *dont_delete_this)
|
||||
{
|
||||
return delete_subdirectories_recursive(refcstrRootDirectory, dont_delete_this, 0u);
|
||||
}
|
||||
|
||||
|
||||
template<class Function>
|
||||
inline bool for_each_file_in_dir(const char *dir, Function f)
|
||||
{
|
||||
void * hFile; // Handle to directory
|
||||
winapi::win32_find_data FileInformation; // File information
|
||||
|
||||
//Get base directory
|
||||
std::string str(dir);
|
||||
const std::size_t base_root_dir_len = str.size();
|
||||
|
||||
//Find all files and directories
|
||||
str += "\\*.*";
|
||||
hFile = winapi::find_first_file(str.c_str(), &FileInformation);
|
||||
if(hFile != winapi::invalid_handle_value){
|
||||
do{ //Now loop every file
|
||||
str.erase(base_root_dir_len);
|
||||
//If it's not "." or ".." skip it
|
||||
if(FileInformation.cFileName[0] != '.'){
|
||||
str += "\\"; str += FileInformation.cFileName;
|
||||
//If it's a file, apply erase logic
|
||||
if(!(FileInformation.dwFileAttributes & winapi::file_attribute_directory)){
|
||||
f(str.c_str(), FileInformation.cFileName);
|
||||
}
|
||||
}
|
||||
//Go to the next file
|
||||
} while(winapi::find_next_file(hFile, &FileInformation) == 1);
|
||||
|
||||
// Close handle and see if the loop has ended with an error
|
||||
winapi::find_close(hFile);
|
||||
if(winapi::get_last_error() != winapi::error_no_more_files){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
#else //#if defined (BOOST_INTERPROCESS_WINDOWS)
|
||||
|
||||
typedef int file_handle_t;
|
||||
typedef off_t offset_t;
|
||||
|
||||
typedef struct mapping_handle_impl_t
|
||||
{
|
||||
file_handle_t handle;
|
||||
bool is_xsi;
|
||||
} mapping_handle_t;
|
||||
|
||||
typedef enum { read_only = O_RDONLY
|
||||
, read_write = O_RDWR
|
||||
, copy_on_write
|
||||
, read_private
|
||||
, invalid_mode = 0xffff
|
||||
} mode_t;
|
||||
|
||||
typedef enum { file_begin = SEEK_SET
|
||||
, file_end = SEEK_END
|
||||
, file_current = SEEK_CUR
|
||||
} file_pos_t;
|
||||
|
||||
typedef int map_options_t;
|
||||
static const map_options_t default_map_options = map_options_t(-1);
|
||||
|
||||
namespace ipcdetail{
|
||||
|
||||
inline mapping_handle_t mapping_handle_from_file_handle(file_handle_t hnd)
|
||||
{
|
||||
mapping_handle_t ret;
|
||||
ret.handle = hnd;
|
||||
ret.is_xsi = false;
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline file_handle_t file_handle_from_mapping_handle(mapping_handle_t hnd)
|
||||
{ return hnd.handle; }
|
||||
|
||||
inline bool create_directory(const char *path)
|
||||
{ return ::mkdir(path, 0777) == 0 && ::chmod(path, 0777) == 0; }
|
||||
|
||||
inline bool get_temporary_path(char *buffer, std::size_t buf_len, std::size_t &required_len)
|
||||
{
|
||||
required_len = 5u;
|
||||
if(buf_len < required_len)
|
||||
return false;
|
||||
else{
|
||||
std::strcpy(buffer, "/tmp");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
inline file_handle_t create_new_file
|
||||
(const char *name, mode_t mode, const permissions & perm = permissions(), bool temporary = false)
|
||||
{
|
||||
(void)temporary;
|
||||
int ret = ::open(name, ((int)mode) | O_EXCL | O_CREAT, perm.get_permissions());
|
||||
if(ret >= 0){
|
||||
::fchmod(ret, perm.get_permissions());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline file_handle_t create_or_open_file
|
||||
(const char *name, mode_t mode, const permissions & perm = permissions(), bool temporary = false)
|
||||
{
|
||||
(void)temporary;
|
||||
int ret = -1;
|
||||
//We need a loop to change permissions correctly using fchmod, since
|
||||
//with "O_CREAT only" ::open we don't know if we've created or opened the file.
|
||||
while(1){
|
||||
ret = ::open(name, ((int)mode) | O_EXCL | O_CREAT, perm.get_permissions());
|
||||
if(ret >= 0){
|
||||
::fchmod(ret, perm.get_permissions());
|
||||
break;
|
||||
}
|
||||
else if(errno == EEXIST){
|
||||
if((ret = ::open(name, (int)mode)) >= 0 || errno != ENOENT){
|
||||
break;
|
||||
}
|
||||
}
|
||||
else{
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline file_handle_t open_existing_file
|
||||
(const char *name, mode_t mode, bool temporary = false)
|
||||
{
|
||||
(void)temporary;
|
||||
return ::open(name, (int)mode);
|
||||
}
|
||||
|
||||
inline bool delete_file(const char *name)
|
||||
{ return ::unlink(name) == 0; }
|
||||
|
||||
inline bool truncate_file (file_handle_t hnd, std::size_t size)
|
||||
{
|
||||
typedef boost::move_detail::make_unsigned<off_t>::type uoff_t;
|
||||
if(uoff_t((std::numeric_limits<off_t>::max)()) < size){
|
||||
errno = EINVAL;
|
||||
return false;
|
||||
}
|
||||
return 0 == ::ftruncate(hnd, off_t(size));
|
||||
}
|
||||
|
||||
inline bool get_file_size(file_handle_t hnd, offset_t &size)
|
||||
{
|
||||
struct stat data;
|
||||
bool ret = 0 == ::fstat(hnd, &data);
|
||||
if(ret){
|
||||
size = data.st_size;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline bool set_file_pointer(file_handle_t hnd, offset_t off, file_pos_t pos)
|
||||
{ return ((off_t)(-1)) != ::lseek(hnd, off, (int)pos); }
|
||||
|
||||
inline bool get_file_pointer(file_handle_t hnd, offset_t &off)
|
||||
{
|
||||
off = ::lseek(hnd, 0, SEEK_CUR);
|
||||
return off != ((off_t)-1);
|
||||
}
|
||||
|
||||
inline bool write_file(file_handle_t hnd, const void *data, std::size_t numdata)
|
||||
{ return (ssize_t(numdata)) == ::write(hnd, data, numdata); }
|
||||
|
||||
inline file_handle_t invalid_file()
|
||||
{ return -1; }
|
||||
|
||||
inline bool close_file(file_handle_t hnd)
|
||||
{ return ::close(hnd) == 0; }
|
||||
|
||||
inline bool acquire_file_lock(file_handle_t hnd)
|
||||
{
|
||||
struct ::flock lock;
|
||||
lock.l_type = F_WRLCK;
|
||||
lock.l_whence = SEEK_SET;
|
||||
lock.l_start = 0;
|
||||
lock.l_len = 0;
|
||||
return -1 != ::fcntl(hnd, F_SETLKW, &lock);
|
||||
}
|
||||
|
||||
inline bool try_acquire_file_lock(file_handle_t hnd, bool &acquired)
|
||||
{
|
||||
struct ::flock lock;
|
||||
lock.l_type = F_WRLCK;
|
||||
lock.l_whence = SEEK_SET;
|
||||
lock.l_start = 0;
|
||||
lock.l_len = 0;
|
||||
int ret = ::fcntl(hnd, F_SETLK, &lock);
|
||||
if(ret == -1){
|
||||
return (errno == EAGAIN || errno == EACCES) ?
|
||||
acquired = false, true : false;
|
||||
}
|
||||
return (acquired = true);
|
||||
}
|
||||
|
||||
inline bool release_file_lock(file_handle_t hnd)
|
||||
{
|
||||
struct ::flock lock;
|
||||
lock.l_type = F_UNLCK;
|
||||
lock.l_whence = SEEK_SET;
|
||||
lock.l_start = 0;
|
||||
lock.l_len = 0;
|
||||
return -1 != ::fcntl(hnd, F_SETLK, &lock);
|
||||
}
|
||||
|
||||
inline bool acquire_file_lock_sharable(file_handle_t hnd)
|
||||
{
|
||||
struct ::flock lock;
|
||||
lock.l_type = F_RDLCK;
|
||||
lock.l_whence = SEEK_SET;
|
||||
lock.l_start = 0;
|
||||
lock.l_len = 0;
|
||||
return -1 != ::fcntl(hnd, F_SETLKW, &lock);
|
||||
}
|
||||
|
||||
inline bool try_acquire_file_lock_sharable(file_handle_t hnd, bool &acquired)
|
||||
{
|
||||
struct flock lock;
|
||||
lock.l_type = F_RDLCK;
|
||||
lock.l_whence = SEEK_SET;
|
||||
lock.l_start = 0;
|
||||
lock.l_len = 0;
|
||||
int ret = ::fcntl(hnd, F_SETLK, &lock);
|
||||
if(ret == -1){
|
||||
return (errno == EAGAIN || errno == EACCES) ?
|
||||
acquired = false, true : false;
|
||||
}
|
||||
return (acquired = true);
|
||||
}
|
||||
|
||||
inline bool release_file_lock_sharable(file_handle_t hnd)
|
||||
{ return release_file_lock(hnd); }
|
||||
|
||||
#if 0
|
||||
inline bool acquire_file_lock(file_handle_t hnd)
|
||||
{ return 0 == ::flock(hnd, LOCK_EX); }
|
||||
|
||||
inline bool try_acquire_file_lock(file_handle_t hnd, bool &acquired)
|
||||
{
|
||||
int ret = ::flock(hnd, LOCK_EX | LOCK_NB);
|
||||
acquired = ret == 0;
|
||||
return (acquired || errno == EWOULDBLOCK);
|
||||
}
|
||||
|
||||
inline bool release_file_lock(file_handle_t hnd)
|
||||
{ return 0 == ::flock(hnd, LOCK_UN); }
|
||||
|
||||
inline bool acquire_file_lock_sharable(file_handle_t hnd)
|
||||
{ return 0 == ::flock(hnd, LOCK_SH); }
|
||||
|
||||
inline bool try_acquire_file_lock_sharable(file_handle_t hnd, bool &acquired)
|
||||
{
|
||||
int ret = ::flock(hnd, LOCK_SH | LOCK_NB);
|
||||
acquired = ret == 0;
|
||||
return (acquired || errno == EWOULDBLOCK);
|
||||
}
|
||||
|
||||
inline bool release_file_lock_sharable(file_handle_t hnd)
|
||||
{ return 0 == ::flock(hnd, LOCK_UN); }
|
||||
#endif
|
||||
|
||||
inline bool delete_subdirectories_recursive
|
||||
(const std::string &refcstrRootDirectory, const char *dont_delete_this)
|
||||
{
|
||||
DIR *d = opendir(refcstrRootDirectory.c_str());
|
||||
if(!d) {
|
||||
return false;
|
||||
}
|
||||
|
||||
struct dir_close
|
||||
{
|
||||
DIR *d_;
|
||||
dir_close(DIR *d) : d_(d) {}
|
||||
~dir_close() { ::closedir(d_); }
|
||||
} dc(d); (void)dc;
|
||||
|
||||
struct ::dirent *de;
|
||||
struct ::stat st;
|
||||
std::string fn;
|
||||
|
||||
while((de=::readdir(d))) {
|
||||
if( de->d_name[0] == '.' && ( de->d_name[1] == '\0'
|
||||
|| (de->d_name[1] == '.' && de->d_name[2] == '\0' )) ){
|
||||
continue;
|
||||
}
|
||||
if(dont_delete_this && std::strcmp(dont_delete_this, de->d_name) == 0){
|
||||
continue;
|
||||
}
|
||||
fn = refcstrRootDirectory;
|
||||
fn += '/';
|
||||
fn += de->d_name;
|
||||
|
||||
if(std::remove(fn.c_str())) {
|
||||
if(::stat(fn.c_str(), & st)) {
|
||||
return false;
|
||||
}
|
||||
if(S_ISDIR(st.st_mode)) {
|
||||
if(!delete_subdirectories_recursive(fn, 0) ){
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return std::remove(refcstrRootDirectory.c_str()) ? false : true;
|
||||
}
|
||||
|
||||
template<class Function>
|
||||
inline bool for_each_file_in_dir(const char *dir, Function f)
|
||||
{
|
||||
std::string refcstrRootDirectory(dir);
|
||||
|
||||
DIR *d = opendir(refcstrRootDirectory.c_str());
|
||||
if(!d) {
|
||||
return false;
|
||||
}
|
||||
|
||||
struct dir_close
|
||||
{
|
||||
DIR *d_;
|
||||
dir_close(DIR *d) : d_(d) {}
|
||||
~dir_close() { ::closedir(d_); }
|
||||
} dc(d); (void)dc;
|
||||
|
||||
struct ::dirent *de;
|
||||
struct ::stat st;
|
||||
std::string fn;
|
||||
|
||||
while((de=::readdir(d))) {
|
||||
if( de->d_name[0] == '.' && ( de->d_name[1] == '\0'
|
||||
|| (de->d_name[1] == '.' && de->d_name[2] == '\0' )) ){
|
||||
continue;
|
||||
}
|
||||
fn = refcstrRootDirectory;
|
||||
fn += '/';
|
||||
fn += de->d_name;
|
||||
|
||||
if(::stat(fn.c_str(), & st)) {
|
||||
return false;
|
||||
}
|
||||
//If it's a file, apply erase logic
|
||||
if(!S_ISDIR(st.st_mode)) {
|
||||
f(fn.c_str(), de->d_name);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//This function erases all the subdirectories of a directory except the one pointed by "dont_delete_this"
|
||||
inline bool delete_subdirectories(const std::string &refcstrRootDirectory, const char *dont_delete_this)
|
||||
{
|
||||
return delete_subdirectories_recursive(refcstrRootDirectory, dont_delete_this );
|
||||
}
|
||||
|
||||
#endif //#if defined (BOOST_INTERPROCESS_WINDOWS)
|
||||
|
||||
inline bool open_or_create_directory(const char *dir_name)
|
||||
{
|
||||
//If fails, check that it's because it already exists
|
||||
if(!create_directory(dir_name)){
|
||||
error_info info(system_error_code());
|
||||
if(info.get_error_code() != already_exists_error){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
inline std::string get_temporary_path()
|
||||
{
|
||||
std::size_t required_len = 0;
|
||||
get_temporary_path(0, 0, required_len);
|
||||
std::string ret_str(required_len, char(0));
|
||||
get_temporary_path(&ret_str[0], ret_str.size(), required_len);
|
||||
while(!ret_str.empty() && !ret_str[ret_str.size()-1]){
|
||||
ret_str.erase(ret_str.size()-1);
|
||||
}
|
||||
|
||||
return ret_str;
|
||||
}
|
||||
|
||||
} //namespace ipcdetail{
|
||||
} //namespace interprocess {
|
||||
} //namespace boost {
|
||||
|
||||
#include <boost/interprocess/detail/config_end.hpp>
|
||||
|
||||
#endif //BOOST_INTERPROCESS_DETAIL_OS_FILE_FUNCTIONS_HPP
|
||||
@@ -0,0 +1,67 @@
|
||||
#ifndef PTR_DWA20020601_HPP
|
||||
# define PTR_DWA20020601_HPP
|
||||
|
||||
# include <boost/python/detail/prefix.hpp>
|
||||
// Copyright David Abrahams 2002.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Based on boost/ref.hpp, thus:
|
||||
// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
|
||||
// Copyright (C) 2001 Peter Dimov
|
||||
|
||||
# pragma once
|
||||
|
||||
# include <boost/config.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace python {
|
||||
|
||||
template<class Ptr> class pointer_wrapper
|
||||
{
|
||||
public:
|
||||
typedef Ptr type;
|
||||
|
||||
explicit pointer_wrapper(Ptr x): p_(x) {}
|
||||
operator Ptr() const { return p_; }
|
||||
Ptr get() const { return p_; }
|
||||
private:
|
||||
Ptr p_;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
inline pointer_wrapper<T> ptr(T t)
|
||||
{
|
||||
return pointer_wrapper<T>(t);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
class is_pointer_wrapper
|
||||
: public mpl::false_
|
||||
{
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class is_pointer_wrapper<pointer_wrapper<T> >
|
||||
: public mpl::true_
|
||||
{
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class unwrap_pointer
|
||||
{
|
||||
public:
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class unwrap_pointer<pointer_wrapper<T> >
|
||||
{
|
||||
public:
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
}} // namespace boost::python
|
||||
|
||||
#endif // #ifndef PTR_DWA20020601_HPP
|
||||
@@ -0,0 +1,25 @@
|
||||
// -----------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek
|
||||
// Copyright (c) 2003-2004 Gennaro Prota
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// -----------------------------------------------------------
|
||||
|
||||
#ifndef BOOST_DYNAMIC_BITSET_FWD_HPP
|
||||
#define BOOST_DYNAMIC_BITSET_FWD_HPP
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace boost {
|
||||
|
||||
template <typename Block = unsigned long,
|
||||
typename Allocator = std::allocator<Block> >
|
||||
class dynamic_bitset;
|
||||
|
||||
}
|
||||
|
||||
#endif // include guard
|
||||
@@ -0,0 +1,856 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2014. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_MOVE_DETAIL_FWD_MACROS_HPP
|
||||
#define BOOST_MOVE_DETAIL_FWD_MACROS_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/detail/workaround.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace move_detail {
|
||||
|
||||
template <typename T> struct unvoid { typedef T type; };
|
||||
template <> struct unvoid<void> { struct type { }; };
|
||||
template <> struct unvoid<const void> { struct type { }; };
|
||||
|
||||
} //namespace move_detail {
|
||||
} //namespace boost {
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
|
||||
#if defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
|
||||
|
||||
namespace boost {
|
||||
namespace move_detail {
|
||||
|
||||
template<class T>
|
||||
struct mref;
|
||||
|
||||
template<class T>
|
||||
struct mref<T &>
|
||||
{
|
||||
explicit mref(T &t) : t_(t){}
|
||||
T &t_;
|
||||
T & get() { return t_; }
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct mref
|
||||
{
|
||||
explicit mref(T &&t) : t_(t) {}
|
||||
T &t_;
|
||||
T &&get() { return ::boost::move(t_); }
|
||||
};
|
||||
|
||||
} //namespace move_detail {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG
|
||||
#endif //!defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
|
||||
//BOOST_MOVE_REPEATN(MACRO)
|
||||
#define BOOST_MOVE_REPEAT(x, MACRO) BOOST_MOVE_REPEAT_I(x,MACRO)
|
||||
#define BOOST_MOVE_REPEAT_I(x, MACRO) BOOST_MOVE_REPEAT##x(MACRO)
|
||||
#define BOOST_MOVE_REPEAT0(MACRO)
|
||||
#define BOOST_MOVE_REPEAT1(MACRO) MACRO
|
||||
#define BOOST_MOVE_REPEAT2(MACRO) BOOST_MOVE_REPEAT1(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT3(MACRO) BOOST_MOVE_REPEAT2(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT4(MACRO) BOOST_MOVE_REPEAT3(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT5(MACRO) BOOST_MOVE_REPEAT4(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT6(MACRO) BOOST_MOVE_REPEAT5(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT7(MACRO) BOOST_MOVE_REPEAT6(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT8(MACRO) BOOST_MOVE_REPEAT7(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT9(MACRO) BOOST_MOVE_REPEAT8(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT10(MACRO) BOOST_MOVE_REPEAT9(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT11(MACRO) BOOST_MOVE_REPEAT10(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT12(MACRO) BOOST_MOVE_REPEAT11(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT13(MACRO) BOOST_MOVE_REPEAT12(MACRO), MACRO
|
||||
|
||||
//BOOST_MOVE_FWDN
|
||||
#define BOOST_MOVE_FWD0
|
||||
#define BOOST_MOVE_FWD1 ::boost::forward<P0>(p0)
|
||||
#define BOOST_MOVE_FWD2 BOOST_MOVE_FWD1, ::boost::forward<P1>(p1)
|
||||
#define BOOST_MOVE_FWD3 BOOST_MOVE_FWD2, ::boost::forward<P2>(p2)
|
||||
#define BOOST_MOVE_FWD4 BOOST_MOVE_FWD3, ::boost::forward<P3>(p3)
|
||||
#define BOOST_MOVE_FWD5 BOOST_MOVE_FWD4, ::boost::forward<P4>(p4)
|
||||
#define BOOST_MOVE_FWD6 BOOST_MOVE_FWD5, ::boost::forward<P5>(p5)
|
||||
#define BOOST_MOVE_FWD7 BOOST_MOVE_FWD6, ::boost::forward<P6>(p6)
|
||||
#define BOOST_MOVE_FWD8 BOOST_MOVE_FWD7, ::boost::forward<P7>(p7)
|
||||
#define BOOST_MOVE_FWD9 BOOST_MOVE_FWD8, ::boost::forward<P8>(p8)
|
||||
|
||||
//BOOST_MOVE_FWDQN
|
||||
#define BOOST_MOVE_FWDQ0
|
||||
#define BOOST_MOVE_FWDQ1 ::boost::forward<Q0>(q0)
|
||||
#define BOOST_MOVE_FWDQ2 BOOST_MOVE_FWDQ1, ::boost::forward<Q1>(q1)
|
||||
#define BOOST_MOVE_FWDQ3 BOOST_MOVE_FWDQ2, ::boost::forward<Q2>(q2)
|
||||
#define BOOST_MOVE_FWDQ4 BOOST_MOVE_FWDQ3, ::boost::forward<Q3>(q3)
|
||||
#define BOOST_MOVE_FWDQ5 BOOST_MOVE_FWDQ4, ::boost::forward<Q4>(q4)
|
||||
#define BOOST_MOVE_FWDQ6 BOOST_MOVE_FWDQ5, ::boost::forward<Q5>(q5)
|
||||
#define BOOST_MOVE_FWDQ7 BOOST_MOVE_FWDQ6, ::boost::forward<Q6>(q6)
|
||||
#define BOOST_MOVE_FWDQ8 BOOST_MOVE_FWDQ7, ::boost::forward<Q7>(q7)
|
||||
#define BOOST_MOVE_FWDQ9 BOOST_MOVE_FWDQ8, ::boost::forward<Q8>(q8)
|
||||
|
||||
//BOOST_MOVE_TMPL_GETN
|
||||
#define BOOST_MOVE_TMPL_GET0
|
||||
#define BOOST_MOVE_TMPL_GET1 p.template get<0>()
|
||||
#define BOOST_MOVE_TMPL_GET2 BOOST_MOVE_TMPL_GET1, p.template get<1>()
|
||||
#define BOOST_MOVE_TMPL_GET3 BOOST_MOVE_TMPL_GET2, p.template get<2>()
|
||||
#define BOOST_MOVE_TMPL_GET4 BOOST_MOVE_TMPL_GET3, p.template get<3>()
|
||||
#define BOOST_MOVE_TMPL_GET5 BOOST_MOVE_TMPL_GET4, p.template get<4>()
|
||||
#define BOOST_MOVE_TMPL_GET6 BOOST_MOVE_TMPL_GET5, p.template get<5>()
|
||||
#define BOOST_MOVE_TMPL_GET7 BOOST_MOVE_TMPL_GET6, p.template get<6>()
|
||||
#define BOOST_MOVE_TMPL_GET8 BOOST_MOVE_TMPL_GET7, p.template get<7>()
|
||||
#define BOOST_MOVE_TMPL_GET9 BOOST_MOVE_TMPL_GET8, p.template get<8>()
|
||||
|
||||
//BOOST_MOVE_TMPL_GETQN
|
||||
#define BOOST_MOVE_TMPL_GETQ0
|
||||
#define BOOST_MOVE_TMPL_GETQ1 q.template get<0>()
|
||||
#define BOOST_MOVE_TMPL_GETQ2 BOOST_MOVE_TMPL_GETQ1, q.template get<1>()
|
||||
#define BOOST_MOVE_TMPL_GETQ3 BOOST_MOVE_TMPL_GETQ2, q.template get<2>()
|
||||
#define BOOST_MOVE_TMPL_GETQ4 BOOST_MOVE_TMPL_GETQ3, q.template get<3>()
|
||||
#define BOOST_MOVE_TMPL_GETQ5 BOOST_MOVE_TMPL_GETQ4, q.template get<4>()
|
||||
#define BOOST_MOVE_TMPL_GETQ6 BOOST_MOVE_TMPL_GETQ5, q.template get<5>()
|
||||
#define BOOST_MOVE_TMPL_GETQ7 BOOST_MOVE_TMPL_GETQ6, q.template get<6>()
|
||||
#define BOOST_MOVE_TMPL_GETQ8 BOOST_MOVE_TMPL_GETQ7, q.template get<7>()
|
||||
#define BOOST_MOVE_TMPL_GETQ9 BOOST_MOVE_TMPL_GETQ8, q.template get<8>()
|
||||
|
||||
//BOOST_MOVE_GET_IDXN
|
||||
#define BOOST_MOVE_GET_IDX0
|
||||
#define BOOST_MOVE_GET_IDX1 get<0>(p)
|
||||
#define BOOST_MOVE_GET_IDX2 BOOST_MOVE_GET_IDX1, get<1>(p)
|
||||
#define BOOST_MOVE_GET_IDX3 BOOST_MOVE_GET_IDX2, get<2>(p)
|
||||
#define BOOST_MOVE_GET_IDX4 BOOST_MOVE_GET_IDX3, get<3>(p)
|
||||
#define BOOST_MOVE_GET_IDX5 BOOST_MOVE_GET_IDX4, get<4>(p)
|
||||
#define BOOST_MOVE_GET_IDX6 BOOST_MOVE_GET_IDX5, get<5>(p)
|
||||
#define BOOST_MOVE_GET_IDX7 BOOST_MOVE_GET_IDX6, get<6>(p)
|
||||
#define BOOST_MOVE_GET_IDX8 BOOST_MOVE_GET_IDX7, get<7>(p)
|
||||
#define BOOST_MOVE_GET_IDX9 BOOST_MOVE_GET_IDX8, get<8>(p)
|
||||
|
||||
//BOOST_MOVE_GET_IDXQN
|
||||
#define BOOST_MOVE_GET_IDXQ0
|
||||
#define BOOST_MOVE_GET_IDXQ1 get<0>(q)
|
||||
#define BOOST_MOVE_GET_IDXQ2 BOOST_MOVE_GET_IDXQ1, get<1>(q)
|
||||
#define BOOST_MOVE_GET_IDXQ3 BOOST_MOVE_GET_IDXQ2, get<2>(q)
|
||||
#define BOOST_MOVE_GET_IDXQ4 BOOST_MOVE_GET_IDXQ3, get<3>(q)
|
||||
#define BOOST_MOVE_GET_IDXQ5 BOOST_MOVE_GET_IDXQ4, get<4>(q)
|
||||
#define BOOST_MOVE_GET_IDXQ6 BOOST_MOVE_GET_IDXQ5, get<5>(q)
|
||||
#define BOOST_MOVE_GET_IDXQ7 BOOST_MOVE_GET_IDXQ6, get<6>(q)
|
||||
#define BOOST_MOVE_GET_IDXQ8 BOOST_MOVE_GET_IDXQ7, get<7>(q)
|
||||
#define BOOST_MOVE_GET_IDXQ9 BOOST_MOVE_GET_IDXQ8, get<8>(q)
|
||||
|
||||
//BOOST_MOVE_ARGN
|
||||
#define BOOST_MOVE_ARG0
|
||||
#define BOOST_MOVE_ARG1 p0
|
||||
#define BOOST_MOVE_ARG2 BOOST_MOVE_ARG1, p1
|
||||
#define BOOST_MOVE_ARG3 BOOST_MOVE_ARG2, p2
|
||||
#define BOOST_MOVE_ARG4 BOOST_MOVE_ARG3, p3
|
||||
#define BOOST_MOVE_ARG5 BOOST_MOVE_ARG4, p4
|
||||
#define BOOST_MOVE_ARG6 BOOST_MOVE_ARG5, p5
|
||||
#define BOOST_MOVE_ARG7 BOOST_MOVE_ARG6, p6
|
||||
#define BOOST_MOVE_ARG8 BOOST_MOVE_ARG7, p7
|
||||
#define BOOST_MOVE_ARG9 BOOST_MOVE_ARG8, p8
|
||||
|
||||
//BOOST_MOVE_ARGQN
|
||||
#define BOOST_MOVE_ARGQ0
|
||||
#define BOOST_MOVE_ARGQ1 q0
|
||||
#define BOOST_MOVE_ARGQ2 BOOST_MOVE_ARGQ1, q1
|
||||
#define BOOST_MOVE_ARGQ3 BOOST_MOVE_ARGQ2, q2
|
||||
#define BOOST_MOVE_ARGQ4 BOOST_MOVE_ARGQ3, q3
|
||||
#define BOOST_MOVE_ARGQ5 BOOST_MOVE_ARGQ4, q4
|
||||
#define BOOST_MOVE_ARGQ6 BOOST_MOVE_ARGQ5, q5
|
||||
#define BOOST_MOVE_ARGQ7 BOOST_MOVE_ARGQ6, q6
|
||||
#define BOOST_MOVE_ARGQ8 BOOST_MOVE_ARGQ7, q7
|
||||
#define BOOST_MOVE_ARGQ9 BOOST_MOVE_ARGQ8, q8
|
||||
|
||||
//BOOST_MOVE_DECLVALN
|
||||
#define BOOST_MOVE_DECLVAL0
|
||||
#define BOOST_MOVE_DECLVAL1 ::boost::move_detail::declval<P0>()
|
||||
#define BOOST_MOVE_DECLVAL2 BOOST_MOVE_DECLVAL1, ::boost::move_detail::declval<P1>()
|
||||
#define BOOST_MOVE_DECLVAL3 BOOST_MOVE_DECLVAL2, ::boost::move_detail::declval<P2>()
|
||||
#define BOOST_MOVE_DECLVAL4 BOOST_MOVE_DECLVAL3, ::boost::move_detail::declval<P3>()
|
||||
#define BOOST_MOVE_DECLVAL5 BOOST_MOVE_DECLVAL4, ::boost::move_detail::declval<P4>()
|
||||
#define BOOST_MOVE_DECLVAL6 BOOST_MOVE_DECLVAL5, ::boost::move_detail::declval<P5>()
|
||||
#define BOOST_MOVE_DECLVAL7 BOOST_MOVE_DECLVAL6, ::boost::move_detail::declval<P6>()
|
||||
#define BOOST_MOVE_DECLVAL8 BOOST_MOVE_DECLVAL7, ::boost::move_detail::declval<P7>()
|
||||
#define BOOST_MOVE_DECLVAL9 BOOST_MOVE_DECLVAL8, ::boost::move_detail::declval<P8>()
|
||||
|
||||
//BOOST_MOVE_DECLVALQN
|
||||
#define BOOST_MOVE_DECLVALQ0
|
||||
#define BOOST_MOVE_DECLVALQ1 ::boost::move_detail::declval<Q0>()
|
||||
#define BOOST_MOVE_DECLVALQ2 BOOST_MOVE_DECLVALQ1, ::boost::move_detail::declval<Q1>()
|
||||
#define BOOST_MOVE_DECLVALQ3 BOOST_MOVE_DECLVALQ2, ::boost::move_detail::declval<Q2>()
|
||||
#define BOOST_MOVE_DECLVALQ4 BOOST_MOVE_DECLVALQ3, ::boost::move_detail::declval<Q3>()
|
||||
#define BOOST_MOVE_DECLVALQ5 BOOST_MOVE_DECLVALQ4, ::boost::move_detail::declval<Q4>()
|
||||
#define BOOST_MOVE_DECLVALQ6 BOOST_MOVE_DECLVALQ5, ::boost::move_detail::declval<Q5>()
|
||||
#define BOOST_MOVE_DECLVALQ7 BOOST_MOVE_DECLVALQ6, ::boost::move_detail::declval<Q6>()
|
||||
#define BOOST_MOVE_DECLVALQ8 BOOST_MOVE_DECLVALQ7, ::boost::move_detail::declval<Q7>()
|
||||
#define BOOST_MOVE_DECLVALQ9 BOOST_MOVE_DECLVALQ8, ::boost::move_detail::declval<Q8>()
|
||||
|
||||
#ifdef BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG
|
||||
#define BOOST_MOVE_MREF(T) ::boost::move_detail::mref<T>
|
||||
#define BOOST_MOVE_MFWD(N) ::boost::forward<P##N>(this->m_p##N.get())
|
||||
#define BOOST_MOVE_MFWDQ(N) ::boost::forward<Q##N>(this->m_q##N.get())
|
||||
#else
|
||||
#define BOOST_MOVE_MREF(T) BOOST_FWD_REF(T)
|
||||
#define BOOST_MOVE_MFWD(N) ::boost::forward<P##N>(this->m_p##N)
|
||||
#define BOOST_MOVE_MFWDQ(N) ::boost::forward<Q##N>(this->m_q##N)
|
||||
#endif
|
||||
#define BOOST_MOVE_MITFWD(N) *this->m_p##N
|
||||
#define BOOST_MOVE_MINC(N) ++this->m_p##N
|
||||
#define BOOST_MOVE_MITFWDQ(N) *this->m_q##N
|
||||
#define BOOST_MOVE_MINCQ(N) ++this->m_q##N
|
||||
|
||||
|
||||
//BOOST_MOVE_MFWDN
|
||||
#define BOOST_MOVE_MFWD0
|
||||
#define BOOST_MOVE_MFWD1 BOOST_MOVE_MFWD(0)
|
||||
#define BOOST_MOVE_MFWD2 BOOST_MOVE_MFWD1, BOOST_MOVE_MFWD(1)
|
||||
#define BOOST_MOVE_MFWD3 BOOST_MOVE_MFWD2, BOOST_MOVE_MFWD(2)
|
||||
#define BOOST_MOVE_MFWD4 BOOST_MOVE_MFWD3, BOOST_MOVE_MFWD(3)
|
||||
#define BOOST_MOVE_MFWD5 BOOST_MOVE_MFWD4, BOOST_MOVE_MFWD(4)
|
||||
#define BOOST_MOVE_MFWD6 BOOST_MOVE_MFWD5, BOOST_MOVE_MFWD(5)
|
||||
#define BOOST_MOVE_MFWD7 BOOST_MOVE_MFWD6, BOOST_MOVE_MFWD(6)
|
||||
#define BOOST_MOVE_MFWD8 BOOST_MOVE_MFWD7, BOOST_MOVE_MFWD(7)
|
||||
#define BOOST_MOVE_MFWD9 BOOST_MOVE_MFWD8, BOOST_MOVE_MFWD(8)
|
||||
|
||||
//BOOST_MOVE_MFWDN
|
||||
#define BOOST_MOVE_MFWDQ0
|
||||
#define BOOST_MOVE_MFWDQ1 BOOST_MOVE_MFWDQ(0)
|
||||
#define BOOST_MOVE_MFWDQ2 BOOST_MOVE_MFWDQ1, BOOST_MOVE_MFWDQ(1)
|
||||
#define BOOST_MOVE_MFWDQ3 BOOST_MOVE_MFWDQ2, BOOST_MOVE_MFWDQ(2)
|
||||
#define BOOST_MOVE_MFWDQ4 BOOST_MOVE_MFWDQ3, BOOST_MOVE_MFWDQ(3)
|
||||
#define BOOST_MOVE_MFWDQ5 BOOST_MOVE_MFWDQ4, BOOST_MOVE_MFWDQ(4)
|
||||
#define BOOST_MOVE_MFWDQ6 BOOST_MOVE_MFWDQ5, BOOST_MOVE_MFWDQ(5)
|
||||
#define BOOST_MOVE_MFWDQ7 BOOST_MOVE_MFWDQ6, BOOST_MOVE_MFWDQ(6)
|
||||
#define BOOST_MOVE_MFWDQ8 BOOST_MOVE_MFWDQ7, BOOST_MOVE_MFWDQ(7)
|
||||
#define BOOST_MOVE_MFWDQ9 BOOST_MOVE_MFWDQ8, BOOST_MOVE_MFWDQ(8)
|
||||
|
||||
//BOOST_MOVE_MINCN
|
||||
#define BOOST_MOVE_MINC0
|
||||
#define BOOST_MOVE_MINC1 BOOST_MOVE_MINC(0)
|
||||
#define BOOST_MOVE_MINC2 BOOST_MOVE_MINC1, BOOST_MOVE_MINC(1)
|
||||
#define BOOST_MOVE_MINC3 BOOST_MOVE_MINC2, BOOST_MOVE_MINC(2)
|
||||
#define BOOST_MOVE_MINC4 BOOST_MOVE_MINC3, BOOST_MOVE_MINC(3)
|
||||
#define BOOST_MOVE_MINC5 BOOST_MOVE_MINC4, BOOST_MOVE_MINC(4)
|
||||
#define BOOST_MOVE_MINC6 BOOST_MOVE_MINC5, BOOST_MOVE_MINC(5)
|
||||
#define BOOST_MOVE_MINC7 BOOST_MOVE_MINC6, BOOST_MOVE_MINC(6)
|
||||
#define BOOST_MOVE_MINC8 BOOST_MOVE_MINC7, BOOST_MOVE_MINC(7)
|
||||
#define BOOST_MOVE_MINC9 BOOST_MOVE_MINC8, BOOST_MOVE_MINC(8)
|
||||
|
||||
//BOOST_MOVE_MINCQN
|
||||
#define BOOST_MOVE_MINCQ0
|
||||
#define BOOST_MOVE_MINCQ1 BOOST_MOVE_MINCQ(0)
|
||||
#define BOOST_MOVE_MINCQ2 BOOST_MOVE_MINCQ1, BOOST_MOVE_MINCQ(1)
|
||||
#define BOOST_MOVE_MINCQ3 BOOST_MOVE_MINCQ2, BOOST_MOVE_MINCQ(2)
|
||||
#define BOOST_MOVE_MINCQ4 BOOST_MOVE_MINCQ3, BOOST_MOVE_MINCQ(3)
|
||||
#define BOOST_MOVE_MINCQ5 BOOST_MOVE_MINCQ4, BOOST_MOVE_MINCQ(4)
|
||||
#define BOOST_MOVE_MINCQ6 BOOST_MOVE_MINCQ5, BOOST_MOVE_MINCQ(5)
|
||||
#define BOOST_MOVE_MINCQ7 BOOST_MOVE_MINCQ6, BOOST_MOVE_MINCQ(6)
|
||||
#define BOOST_MOVE_MINCQ8 BOOST_MOVE_MINCQ7, BOOST_MOVE_MINCQ(7)
|
||||
#define BOOST_MOVE_MINCQ9 BOOST_MOVE_MINCQ8, BOOST_MOVE_MINCQ(8)
|
||||
|
||||
//BOOST_MOVE_MITFWDN
|
||||
#define BOOST_MOVE_MITFWD0
|
||||
#define BOOST_MOVE_MITFWD1 BOOST_MOVE_MITFWD(0)
|
||||
#define BOOST_MOVE_MITFWD2 BOOST_MOVE_MITFWD1, BOOST_MOVE_MITFWD(1)
|
||||
#define BOOST_MOVE_MITFWD3 BOOST_MOVE_MITFWD2, BOOST_MOVE_MITFWD(2)
|
||||
#define BOOST_MOVE_MITFWD4 BOOST_MOVE_MITFWD3, BOOST_MOVE_MITFWD(3)
|
||||
#define BOOST_MOVE_MITFWD5 BOOST_MOVE_MITFWD4, BOOST_MOVE_MITFWD(4)
|
||||
#define BOOST_MOVE_MITFWD6 BOOST_MOVE_MITFWD5, BOOST_MOVE_MITFWD(5)
|
||||
#define BOOST_MOVE_MITFWD7 BOOST_MOVE_MITFWD6, BOOST_MOVE_MITFWD(6)
|
||||
#define BOOST_MOVE_MITFWD8 BOOST_MOVE_MITFWD7, BOOST_MOVE_MITFWD(7)
|
||||
#define BOOST_MOVE_MITFWD9 BOOST_MOVE_MITFWD8, BOOST_MOVE_MITFWD(8)
|
||||
|
||||
//BOOST_MOVE_MITFWDQN
|
||||
#define BOOST_MOVE_MITFWDQ0
|
||||
#define BOOST_MOVE_MITFWDQ1 BOOST_MOVE_MITFWDQ(0)
|
||||
#define BOOST_MOVE_MITFWDQ2 BOOST_MOVE_MITFWDQ1, BOOST_MOVE_MITFWDQ(1)
|
||||
#define BOOST_MOVE_MITFWDQ3 BOOST_MOVE_MITFWDQ2, BOOST_MOVE_MITFWDQ(2)
|
||||
#define BOOST_MOVE_MITFWDQ4 BOOST_MOVE_MITFWDQ3, BOOST_MOVE_MITFWDQ(3)
|
||||
#define BOOST_MOVE_MITFWDQ5 BOOST_MOVE_MITFWDQ4, BOOST_MOVE_MITFWDQ(4)
|
||||
#define BOOST_MOVE_MITFWDQ6 BOOST_MOVE_MITFWDQ5, BOOST_MOVE_MITFWDQ(5)
|
||||
#define BOOST_MOVE_MITFWDQ7 BOOST_MOVE_MITFWDQ6, BOOST_MOVE_MITFWDQ(6)
|
||||
#define BOOST_MOVE_MITFWDQ8 BOOST_MOVE_MITFWDQ7, BOOST_MOVE_MITFWDQ(7)
|
||||
#define BOOST_MOVE_MITFWDQ9 BOOST_MOVE_MITFWDQ8, BOOST_MOVE_MITFWDQ(8)
|
||||
|
||||
//BOOST_MOVE_FWD_INITN
|
||||
#define BOOST_MOVE_FWD_INIT0
|
||||
#define BOOST_MOVE_FWD_INIT1 m_p0(::boost::forward<P0>(p0))
|
||||
#define BOOST_MOVE_FWD_INIT2 BOOST_MOVE_FWD_INIT1, m_p1(::boost::forward<P1>(p1))
|
||||
#define BOOST_MOVE_FWD_INIT3 BOOST_MOVE_FWD_INIT2, m_p2(::boost::forward<P2>(p2))
|
||||
#define BOOST_MOVE_FWD_INIT4 BOOST_MOVE_FWD_INIT3, m_p3(::boost::forward<P3>(p3))
|
||||
#define BOOST_MOVE_FWD_INIT5 BOOST_MOVE_FWD_INIT4, m_p4(::boost::forward<P4>(p4))
|
||||
#define BOOST_MOVE_FWD_INIT6 BOOST_MOVE_FWD_INIT5, m_p5(::boost::forward<P5>(p5))
|
||||
#define BOOST_MOVE_FWD_INIT7 BOOST_MOVE_FWD_INIT6, m_p6(::boost::forward<P6>(p6))
|
||||
#define BOOST_MOVE_FWD_INIT8 BOOST_MOVE_FWD_INIT7, m_p7(::boost::forward<P7>(p7))
|
||||
#define BOOST_MOVE_FWD_INIT9 BOOST_MOVE_FWD_INIT8, m_p8(::boost::forward<P8>(p8))
|
||||
|
||||
//BOOST_MOVE_FWD_INITQN
|
||||
#define BOOST_MOVE_FWD_INITQ0
|
||||
#define BOOST_MOVE_FWD_INITQ1 m_q0(::boost::forward<Q0>(q0))
|
||||
#define BOOST_MOVE_FWD_INITQ2 BOOST_MOVE_FWD_INITQ1, m_q1(::boost::forward<Q1>(q1))
|
||||
#define BOOST_MOVE_FWD_INITQ3 BOOST_MOVE_FWD_INITQ2, m_q2(::boost::forward<Q2>(q2))
|
||||
#define BOOST_MOVE_FWD_INITQ4 BOOST_MOVE_FWD_INITQ3, m_q3(::boost::forward<Q3>(q3))
|
||||
#define BOOST_MOVE_FWD_INITQ5 BOOST_MOVE_FWD_INITQ4, m_q4(::boost::forward<Q4>(q4))
|
||||
#define BOOST_MOVE_FWD_INITQ6 BOOST_MOVE_FWD_INITQ5, m_q5(::boost::forward<Q5>(q5))
|
||||
#define BOOST_MOVE_FWD_INITQ7 BOOST_MOVE_FWD_INITQ6, m_q6(::boost::forward<Q6>(q6))
|
||||
#define BOOST_MOVE_FWD_INITQ8 BOOST_MOVE_FWD_INITQ7, m_q7(::boost::forward<Q7>(q7))
|
||||
#define BOOST_MOVE_FWD_INITQ9 BOOST_MOVE_FWD_INITQ8, m_q8(::boost::forward<Q8>(q8))
|
||||
|
||||
//BOOST_MOVE_VAL_INITN
|
||||
#define BOOST_MOVE_VAL_INIT0
|
||||
#define BOOST_MOVE_VAL_INIT1 m_p0(p0)
|
||||
#define BOOST_MOVE_VAL_INIT2 BOOST_MOVE_VAL_INIT1, m_p1(p1)
|
||||
#define BOOST_MOVE_VAL_INIT3 BOOST_MOVE_VAL_INIT2, m_p2(p2)
|
||||
#define BOOST_MOVE_VAL_INIT4 BOOST_MOVE_VAL_INIT3, m_p3(p3)
|
||||
#define BOOST_MOVE_VAL_INIT5 BOOST_MOVE_VAL_INIT4, m_p4(p4)
|
||||
#define BOOST_MOVE_VAL_INIT6 BOOST_MOVE_VAL_INIT5, m_p5(p5)
|
||||
#define BOOST_MOVE_VAL_INIT7 BOOST_MOVE_VAL_INIT6, m_p6(p6)
|
||||
#define BOOST_MOVE_VAL_INIT8 BOOST_MOVE_VAL_INIT7, m_p7(p7)
|
||||
#define BOOST_MOVE_VAL_INIT9 BOOST_MOVE_VAL_INIT8, m_p8(p8)
|
||||
|
||||
//BOOST_MOVE_VAL_INITQN
|
||||
#define BOOST_MOVE_VAL_INITQ0
|
||||
#define BOOST_MOVE_VAL_INITQ1 m_q0(q0)
|
||||
#define BOOST_MOVE_VAL_INITQ2 BOOST_MOVE_VAL_INITQ1, m_q1(q1)
|
||||
#define BOOST_MOVE_VAL_INITQ3 BOOST_MOVE_VAL_INITQ2, m_q2(q2)
|
||||
#define BOOST_MOVE_VAL_INITQ4 BOOST_MOVE_VAL_INITQ3, m_q3(q3)
|
||||
#define BOOST_MOVE_VAL_INITQ5 BOOST_MOVE_VAL_INITQ4, m_q4(q4)
|
||||
#define BOOST_MOVE_VAL_INITQ6 BOOST_MOVE_VAL_INITQ5, m_q5(q5)
|
||||
#define BOOST_MOVE_VAL_INITQ7 BOOST_MOVE_VAL_INITQ6, m_q6(q6)
|
||||
#define BOOST_MOVE_VAL_INITQ8 BOOST_MOVE_VAL_INITQ7, m_q7(q7)
|
||||
#define BOOST_MOVE_VAL_INITQ9 BOOST_MOVE_VAL_INITQ8, m_q8(q8)
|
||||
|
||||
//BOOST_MOVE_UREFN
|
||||
#define BOOST_MOVE_UREF0
|
||||
#define BOOST_MOVE_UREF1 BOOST_FWD_REF(P0) p0
|
||||
#define BOOST_MOVE_UREF2 BOOST_MOVE_UREF1, BOOST_FWD_REF(P1) p1
|
||||
#define BOOST_MOVE_UREF3 BOOST_MOVE_UREF2, BOOST_FWD_REF(P2) p2
|
||||
#define BOOST_MOVE_UREF4 BOOST_MOVE_UREF3, BOOST_FWD_REF(P3) p3
|
||||
#define BOOST_MOVE_UREF5 BOOST_MOVE_UREF4, BOOST_FWD_REF(P4) p4
|
||||
#define BOOST_MOVE_UREF6 BOOST_MOVE_UREF5, BOOST_FWD_REF(P5) p5
|
||||
#define BOOST_MOVE_UREF7 BOOST_MOVE_UREF6, BOOST_FWD_REF(P6) p6
|
||||
#define BOOST_MOVE_UREF8 BOOST_MOVE_UREF7, BOOST_FWD_REF(P7) p7
|
||||
#define BOOST_MOVE_UREF9 BOOST_MOVE_UREF8, BOOST_FWD_REF(P8) p8
|
||||
|
||||
//BOOST_MOVE_UREFQN
|
||||
#define BOOST_MOVE_UREFQ0
|
||||
#define BOOST_MOVE_UREFQ1 BOOST_FWD_REF(Q0) q0
|
||||
#define BOOST_MOVE_UREFQ2 BOOST_MOVE_UREFQ1, BOOST_FWD_REF(Q1) q1
|
||||
#define BOOST_MOVE_UREFQ3 BOOST_MOVE_UREFQ2, BOOST_FWD_REF(Q2) q2
|
||||
#define BOOST_MOVE_UREFQ4 BOOST_MOVE_UREFQ3, BOOST_FWD_REF(Q3) q3
|
||||
#define BOOST_MOVE_UREFQ5 BOOST_MOVE_UREFQ4, BOOST_FWD_REF(Q4) q4
|
||||
#define BOOST_MOVE_UREFQ6 BOOST_MOVE_UREFQ5, BOOST_FWD_REF(Q5) q5
|
||||
#define BOOST_MOVE_UREFQ7 BOOST_MOVE_UREFQ6, BOOST_FWD_REF(Q6) q6
|
||||
#define BOOST_MOVE_UREFQ8 BOOST_MOVE_UREFQ7, BOOST_FWD_REF(Q7) q7
|
||||
#define BOOST_MOVE_UREFQ9 BOOST_MOVE_UREFQ8, BOOST_FWD_REF(Q8) q8
|
||||
|
||||
//BOOST_MOVE_VALN
|
||||
#define BOOST_MOVE_VAL0
|
||||
#define BOOST_MOVE_VAL1 BOOST_FWD_REF(P0) p0
|
||||
#define BOOST_MOVE_VAL2 BOOST_MOVE_VAL1, BOOST_FWD_REF(P1) p1
|
||||
#define BOOST_MOVE_VAL3 BOOST_MOVE_VAL2, BOOST_FWD_REF(P2) p2
|
||||
#define BOOST_MOVE_VAL4 BOOST_MOVE_VAL3, BOOST_FWD_REF(P3) p3
|
||||
#define BOOST_MOVE_VAL5 BOOST_MOVE_VAL4, BOOST_FWD_REF(P4) p4
|
||||
#define BOOST_MOVE_VAL6 BOOST_MOVE_VAL5, BOOST_FWD_REF(P5) p5
|
||||
#define BOOST_MOVE_VAL7 BOOST_MOVE_VAL6, BOOST_FWD_REF(P6) p6
|
||||
#define BOOST_MOVE_VAL8 BOOST_MOVE_VAL7, BOOST_FWD_REF(P7) p7
|
||||
#define BOOST_MOVE_VAL9 BOOST_MOVE_VAL8, BOOST_FWD_REF(P8) p8
|
||||
|
||||
//BOOST_MOVE_VALQN
|
||||
#define BOOST_MOVE_VALQ0
|
||||
#define BOOST_MOVE_VALQ1 BOOST_FWD_REF(Q0) q0
|
||||
#define BOOST_MOVE_VALQ2 BOOST_MOVE_VALQ1, BOOST_FWD_REF(Q1) q1
|
||||
#define BOOST_MOVE_VALQ3 BOOST_MOVE_VALQ2, BOOST_FWD_REF(Q2) q2
|
||||
#define BOOST_MOVE_VALQ4 BOOST_MOVE_VALQ3, BOOST_FWD_REF(Q3) q3
|
||||
#define BOOST_MOVE_VALQ5 BOOST_MOVE_VALQ4, BOOST_FWD_REF(Q4) q4
|
||||
#define BOOST_MOVE_VALQ6 BOOST_MOVE_VALQ5, BOOST_FWD_REF(Q5) q5
|
||||
#define BOOST_MOVE_VALQ7 BOOST_MOVE_VALQ6, BOOST_FWD_REF(Q6) q6
|
||||
#define BOOST_MOVE_VALQ8 BOOST_MOVE_VALQ7, BOOST_FWD_REF(Q7) q7
|
||||
#define BOOST_MOVE_VALQ9 BOOST_MOVE_VALQ8, BOOST_FWD_REF(Q8) q8
|
||||
|
||||
|
||||
#define BOOST_MOVE_UNVOIDCREF(T) const typename boost::move_detail::unvoid<T>::type&
|
||||
//BOOST_MOVE_CREFN
|
||||
#define BOOST_MOVE_CREF0
|
||||
#define BOOST_MOVE_CREF1 BOOST_MOVE_UNVOIDCREF(P0) p0
|
||||
#define BOOST_MOVE_CREF2 BOOST_MOVE_CREF1, BOOST_MOVE_UNVOIDCREF(P1) p1
|
||||
#define BOOST_MOVE_CREF3 BOOST_MOVE_CREF2, BOOST_MOVE_UNVOIDCREF(P2) p2
|
||||
#define BOOST_MOVE_CREF4 BOOST_MOVE_CREF3, BOOST_MOVE_UNVOIDCREF(P3) p3
|
||||
#define BOOST_MOVE_CREF5 BOOST_MOVE_CREF4, BOOST_MOVE_UNVOIDCREF(P4) p4
|
||||
#define BOOST_MOVE_CREF6 BOOST_MOVE_CREF5, BOOST_MOVE_UNVOIDCREF(P5) p5
|
||||
#define BOOST_MOVE_CREF7 BOOST_MOVE_CREF6, BOOST_MOVE_UNVOIDCREF(P6) p6
|
||||
#define BOOST_MOVE_CREF8 BOOST_MOVE_CREF7, BOOST_MOVE_UNVOIDCREF(P7) p7
|
||||
#define BOOST_MOVE_CREF9 BOOST_MOVE_CREF8, BOOST_MOVE_UNVOIDCREF(P8) p8
|
||||
|
||||
//BOOST_MOVE_CREFQN
|
||||
#define BOOST_MOVE_CREFQ0
|
||||
#define BOOST_MOVE_CREFQ1 BOOST_MOVE_UNVOIDCREF(Q0) q0
|
||||
#define BOOST_MOVE_CREFQ2 BOOST_MOVE_CREFQ1, BOOST_MOVE_UNVOIDCREF(Q1) q1
|
||||
#define BOOST_MOVE_CREFQ3 BOOST_MOVE_CREFQ2, BOOST_MOVE_UNVOIDCREF(Q2) q2
|
||||
#define BOOST_MOVE_CREFQ4 BOOST_MOVE_CREFQ3, BOOST_MOVE_UNVOIDCREF(Q3) q3
|
||||
#define BOOST_MOVE_CREFQ5 BOOST_MOVE_CREFQ4, BOOST_MOVE_UNVOIDCREF(Q4) q4
|
||||
#define BOOST_MOVE_CREFQ6 BOOST_MOVE_CREFQ5, BOOST_MOVE_UNVOIDCREF(Q5) q5
|
||||
#define BOOST_MOVE_CREFQ7 BOOST_MOVE_CREFQ6, BOOST_MOVE_UNVOIDCREF(Q6) q6
|
||||
#define BOOST_MOVE_CREFQ8 BOOST_MOVE_CREFQ7, BOOST_MOVE_UNVOIDCREF(Q7) q7
|
||||
#define BOOST_MOVE_CREFQ9 BOOST_MOVE_CREFQ8, BOOST_MOVE_UNVOIDCREF(Q8) q8
|
||||
|
||||
//BOOST_MOVE_CLASSN
|
||||
#define BOOST_MOVE_CLASS0
|
||||
#define BOOST_MOVE_CLASS1 class P0
|
||||
#define BOOST_MOVE_CLASS2 BOOST_MOVE_CLASS1, class P1
|
||||
#define BOOST_MOVE_CLASS3 BOOST_MOVE_CLASS2, class P2
|
||||
#define BOOST_MOVE_CLASS4 BOOST_MOVE_CLASS3, class P3
|
||||
#define BOOST_MOVE_CLASS5 BOOST_MOVE_CLASS4, class P4
|
||||
#define BOOST_MOVE_CLASS6 BOOST_MOVE_CLASS5, class P5
|
||||
#define BOOST_MOVE_CLASS7 BOOST_MOVE_CLASS6, class P6
|
||||
#define BOOST_MOVE_CLASS8 BOOST_MOVE_CLASS7, class P7
|
||||
#define BOOST_MOVE_CLASS9 BOOST_MOVE_CLASS8, class P8
|
||||
|
||||
//BOOST_MOVE_CLASSQN
|
||||
#define BOOST_MOVE_CLASSQ0
|
||||
#define BOOST_MOVE_CLASSQ1 class Q0
|
||||
#define BOOST_MOVE_CLASSQ2 BOOST_MOVE_CLASSQ1, class Q1
|
||||
#define BOOST_MOVE_CLASSQ3 BOOST_MOVE_CLASSQ2, class Q2
|
||||
#define BOOST_MOVE_CLASSQ4 BOOST_MOVE_CLASSQ3, class Q3
|
||||
#define BOOST_MOVE_CLASSQ5 BOOST_MOVE_CLASSQ4, class Q4
|
||||
#define BOOST_MOVE_CLASSQ6 BOOST_MOVE_CLASSQ5, class Q5
|
||||
#define BOOST_MOVE_CLASSQ7 BOOST_MOVE_CLASSQ6, class Q6
|
||||
#define BOOST_MOVE_CLASSQ8 BOOST_MOVE_CLASSQ7, class Q7
|
||||
#define BOOST_MOVE_CLASSQ9 BOOST_MOVE_CLASSQ8, class Q8
|
||||
|
||||
//BOOST_MOVE_CLASSDFLTN
|
||||
#define BOOST_MOVE_CLASSDFLT0
|
||||
#define BOOST_MOVE_CLASSDFLT1 class P0 = void
|
||||
#define BOOST_MOVE_CLASSDFLT2 BOOST_MOVE_CLASSDFLT1, class P1 = void
|
||||
#define BOOST_MOVE_CLASSDFLT3 BOOST_MOVE_CLASSDFLT2, class P2 = void
|
||||
#define BOOST_MOVE_CLASSDFLT4 BOOST_MOVE_CLASSDFLT3, class P3 = void
|
||||
#define BOOST_MOVE_CLASSDFLT5 BOOST_MOVE_CLASSDFLT4, class P4 = void
|
||||
#define BOOST_MOVE_CLASSDFLT6 BOOST_MOVE_CLASSDFLT5, class P5 = void
|
||||
#define BOOST_MOVE_CLASSDFLT7 BOOST_MOVE_CLASSDFLT6, class P6 = void
|
||||
#define BOOST_MOVE_CLASSDFLT8 BOOST_MOVE_CLASSDFLT7, class P7 = void
|
||||
#define BOOST_MOVE_CLASSDFLT9 BOOST_MOVE_CLASSDFLT8, class P8 = void
|
||||
|
||||
//BOOST_MOVE_CLASSDFLTQN
|
||||
#define BOOST_MOVE_CLASSDFLTQ0
|
||||
#define BOOST_MOVE_CLASSDFLTQ1 class Q0 = void
|
||||
#define BOOST_MOVE_CLASSDFLTQ2 BOOST_MOVE_CLASSDFLTQ1, class Q1 = void
|
||||
#define BOOST_MOVE_CLASSDFLTQ3 BOOST_MOVE_CLASSDFLTQ2, class Q2 = void
|
||||
#define BOOST_MOVE_CLASSDFLTQ4 BOOST_MOVE_CLASSDFLTQ3, class Q3 = void
|
||||
#define BOOST_MOVE_CLASSDFLTQ5 BOOST_MOVE_CLASSDFLTQ4, class Q4 = void
|
||||
#define BOOST_MOVE_CLASSDFLTQ6 BOOST_MOVE_CLASSDFLTQ5, class Q5 = void
|
||||
#define BOOST_MOVE_CLASSDFLTQ7 BOOST_MOVE_CLASSDFLTQ6, class Q6 = void
|
||||
#define BOOST_MOVE_CLASSDFLTQ8 BOOST_MOVE_CLASSDFLTQ7, class Q7 = void
|
||||
#define BOOST_MOVE_CLASSDFLTQ9 BOOST_MOVE_CLASSDFLTQ8, class Q8 = void
|
||||
|
||||
//BOOST_MOVE_TARGN
|
||||
#define BOOST_MOVE_TARG0
|
||||
#define BOOST_MOVE_TARG1 P0
|
||||
#define BOOST_MOVE_TARG2 BOOST_MOVE_TARG1, P1
|
||||
#define BOOST_MOVE_TARG3 BOOST_MOVE_TARG2, P2
|
||||
#define BOOST_MOVE_TARG4 BOOST_MOVE_TARG3, P3
|
||||
#define BOOST_MOVE_TARG5 BOOST_MOVE_TARG4, P4
|
||||
#define BOOST_MOVE_TARG6 BOOST_MOVE_TARG5, P5
|
||||
#define BOOST_MOVE_TARG7 BOOST_MOVE_TARG6, P6
|
||||
#define BOOST_MOVE_TARG8 BOOST_MOVE_TARG7, P7
|
||||
#define BOOST_MOVE_TARG9 BOOST_MOVE_TARG8, P8
|
||||
|
||||
//BOOST_MOVE_TARGQN
|
||||
#define BOOST_MOVE_TARGQ0
|
||||
#define BOOST_MOVE_TARGQ1 Q0
|
||||
#define BOOST_MOVE_TARGQ2 BOOST_MOVE_TARGQ1, Q1
|
||||
#define BOOST_MOVE_TARGQ3 BOOST_MOVE_TARGQ2, Q2
|
||||
#define BOOST_MOVE_TARGQ4 BOOST_MOVE_TARGQ3, Q3
|
||||
#define BOOST_MOVE_TARGQ5 BOOST_MOVE_TARGQ4, Q4
|
||||
#define BOOST_MOVE_TARGQ6 BOOST_MOVE_TARGQ5, Q5
|
||||
#define BOOST_MOVE_TARGQ7 BOOST_MOVE_TARGQ6, Q6
|
||||
#define BOOST_MOVE_TARGQ8 BOOST_MOVE_TARGQ7, Q7
|
||||
#define BOOST_MOVE_TARGQ9 BOOST_MOVE_TARGQ8, Q8
|
||||
|
||||
//BOOST_MOVE_FWD_TN
|
||||
#define BOOST_MOVE_FWD_T0
|
||||
#define BOOST_MOVE_FWD_T1 typename ::boost::move_detail::forward_type<P0>::type
|
||||
#define BOOST_MOVE_FWD_T2 BOOST_MOVE_FWD_T1, typename ::boost::move_detail::forward_type<P1>::type
|
||||
#define BOOST_MOVE_FWD_T3 BOOST_MOVE_FWD_T2, typename ::boost::move_detail::forward_type<P2>::type
|
||||
#define BOOST_MOVE_FWD_T4 BOOST_MOVE_FWD_T3, typename ::boost::move_detail::forward_type<P3>::type
|
||||
#define BOOST_MOVE_FWD_T5 BOOST_MOVE_FWD_T4, typename ::boost::move_detail::forward_type<P4>::type
|
||||
#define BOOST_MOVE_FWD_T6 BOOST_MOVE_FWD_T5, typename ::boost::move_detail::forward_type<P5>::type
|
||||
#define BOOST_MOVE_FWD_T7 BOOST_MOVE_FWD_T6, typename ::boost::move_detail::forward_type<P6>::type
|
||||
#define BOOST_MOVE_FWD_T8 BOOST_MOVE_FWD_T7, typename ::boost::move_detail::forward_type<P7>::type
|
||||
#define BOOST_MOVE_FWD_T9 BOOST_MOVE_FWD_T8, typename ::boost::move_detail::forward_type<P8>::type
|
||||
|
||||
//BOOST_MOVE_FWD_TQN
|
||||
#define BOOST_MOVE_FWD_TQ0
|
||||
#define BOOST_MOVE_FWD_TQ1 typename ::boost::move_detail::forward_type<Q0>::type
|
||||
#define BOOST_MOVE_FWD_TQ2 BOOST_MOVE_FWD_TQ1, typename ::boost::move_detail::forward_type<Q1>::type
|
||||
#define BOOST_MOVE_FWD_TQ3 BOOST_MOVE_FWD_TQ2, typename ::boost::move_detail::forward_type<Q2>::type
|
||||
#define BOOST_MOVE_FWD_TQ4 BOOST_MOVE_FWD_TQ3, typename ::boost::move_detail::forward_type<Q3>::type
|
||||
#define BOOST_MOVE_FWD_TQ5 BOOST_MOVE_FWD_TQ4, typename ::boost::move_detail::forward_type<Q4>::type
|
||||
#define BOOST_MOVE_FWD_TQ6 BOOST_MOVE_FWD_TQ5, typename ::boost::move_detail::forward_type<Q5>::type
|
||||
#define BOOST_MOVE_FWD_TQ7 BOOST_MOVE_FWD_TQ6, typename ::boost::move_detail::forward_type<Q6>::type
|
||||
#define BOOST_MOVE_FWD_TQ8 BOOST_MOVE_FWD_TQ7, typename ::boost::move_detail::forward_type<Q7>::type
|
||||
#define BOOST_MOVE_FWD_TQ9 BOOST_MOVE_FWD_TQ8, typename ::boost::move_detail::forward_type<Q8>::type
|
||||
|
||||
//BOOST_MOVE_MREFX
|
||||
#define BOOST_MOVE_MREF0
|
||||
#define BOOST_MOVE_MREF1 BOOST_MOVE_MREF(P0) m_p0;
|
||||
#define BOOST_MOVE_MREF2 BOOST_MOVE_MREF1 BOOST_MOVE_MREF(P1) m_p1;
|
||||
#define BOOST_MOVE_MREF3 BOOST_MOVE_MREF2 BOOST_MOVE_MREF(P2) m_p2;
|
||||
#define BOOST_MOVE_MREF4 BOOST_MOVE_MREF3 BOOST_MOVE_MREF(P3) m_p3;
|
||||
#define BOOST_MOVE_MREF5 BOOST_MOVE_MREF4 BOOST_MOVE_MREF(P4) m_p4;
|
||||
#define BOOST_MOVE_MREF6 BOOST_MOVE_MREF5 BOOST_MOVE_MREF(P5) m_p5;
|
||||
#define BOOST_MOVE_MREF7 BOOST_MOVE_MREF6 BOOST_MOVE_MREF(P6) m_p6;
|
||||
#define BOOST_MOVE_MREF8 BOOST_MOVE_MREF7 BOOST_MOVE_MREF(P7) m_p7;
|
||||
#define BOOST_MOVE_MREF9 BOOST_MOVE_MREF8 BOOST_MOVE_MREF(P8) m_p8;
|
||||
|
||||
//BOOST_MOVE_MREFQX
|
||||
#define BOOST_MOVE_MREFQ0
|
||||
#define BOOST_MOVE_MREFQ1 BOOST_MOVE_MREFQ(Q0) m_q0;
|
||||
#define BOOST_MOVE_MREFQ2 BOOST_MOVE_MREFQ1 BOOST_MOVE_MREFQ(Q1) m_q1;
|
||||
#define BOOST_MOVE_MREFQ3 BOOST_MOVE_MREFQ2 BOOST_MOVE_MREFQ(Q2) m_q2;
|
||||
#define BOOST_MOVE_MREFQ4 BOOST_MOVE_MREFQ3 BOOST_MOVE_MREFQ(Q3) m_q3;
|
||||
#define BOOST_MOVE_MREFQ5 BOOST_MOVE_MREFQ4 BOOST_MOVE_MREFQ(Q4) m_q4;
|
||||
#define BOOST_MOVE_MREFQ6 BOOST_MOVE_MREFQ5 BOOST_MOVE_MREFQ(Q5) m_q5;
|
||||
#define BOOST_MOVE_MREFQ7 BOOST_MOVE_MREFQ6 BOOST_MOVE_MREFQ(Q6) m_q6;
|
||||
#define BOOST_MOVE_MREFQ8 BOOST_MOVE_MREFQ7 BOOST_MOVE_MREFQ(Q7) m_q7;
|
||||
#define BOOST_MOVE_MREFQ9 BOOST_MOVE_MREFQ8 BOOST_MOVE_MREFQ(Q8) m_q8;
|
||||
|
||||
//BOOST_MOVE_MEMBX
|
||||
#define BOOST_MOVE_MEMB0
|
||||
#define BOOST_MOVE_MEMB1 P0 m_p0;
|
||||
#define BOOST_MOVE_MEMB2 BOOST_MOVE_MEMB1 P1 m_p1;
|
||||
#define BOOST_MOVE_MEMB3 BOOST_MOVE_MEMB2 P2 m_p2;
|
||||
#define BOOST_MOVE_MEMB4 BOOST_MOVE_MEMB3 P3 m_p3;
|
||||
#define BOOST_MOVE_MEMB5 BOOST_MOVE_MEMB4 P4 m_p4;
|
||||
#define BOOST_MOVE_MEMB6 BOOST_MOVE_MEMB5 P5 m_p5;
|
||||
#define BOOST_MOVE_MEMB7 BOOST_MOVE_MEMB6 P6 m_p6;
|
||||
#define BOOST_MOVE_MEMB8 BOOST_MOVE_MEMB7 P7 m_p7;
|
||||
#define BOOST_MOVE_MEMB9 BOOST_MOVE_MEMB8 P8 m_p8;
|
||||
|
||||
//BOOST_MOVE_MEMBQX
|
||||
#define BOOST_MOVE_MEMBQ0
|
||||
#define BOOST_MOVE_MEMBQ1 Q0 m_q0;
|
||||
#define BOOST_MOVE_MEMBQ2 BOOST_MOVE_MEMBQ1 Q1 m_q1;
|
||||
#define BOOST_MOVE_MEMBQ3 BOOST_MOVE_MEMBQ2 Q2 m_q2;
|
||||
#define BOOST_MOVE_MEMBQ4 BOOST_MOVE_MEMBQ3 Q3 m_q3;
|
||||
#define BOOST_MOVE_MEMBQ5 BOOST_MOVE_MEMBQ4 Q4 m_q4;
|
||||
#define BOOST_MOVE_MEMBQ6 BOOST_MOVE_MEMBQ5 Q5 m_q5;
|
||||
#define BOOST_MOVE_MEMBQ7 BOOST_MOVE_MEMBQ6 Q6 m_q6;
|
||||
#define BOOST_MOVE_MEMBQ8 BOOST_MOVE_MEMBQ7 Q7 m_q7;
|
||||
#define BOOST_MOVE_MEMBQ9 BOOST_MOVE_MEMBQ8 Q8 m_q8;
|
||||
|
||||
//BOOST_MOVE_TMPL_LTN
|
||||
#define BOOST_MOVE_TMPL_LT0
|
||||
#define BOOST_MOVE_TMPL_LT1 template<
|
||||
#define BOOST_MOVE_TMPL_LT2 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT3 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT4 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT5 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT6 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT7 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT8 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT9 BOOST_MOVE_TMPL_LT1
|
||||
|
||||
//BOOST_MOVE_LTN
|
||||
#define BOOST_MOVE_LT0
|
||||
#define BOOST_MOVE_LT1 <
|
||||
#define BOOST_MOVE_LT2 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT3 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT4 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT5 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT6 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT7 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT8 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT9 BOOST_MOVE_LT1
|
||||
|
||||
//BOOST_MOVE_GTN
|
||||
#define BOOST_MOVE_GT0
|
||||
#define BOOST_MOVE_GT1 >
|
||||
#define BOOST_MOVE_GT2 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT3 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT4 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT5 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT6 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT7 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT8 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT9 BOOST_MOVE_GT1
|
||||
|
||||
//BOOST_MOVE_LPN
|
||||
#define BOOST_MOVE_LP0
|
||||
#define BOOST_MOVE_LP1 (
|
||||
#define BOOST_MOVE_LP2 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP3 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP4 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP5 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP6 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP7 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP8 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP9 BOOST_MOVE_LP1
|
||||
|
||||
//BOOST_MOVE_RPN
|
||||
#define BOOST_MOVE_RP0
|
||||
#define BOOST_MOVE_RP1 )
|
||||
#define BOOST_MOVE_RP2 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP3 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP4 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP5 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP6 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP7 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP8 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP9 BOOST_MOVE_RP1
|
||||
|
||||
//BOOST_MOVE_IN
|
||||
#define BOOST_MOVE_I0
|
||||
#define BOOST_MOVE_I1 ,
|
||||
#define BOOST_MOVE_I2 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I3 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I4 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I5 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I6 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I7 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I8 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I9 BOOST_MOVE_I1
|
||||
|
||||
//BOOST_MOVE_BOOL
|
||||
# define BOOST_MOVE_BOOL(x) BOOST_MOVE_BOOL_I(x)
|
||||
# define BOOST_MOVE_BOOL_I(x) BOOST_MOVE_BOOL##x
|
||||
# define BOOST_MOVE_BOOL0 0
|
||||
# define BOOST_MOVE_BOOL1 1
|
||||
# define BOOST_MOVE_BOOL2 1
|
||||
# define BOOST_MOVE_BOOL3 1
|
||||
# define BOOST_MOVE_BOOL4 1
|
||||
# define BOOST_MOVE_BOOL5 1
|
||||
# define BOOST_MOVE_BOOL6 1
|
||||
# define BOOST_MOVE_BOOL7 1
|
||||
# define BOOST_MOVE_BOOL8 1
|
||||
# define BOOST_MOVE_BOOL9 1
|
||||
|
||||
//BOOST_MOVE_I_IF
|
||||
#define BOOST_MOVE_I_IF(x) BOOST_MOVE_I_IF_I (BOOST_MOVE_BOOL(x))
|
||||
#define BOOST_MOVE_I_IF_I(x) BOOST_MOVE_I_IF_I2(x)
|
||||
#define BOOST_MOVE_I_IF_I2(x) BOOST_MOVE_IF_I_##x
|
||||
#define BOOST_MOVE_IF_I_0
|
||||
#define BOOST_MOVE_IF_I_1 ,
|
||||
|
||||
//BOOST_MOVE_IF
|
||||
#define BOOST_MOVE_IF(cond, t, f) BOOST_MOVE_IF_I(cond, t, f)
|
||||
#define BOOST_MOVE_IF_I(cond, t, f) BOOST_MOVE_IIF(BOOST_MOVE_BOOL(cond), t, f)
|
||||
|
||||
#define BOOST_MOVE_IIF(bit, t, f) BOOST_MOVE_IIF_I(bit, t, f)
|
||||
#define BOOST_MOVE_IIF_I(bit, t, f) BOOST_MOVE_IIF_##bit(t, f)
|
||||
#define BOOST_MOVE_IIF_0(t, f) f
|
||||
#define BOOST_MOVE_IIF_1(t, f) t
|
||||
|
||||
/*
|
||||
#define BOOST_MOVE_IIF(bit, t, f) BOOST_MOVE_IIF_OO((bit, t, f))
|
||||
#define BOOST_MOVE_IIF_OO(par) BOOST_MOVE_IIF_I ## par
|
||||
#define BOOST_MOVE_IIF_I(bit, t, f) BOOST_MOVE_IIF_II(BOOST_MOVE_IIF_ ## bit(t, f))
|
||||
#define BOOST_MOVE_IIF_II(id) id
|
||||
#define BOOST_MOVE_IIF_0(t, f) f
|
||||
#define BOOST_MOVE_IIF_1(t, f) t
|
||||
*/
|
||||
|
||||
//BOOST_MOVE_COLON
|
||||
#define BOOST_MOVE_COLON0
|
||||
#define BOOST_MOVE_COLON1 :
|
||||
#define BOOST_MOVE_COLON2 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON3 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON4 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON5 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON6 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON7 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON8 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON9 BOOST_MOVE_COLON1
|
||||
|
||||
//BOOST_MOVE_BITOR
|
||||
#define BOOST_MOVE_BITOR(x,y) BOOST_MOVE_BITOR_I(x,y)
|
||||
#define BOOST_MOVE_BITOR_I(x,y) BOOST_MOVE_BITOR##x##y
|
||||
#define BOOST_MOVE_BITOR00 0
|
||||
#define BOOST_MOVE_BITOR01 1
|
||||
#define BOOST_MOVE_BITOR10 1
|
||||
#define BOOST_MOVE_BITOR11 1
|
||||
|
||||
//BOOST_MOVE_OR
|
||||
#define BOOST_MOVE_OR(x, y) BOOST_MOVE_OR_I(x, y)
|
||||
#define BOOST_MOVE_OR_I(x, y) BOOST_MOVE_BITOR(BOOST_MOVE_BOOL(x), BOOST_MOVE_BOOL(y))
|
||||
|
||||
//BOOST_MOVE_BITAND
|
||||
#define BOOST_MOVE_BITAND(x,y) BOOST_MOVE_BITAND_I(x,y)
|
||||
#define BOOST_MOVE_BITAND_I(x,y) BOOST_MOVE_BITAND##x##y
|
||||
#define BOOST_MOVE_BITAND00 0
|
||||
#define BOOST_MOVE_BITAND01 0
|
||||
#define BOOST_MOVE_BITAND10 0
|
||||
#define BOOST_MOVE_BITAND11 1
|
||||
|
||||
//BOOST_MOVE_AND
|
||||
#define BOOST_MOVE_AND(x, y) BOOST_MOVE_AND_I(x, y)
|
||||
#define BOOST_MOVE_AND_I(x, y) BOOST_MOVE_BITAND(BOOST_MOVE_BOOL(x), BOOST_MOVE_BOOL(y))
|
||||
|
||||
//BOOST_MOVE_DEC
|
||||
#define BOOST_MOVE_DEC(x) BOOST_MOVE_DEC_I(x)
|
||||
#define BOOST_MOVE_DEC_I(x) BOOST_MOVE_DEC##x
|
||||
#define BOOST_MOVE_DEC1 0
|
||||
#define BOOST_MOVE_DEC2 1
|
||||
#define BOOST_MOVE_DEC3 2
|
||||
#define BOOST_MOVE_DEC4 3
|
||||
#define BOOST_MOVE_DEC5 4
|
||||
#define BOOST_MOVE_DEC6 5
|
||||
#define BOOST_MOVE_DEC7 6
|
||||
#define BOOST_MOVE_DEC8 7
|
||||
#define BOOST_MOVE_DEC9 8
|
||||
#define BOOST_MOVE_DEC10 9
|
||||
#define BOOST_MOVE_DEC11 10
|
||||
#define BOOST_MOVE_DEC12 11
|
||||
#define BOOST_MOVE_DEC13 12
|
||||
#define BOOST_MOVE_DEC14 13
|
||||
|
||||
//BOOST_MOVE_SUB
|
||||
#define BOOST_MOVE_SUB(x, y) BOOST_MOVE_SUB_I(x,y)
|
||||
#define BOOST_MOVE_SUB_I(x, y) BOOST_MOVE_SUB##y(x)
|
||||
#define BOOST_MOVE_SUB0(x) x
|
||||
#define BOOST_MOVE_SUB1(x) BOOST_MOVE_DEC(x)
|
||||
#define BOOST_MOVE_SUB2(x) BOOST_MOVE_SUB1(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB3(x) BOOST_MOVE_SUB2(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB4(x) BOOST_MOVE_SUB3(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB5(x) BOOST_MOVE_SUB4(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB6(x) BOOST_MOVE_SUB5(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB7(x) BOOST_MOVE_SUB6(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB8(x) BOOST_MOVE_SUB7(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB9(x) BOOST_MOVE_SUB8(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB10(x) BOOST_MOVE_SUB9(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB11(x) BOOST_MOVE_SUB10(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB12(x) BOOST_MOVE_SUB11(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB13(x) BOOST_MOVE_SUB12(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB14(x) BOOST_MOVE_SUB13(BOOST_MOVE_DEC(x))
|
||||
|
||||
//BOOST_MOVE_INC
|
||||
#define BOOST_MOVE_INC(x) BOOST_MOVE_INC_I(x)
|
||||
#define BOOST_MOVE_INC_I(x) BOOST_MOVE_INC##x
|
||||
#define BOOST_MOVE_INC0 1
|
||||
#define BOOST_MOVE_INC1 2
|
||||
#define BOOST_MOVE_INC2 3
|
||||
#define BOOST_MOVE_INC3 4
|
||||
#define BOOST_MOVE_INC4 5
|
||||
#define BOOST_MOVE_INC5 6
|
||||
#define BOOST_MOVE_INC6 7
|
||||
#define BOOST_MOVE_INC7 8
|
||||
#define BOOST_MOVE_INC8 9
|
||||
#define BOOST_MOVE_INC9 10
|
||||
#define BOOST_MOVE_INC10 11
|
||||
#define BOOST_MOVE_INC11 12
|
||||
#define BOOST_MOVE_INC12 13
|
||||
#define BOOST_MOVE_INC13 14
|
||||
|
||||
//BOOST_MOVE_ADD
|
||||
#define BOOST_MOVE_ADD(x, y) BOOST_MOVE_ADD_I(x,y)
|
||||
#define BOOST_MOVE_ADD_I(x, y) BOOST_MOVE_ADD##y(x)
|
||||
#define BOOST_MOVE_ADD0(x) x
|
||||
#define BOOST_MOVE_ADD1(x) BOOST_MOVE_INC(x)
|
||||
#define BOOST_MOVE_ADD2(x) BOOST_MOVE_ADD1(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD3(x) BOOST_MOVE_ADD2(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD4(x) BOOST_MOVE_ADD3(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD5(x) BOOST_MOVE_ADD4(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD6(x) BOOST_MOVE_ADD5(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD7(x) BOOST_MOVE_ADD6(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD8(x) BOOST_MOVE_ADD7(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD9(x) BOOST_MOVE_ADD8(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD10(x) BOOST_MOVE_ADD9(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD11(x) BOOST_MOVE_ADD10(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD12(x) BOOST_MOVE_ADD11(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD13(x) BOOST_MOVE_ADD12(BOOST_MOVE_INC(x))
|
||||
|
||||
//BOOST_MOVE_ITERATE_2TON
|
||||
#define BOOST_MOVE_ITERATE_2TO2(MACROFUNC) MACROFUNC(2)
|
||||
#define BOOST_MOVE_ITERATE_2TO3(MACROFUNC) BOOST_MOVE_ITERATE_2TO2(MACROFUNC) MACROFUNC(3)
|
||||
#define BOOST_MOVE_ITERATE_2TO4(MACROFUNC) BOOST_MOVE_ITERATE_2TO3(MACROFUNC) MACROFUNC(4)
|
||||
#define BOOST_MOVE_ITERATE_2TO5(MACROFUNC) BOOST_MOVE_ITERATE_2TO4(MACROFUNC) MACROFUNC(5)
|
||||
#define BOOST_MOVE_ITERATE_2TO6(MACROFUNC) BOOST_MOVE_ITERATE_2TO5(MACROFUNC) MACROFUNC(6)
|
||||
#define BOOST_MOVE_ITERATE_2TO7(MACROFUNC) BOOST_MOVE_ITERATE_2TO6(MACROFUNC) MACROFUNC(7)
|
||||
#define BOOST_MOVE_ITERATE_2TO8(MACROFUNC) BOOST_MOVE_ITERATE_2TO7(MACROFUNC) MACROFUNC(8)
|
||||
#define BOOST_MOVE_ITERATE_2TO9(MACROFUNC) BOOST_MOVE_ITERATE_2TO8(MACROFUNC) MACROFUNC(9)
|
||||
|
||||
//BOOST_MOVE_ITERATE_1TON
|
||||
#define BOOST_MOVE_ITERATE_1TO1(MACROFUNC) MACROFUNC(1)
|
||||
#define BOOST_MOVE_ITERATE_1TO2(MACROFUNC) BOOST_MOVE_ITERATE_1TO1(MACROFUNC) MACROFUNC(2)
|
||||
#define BOOST_MOVE_ITERATE_1TO3(MACROFUNC) BOOST_MOVE_ITERATE_1TO2(MACROFUNC) MACROFUNC(3)
|
||||
#define BOOST_MOVE_ITERATE_1TO4(MACROFUNC) BOOST_MOVE_ITERATE_1TO3(MACROFUNC) MACROFUNC(4)
|
||||
#define BOOST_MOVE_ITERATE_1TO5(MACROFUNC) BOOST_MOVE_ITERATE_1TO4(MACROFUNC) MACROFUNC(5)
|
||||
#define BOOST_MOVE_ITERATE_1TO6(MACROFUNC) BOOST_MOVE_ITERATE_1TO5(MACROFUNC) MACROFUNC(6)
|
||||
#define BOOST_MOVE_ITERATE_1TO7(MACROFUNC) BOOST_MOVE_ITERATE_1TO6(MACROFUNC) MACROFUNC(7)
|
||||
#define BOOST_MOVE_ITERATE_1TO8(MACROFUNC) BOOST_MOVE_ITERATE_1TO7(MACROFUNC) MACROFUNC(8)
|
||||
#define BOOST_MOVE_ITERATE_1TO9(MACROFUNC) BOOST_MOVE_ITERATE_1TO8(MACROFUNC) MACROFUNC(9)
|
||||
|
||||
//BOOST_MOVE_ITERATE_0TON
|
||||
#define BOOST_MOVE_ITERATE_0TO0(MACROFUNC) MACROFUNC(0)
|
||||
#define BOOST_MOVE_ITERATE_0TO1(MACROFUNC) BOOST_MOVE_ITERATE_0TO0(MACROFUNC) MACROFUNC(1)
|
||||
#define BOOST_MOVE_ITERATE_0TO2(MACROFUNC) BOOST_MOVE_ITERATE_0TO1(MACROFUNC) MACROFUNC(2)
|
||||
#define BOOST_MOVE_ITERATE_0TO3(MACROFUNC) BOOST_MOVE_ITERATE_0TO2(MACROFUNC) MACROFUNC(3)
|
||||
#define BOOST_MOVE_ITERATE_0TO4(MACROFUNC) BOOST_MOVE_ITERATE_0TO3(MACROFUNC) MACROFUNC(4)
|
||||
#define BOOST_MOVE_ITERATE_0TO5(MACROFUNC) BOOST_MOVE_ITERATE_0TO4(MACROFUNC) MACROFUNC(5)
|
||||
#define BOOST_MOVE_ITERATE_0TO6(MACROFUNC) BOOST_MOVE_ITERATE_0TO5(MACROFUNC) MACROFUNC(6)
|
||||
#define BOOST_MOVE_ITERATE_0TO7(MACROFUNC) BOOST_MOVE_ITERATE_0TO6(MACROFUNC) MACROFUNC(7)
|
||||
#define BOOST_MOVE_ITERATE_0TO8(MACROFUNC) BOOST_MOVE_ITERATE_0TO7(MACROFUNC) MACROFUNC(8)
|
||||
#define BOOST_MOVE_ITERATE_0TO9(MACROFUNC) BOOST_MOVE_ITERATE_0TO8(MACROFUNC) MACROFUNC(9)
|
||||
|
||||
//BOOST_MOVE_ITERATE_NTON
|
||||
#define BOOST_MOVE_ITERATE_1TO1(MACROFUNC) MACROFUNC(1)
|
||||
#define BOOST_MOVE_ITERATE_2TO2(MACROFUNC) MACROFUNC(2)
|
||||
#define BOOST_MOVE_ITERATE_3TO3(MACROFUNC) MACROFUNC(3)
|
||||
#define BOOST_MOVE_ITERATE_4TO4(MACROFUNC) MACROFUNC(4)
|
||||
#define BOOST_MOVE_ITERATE_5TO5(MACROFUNC) MACROFUNC(5)
|
||||
#define BOOST_MOVE_ITERATE_6TO6(MACROFUNC) MACROFUNC(6)
|
||||
#define BOOST_MOVE_ITERATE_7TO7(MACROFUNC) MACROFUNC(7)
|
||||
#define BOOST_MOVE_ITERATE_8TO8(MACROFUNC) MACROFUNC(8)
|
||||
#define BOOST_MOVE_ITERATE_9TO9(MACROFUNC) MACROFUNC(9)
|
||||
|
||||
//BOOST_MOVE_ITER2D_0TOMAX
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX0(MACROFUNC2D, M) MACROFUNC2D(M, 0)
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX1(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX0(MACROFUNC2D, M) MACROFUNC2D(M, 1)
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX2(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX1(MACROFUNC2D, M) MACROFUNC2D(M, 2)
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX3(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX2(MACROFUNC2D, M) MACROFUNC2D(M, 3)
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX4(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX3(MACROFUNC2D, M) MACROFUNC2D(M, 4)
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX5(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX4(MACROFUNC2D, M) MACROFUNC2D(M, 5)
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX6(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX5(MACROFUNC2D, M) MACROFUNC2D(M, 6)
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX7(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX6(MACROFUNC2D, M) MACROFUNC2D(M, 7)
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX8(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX7(MACROFUNC2D, M) MACROFUNC2D(M, 8)
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX9(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX8(MACROFUNC2D, M) MACROFUNC2D(M, 9)
|
||||
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX0(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 0)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX1(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX0(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 1)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX2(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX1(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 2)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX3(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX2(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 3)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX4(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX3(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 4)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX5(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX4(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 5)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX6(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX5(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 6)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX7(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX6(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 7)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX8(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX7(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 8)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX9(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX8(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 9)
|
||||
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX_I (MAX, MACROFUNC2D)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX_I(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX##MAX(MAX, MACROFUNC2D)
|
||||
|
||||
|
||||
|
||||
|
||||
//BOOST_MOVE_CAT
|
||||
#define BOOST_MOVE_CAT(a, b) BOOST_MOVE_CAT_I(a, b)
|
||||
#define BOOST_MOVE_CAT_I(a, b) a ## b
|
||||
//# define BOOST_MOVE_CAT_I(a, b) BOOST_MOVE_CAT_II(~, a ## b)
|
||||
//# define BOOST_MOVE_CAT_II(p, res) res
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_FWD_MACROS_HPP
|
||||
@@ -0,0 +1,44 @@
|
||||
// Copyright Neil Groves 2009. Use, modification and
|
||||
// distribution is subject to the Boost Software License, Version
|
||||
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
//
|
||||
// For more information, see http://www.boost.org/libs/range/
|
||||
//
|
||||
#ifndef BOOST_RANGE_ALGORITHM_ROTATE_COPY_HPP_INCLUDED
|
||||
#define BOOST_RANGE_ALGORITHM_ROTATE_COPY_HPP_INCLUDED
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/range/concepts.hpp>
|
||||
#include <boost/range/iterator.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace range
|
||||
{
|
||||
|
||||
/// \brief template function rotate
|
||||
///
|
||||
/// range-based version of the rotate std algorithm
|
||||
///
|
||||
/// \pre Rng meets the requirements for a Forward range
|
||||
template<typename ForwardRange, typename OutputIterator>
|
||||
inline OutputIterator rotate_copy(
|
||||
const ForwardRange& rng,
|
||||
BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type middle,
|
||||
OutputIterator target
|
||||
)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
|
||||
return std::rotate_copy(boost::begin(rng), middle, boost::end(rng), target);
|
||||
}
|
||||
|
||||
} // namespace range
|
||||
using range::rotate_copy;
|
||||
} // namespace boost
|
||||
|
||||
#endif // include guard
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
[auto_generated]
|
||||
boost/numeric/odeint/external/vexcl/vexcl_algebra_dispatcher.hpp
|
||||
|
||||
[begin_description]
|
||||
algebra_dispatcher specialization for vexcl
|
||||
[end_description]
|
||||
|
||||
Copyright 2013 Karsten Ahnert
|
||||
Copyright 2013 Mario Mulansky
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or
|
||||
copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_ALGEBRA_DISPATCHER_HPP_DEFINED
|
||||
#define BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_ALGEBRA_DISPATCHER_HPP_DEFINED
|
||||
|
||||
#include <vexcl/vector.hpp>
|
||||
#include <vexcl/multivector.hpp>
|
||||
|
||||
#include <boost/numeric/odeint/algebra/vector_space_algebra.hpp>
|
||||
#include <boost/numeric/odeint/algebra/algebra_dispatcher.hpp>
|
||||
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
|
||||
// specialization for vexcl vector
|
||||
template< typename T >
|
||||
struct algebra_dispatcher< vex::vector< T > >
|
||||
{
|
||||
typedef vector_space_algebra algebra_type;
|
||||
};
|
||||
|
||||
// specialization for vexcl multivector
|
||||
template< typename T , size_t N >
|
||||
struct algebra_dispatcher< vex::multivector< T , N > >
|
||||
{
|
||||
typedef vector_space_algebra algebra_type;
|
||||
};
|
||||
|
||||
} // namespace odeint
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif // BOOST_NUMERIC_ODEINT_EXTERNAL_VEXCL_VEXCL_ALGEBRA_DISPATCHER_HPP_DEFINED
|
||||
@@ -0,0 +1,984 @@
|
||||
#ifndef BOOST_RANGE_MFC_HPP
|
||||
#define BOOST_RANGE_MFC_HPP
|
||||
|
||||
|
||||
|
||||
|
||||
// Boost.Range MFC Extension
|
||||
//
|
||||
// Copyright Shunsuke Sogame 2005-2006.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
|
||||
|
||||
// config
|
||||
//
|
||||
|
||||
|
||||
#include <afx.h> // _MFC_VER
|
||||
|
||||
|
||||
#if !defined(BOOST_RANGE_MFC_NO_CPAIR)
|
||||
#if (_MFC_VER < 0x0700) // dubious
|
||||
#define BOOST_RANGE_MFC_NO_CPAIR
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(BOOST_RANGE_MFC_HAS_LEGACY_STRING)
|
||||
#if (_MFC_VER < 0x0700) // dubious
|
||||
#define BOOST_RANGE_MFC_HAS_LEGACY_STRING
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// A const collection of old MFC doesn't return const reference.
|
||||
//
|
||||
#if !defined(BOOST_RANGE_MFC_CONST_COL_RETURNS_NON_REF)
|
||||
#if (_MFC_VER < 0x0700) // dubious
|
||||
#define BOOST_RANGE_MFC_CONST_COL_RETURNS_NON_REF
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
// forward declarations
|
||||
//
|
||||
|
||||
|
||||
template< class Type, class ArgType >
|
||||
class CArray;
|
||||
|
||||
template< class Type, class ArgType >
|
||||
class CList;
|
||||
|
||||
template< class Key, class ArgKey, class Mapped, class ArgMapped >
|
||||
class CMap;
|
||||
|
||||
template< class BaseClass, class PtrType >
|
||||
class CTypedPtrArray;
|
||||
|
||||
template< class BaseClass, class PtrType >
|
||||
class CTypedPtrList;
|
||||
|
||||
template< class BaseClass, class KeyPtrType, class MappedPtrType >
|
||||
class CTypedPtrMap;
|
||||
|
||||
|
||||
|
||||
|
||||
// extended customizations
|
||||
//
|
||||
|
||||
|
||||
#include <cstddef> // ptrdiff_t
|
||||
#include <utility> // pair
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/range/atl.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/const_iterator.hpp>
|
||||
#include <boost/range/detail/microsoft.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/iterator/iterator_adaptor.hpp>
|
||||
#include <boost/iterator/iterator_categories.hpp>
|
||||
#include <boost/iterator/iterator_facade.hpp>
|
||||
#include <boost/iterator/transform_iterator.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/remove_pointer.hpp>
|
||||
#include <boost/utility/addressof.hpp>
|
||||
#include <afx.h> // legacy CString
|
||||
#include <afxcoll.h> // CXXXArray, CXXXList, CMapXXXToXXX
|
||||
#include <tchar.h>
|
||||
|
||||
|
||||
namespace boost { namespace range_detail_microsoft {
|
||||
|
||||
|
||||
// mfc_ptr_array_iterator
|
||||
//
|
||||
// 'void **' is not convertible to 'void const **',
|
||||
// so we define...
|
||||
//
|
||||
|
||||
template< class ArrayT, class PtrType >
|
||||
struct mfc_ptr_array_iterator;
|
||||
|
||||
template< class ArrayT, class PtrType >
|
||||
struct mfc_ptr_array_iterator_super
|
||||
{
|
||||
typedef iterator_adaptor<
|
||||
mfc_ptr_array_iterator<ArrayT, PtrType>,
|
||||
std::ptrdiff_t, // Base!
|
||||
PtrType, // Value
|
||||
random_access_traversal_tag,
|
||||
use_default,
|
||||
std::ptrdiff_t // Difference
|
||||
> type;
|
||||
};
|
||||
|
||||
template< class ArrayT, class PtrType >
|
||||
struct mfc_ptr_array_iterator :
|
||||
mfc_ptr_array_iterator_super<ArrayT, PtrType>::type
|
||||
{
|
||||
private:
|
||||
typedef mfc_ptr_array_iterator self_t;
|
||||
typedef typename mfc_ptr_array_iterator_super<ArrayT, PtrType>::type super_t;
|
||||
typedef typename super_t::reference ref_t;
|
||||
|
||||
public:
|
||||
explicit mfc_ptr_array_iterator()
|
||||
{ }
|
||||
|
||||
explicit mfc_ptr_array_iterator(ArrayT& arr, INT_PTR index) :
|
||||
super_t(index), m_parr(boost::addressof(arr))
|
||||
{ }
|
||||
|
||||
template< class, class > friend struct mfc_ptr_array_iterator;
|
||||
template< class ArrayT_, class PtrType_ >
|
||||
mfc_ptr_array_iterator(mfc_ptr_array_iterator<ArrayT_, PtrType_> const& other) :
|
||||
super_t(other.base()), m_parr(other.m_parr)
|
||||
{ }
|
||||
|
||||
private:
|
||||
ArrayT *m_parr;
|
||||
|
||||
friend class iterator_core_access;
|
||||
ref_t dereference() const
|
||||
{
|
||||
BOOST_ASSERT(0 <= this->base() && this->base() < m_parr->GetSize() && "out of range");
|
||||
return *( m_parr->GetData() + this->base() );
|
||||
}
|
||||
|
||||
bool equal(self_t const& other) const
|
||||
{
|
||||
BOOST_ASSERT(m_parr == other.m_parr && "iterators incompatible");
|
||||
return this->base() == other.base();
|
||||
}
|
||||
};
|
||||
|
||||
struct mfc_ptr_array_functions
|
||||
{
|
||||
template< class Iterator, class X >
|
||||
Iterator begin(X& x)
|
||||
{
|
||||
return Iterator(x, 0);
|
||||
}
|
||||
|
||||
template< class Iterator, class X >
|
||||
Iterator end(X& x)
|
||||
{
|
||||
return Iterator(x, x.GetSize());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// arrays
|
||||
//
|
||||
|
||||
template< >
|
||||
struct customization< ::CByteArray > :
|
||||
array_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef BYTE val_t;
|
||||
|
||||
typedef val_t *mutable_iterator;
|
||||
typedef val_t const *const_iterator;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template< >
|
||||
struct customization< ::CDWordArray > :
|
||||
array_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef DWORD val_t;
|
||||
|
||||
typedef val_t *mutable_iterator;
|
||||
typedef val_t const *const_iterator;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template< >
|
||||
struct customization< ::CObArray > :
|
||||
mfc_ptr_array_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef mfc_ptr_array_iterator<X, CObject *> mutable_iterator;
|
||||
typedef mfc_ptr_array_iterator<X const, CObject const *> const_iterator;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template< >
|
||||
struct customization< ::CPtrArray > :
|
||||
mfc_ptr_array_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef mfc_ptr_array_iterator<X, void *> mutable_iterator;
|
||||
typedef mfc_ptr_array_iterator<X const, void const *> const_iterator;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template< >
|
||||
struct customization< ::CStringArray > :
|
||||
array_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef ::CString val_t;
|
||||
|
||||
typedef val_t *mutable_iterator;
|
||||
typedef val_t const *const_iterator;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template< >
|
||||
struct customization< ::CUIntArray > :
|
||||
array_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef UINT val_t;
|
||||
|
||||
typedef val_t *mutable_iterator;
|
||||
typedef val_t const *const_iterator;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template< >
|
||||
struct customization< ::CWordArray > :
|
||||
array_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef WORD val_t;
|
||||
|
||||
typedef val_t *mutable_iterator;
|
||||
typedef val_t const *const_iterator;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// lists
|
||||
//
|
||||
|
||||
template< >
|
||||
struct customization< ::CObList > :
|
||||
list_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef list_iterator<X, ::CObject *> mutable_iterator;
|
||||
#if !defined(BOOST_RANGE_MFC_CONST_COL_RETURNS_NON_REF)
|
||||
typedef list_iterator<X const, ::CObject const *> const_iterator;
|
||||
#else
|
||||
typedef list_iterator<X const, ::CObject const * const, ::CObject const * const> const_iterator;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template< >
|
||||
struct customization< ::CPtrList > :
|
||||
list_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef list_iterator<X, void *> mutable_iterator;
|
||||
#if !defined(BOOST_RANGE_MFC_CONST_COL_RETURNS_NON_REF)
|
||||
typedef list_iterator<X const, void const *> const_iterator;
|
||||
#else
|
||||
typedef list_iterator<X const, void const * const, void const * const> const_iterator;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template< >
|
||||
struct customization< ::CStringList > :
|
||||
list_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef ::CString val_t;
|
||||
|
||||
typedef list_iterator<X, val_t> mutable_iterator;
|
||||
#if !defined(BOOST_RANGE_MFC_CONST_COL_RETURNS_NON_REF)
|
||||
typedef list_iterator<X const, val_t const> const_iterator;
|
||||
#else
|
||||
typedef list_iterator<X const, val_t const, val_t const> const_iterator;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// mfc_map_iterator
|
||||
//
|
||||
|
||||
template< class MapT, class KeyT, class MappedT >
|
||||
struct mfc_map_iterator;
|
||||
|
||||
template< class MapT, class KeyT, class MappedT >
|
||||
struct mfc_map_iterator_super
|
||||
{
|
||||
typedef iterator_facade<
|
||||
mfc_map_iterator<MapT, KeyT, MappedT>,
|
||||
std::pair<KeyT, MappedT>,
|
||||
forward_traversal_tag,
|
||||
std::pair<KeyT, MappedT> const
|
||||
> type;
|
||||
};
|
||||
|
||||
template< class MapT, class KeyT, class MappedT >
|
||||
struct mfc_map_iterator :
|
||||
mfc_map_iterator_super<MapT, KeyT, MappedT>::type
|
||||
{
|
||||
private:
|
||||
typedef mfc_map_iterator self_t;
|
||||
typedef typename mfc_map_iterator_super<MapT, KeyT, MappedT>::type super_t;
|
||||
typedef typename super_t::reference ref_t;
|
||||
|
||||
public:
|
||||
explicit mfc_map_iterator()
|
||||
{ }
|
||||
|
||||
explicit mfc_map_iterator(MapT const& map, POSITION pos) :
|
||||
m_pmap(boost::addressof(map)), m_posNext(pos)
|
||||
{
|
||||
increment();
|
||||
}
|
||||
|
||||
explicit mfc_map_iterator(MapT const& map) :
|
||||
m_pmap(&map), m_pos(0) // end iterator
|
||||
{ }
|
||||
|
||||
template< class, class, class > friend struct mfc_map_iterator;
|
||||
template< class MapT_, class KeyT_, class MappedT_>
|
||||
mfc_map_iterator(mfc_map_iterator<MapT_, KeyT_, MappedT_> const& other) :
|
||||
m_pmap(other.m_pmap),
|
||||
m_pos(other.m_pos), m_posNext(other.m_posNext),
|
||||
m_key(other.m_key), m_mapped(other.m_mapped)
|
||||
{ }
|
||||
|
||||
private:
|
||||
MapT const *m_pmap;
|
||||
POSITION m_pos, m_posNext;
|
||||
KeyT m_key; MappedT m_mapped;
|
||||
|
||||
friend class iterator_core_access;
|
||||
ref_t dereference() const
|
||||
{
|
||||
BOOST_ASSERT(m_pos != 0 && "out of range");
|
||||
return std::make_pair(m_key, m_mapped);
|
||||
}
|
||||
|
||||
void increment()
|
||||
{
|
||||
BOOST_ASSERT(m_pos != 0 && "out of range");
|
||||
|
||||
if (m_posNext == 0) {
|
||||
m_pos = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
m_pos = m_posNext;
|
||||
m_pmap->GetNextAssoc(m_posNext, m_key, m_mapped);
|
||||
}
|
||||
|
||||
bool equal(self_t const& other) const
|
||||
{
|
||||
BOOST_ASSERT(m_pmap == other.m_pmap && "iterators incompatible");
|
||||
return m_pos == other.m_pos;
|
||||
}
|
||||
};
|
||||
|
||||
struct mfc_map_functions
|
||||
{
|
||||
template< class Iterator, class X >
|
||||
Iterator begin(X& x)
|
||||
{
|
||||
return Iterator(x, x.GetStartPosition());
|
||||
}
|
||||
|
||||
template< class Iterator, class X >
|
||||
Iterator end(X& x)
|
||||
{
|
||||
return Iterator(x);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#if !defined(BOOST_RANGE_MFC_NO_CPAIR)
|
||||
|
||||
|
||||
// mfc_cpair_map_iterator
|
||||
//
|
||||
// used by ::CMap and ::CMapStringToString
|
||||
//
|
||||
|
||||
template< class MapT, class PairT >
|
||||
struct mfc_cpair_map_iterator;
|
||||
|
||||
template< class MapT, class PairT >
|
||||
struct mfc_pget_map_iterator_super
|
||||
{
|
||||
typedef iterator_facade<
|
||||
mfc_cpair_map_iterator<MapT, PairT>,
|
||||
PairT,
|
||||
forward_traversal_tag
|
||||
> type;
|
||||
};
|
||||
|
||||
template< class MapT, class PairT >
|
||||
struct mfc_cpair_map_iterator :
|
||||
mfc_pget_map_iterator_super<MapT, PairT>::type
|
||||
{
|
||||
private:
|
||||
typedef mfc_cpair_map_iterator self_t;
|
||||
typedef typename mfc_pget_map_iterator_super<MapT, PairT>::type super_t;
|
||||
typedef typename super_t::reference ref_t;
|
||||
|
||||
public:
|
||||
explicit mfc_cpair_map_iterator()
|
||||
{ }
|
||||
|
||||
explicit mfc_cpair_map_iterator(MapT& map, PairT *pp) :
|
||||
m_pmap(boost::addressof(map)), m_pp(pp)
|
||||
{ }
|
||||
|
||||
template< class, class > friend struct mfc_cpair_map_iterator;
|
||||
template< class MapT_, class PairT_>
|
||||
mfc_cpair_map_iterator(mfc_cpair_map_iterator<MapT_, PairT_> const& other) :
|
||||
m_pmap(other.m_pmap), m_pp(other.m_pp)
|
||||
{ }
|
||||
|
||||
private:
|
||||
MapT *m_pmap;
|
||||
PairT *m_pp;
|
||||
|
||||
friend class iterator_core_access;
|
||||
ref_t dereference() const
|
||||
{
|
||||
BOOST_ASSERT(m_pp != 0 && "out of range");
|
||||
return *m_pp;
|
||||
}
|
||||
|
||||
void increment()
|
||||
{
|
||||
BOOST_ASSERT(m_pp != 0 && "out of range");
|
||||
m_pp = m_pmap->PGetNextAssoc(m_pp);
|
||||
}
|
||||
|
||||
bool equal(self_t const& other) const
|
||||
{
|
||||
BOOST_ASSERT(m_pmap == other.m_pmap && "iterators incompatible");
|
||||
return m_pp == other.m_pp;
|
||||
}
|
||||
};
|
||||
|
||||
struct mfc_cpair_map_functions
|
||||
{
|
||||
template< class Iterator, class X >
|
||||
Iterator begin(X& x)
|
||||
{
|
||||
// Workaround:
|
||||
// Assertion fails if empty.
|
||||
// MFC document is wrong.
|
||||
#if !defined(NDEBUG)
|
||||
if (x.GetCount() == 0)
|
||||
return Iterator(x, 0);
|
||||
#endif
|
||||
|
||||
return Iterator(x, x.PGetFirstAssoc());
|
||||
}
|
||||
|
||||
template< class Iterator, class X >
|
||||
Iterator end(X& x)
|
||||
{
|
||||
return Iterator(x, 0);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif // !defined(BOOST_RANGE_MFC_NO_CPAIR)
|
||||
|
||||
|
||||
// maps
|
||||
//
|
||||
|
||||
template< >
|
||||
struct customization< ::CMapPtrToWord > :
|
||||
mfc_map_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef void *key_t;
|
||||
typedef WORD mapped_t;
|
||||
|
||||
typedef mfc_map_iterator<X, key_t, mapped_t> mutable_iterator;
|
||||
typedef mutable_iterator const_iterator;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template< >
|
||||
struct customization< ::CMapPtrToPtr > :
|
||||
mfc_map_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef void *key_t;
|
||||
typedef void *mapped_t;
|
||||
|
||||
typedef mfc_map_iterator<X, key_t, mapped_t> mutable_iterator;
|
||||
typedef mutable_iterator const_iterator;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template< >
|
||||
struct customization< ::CMapStringToOb > :
|
||||
mfc_map_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef ::CString key_t;
|
||||
typedef ::CObject *mapped_t;
|
||||
|
||||
typedef mfc_map_iterator<X, key_t, mapped_t> mutable_iterator;
|
||||
typedef mutable_iterator const_iterator;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template< >
|
||||
struct customization< ::CMapStringToPtr > :
|
||||
mfc_map_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef ::CString key_t;
|
||||
typedef void *mapped_t;
|
||||
|
||||
typedef mfc_map_iterator<X, key_t, mapped_t> mutable_iterator;
|
||||
typedef mutable_iterator const_iterator;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template< >
|
||||
struct customization< ::CMapStringToString > :
|
||||
#if !defined(BOOST_RANGE_MFC_NO_CPAIR)
|
||||
mfc_cpair_map_functions
|
||||
#else
|
||||
mfc_map_functions
|
||||
#endif
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
#if !defined(BOOST_RANGE_MFC_NO_CPAIR)
|
||||
typedef typename X::CPair pair_t;
|
||||
|
||||
typedef mfc_cpair_map_iterator<X, pair_t> mutable_iterator;
|
||||
typedef mfc_cpair_map_iterator<X const, pair_t const> const_iterator;
|
||||
#else
|
||||
typedef ::CString key_t;
|
||||
typedef ::CString mapped_t;
|
||||
|
||||
typedef mfc_map_iterator<X, key_t, mapped_t> mutable_iterator;
|
||||
typedef mutable_iterator const_iterator;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template< >
|
||||
struct customization< ::CMapWordToOb > :
|
||||
mfc_map_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef WORD key_t;
|
||||
typedef ::CObject *mapped_t;
|
||||
|
||||
typedef mfc_map_iterator<X, key_t, mapped_t> mutable_iterator;
|
||||
typedef mutable_iterator const_iterator;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template< >
|
||||
struct customization< ::CMapWordToPtr > :
|
||||
mfc_map_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef WORD key_t;
|
||||
typedef void *mapped_t;
|
||||
|
||||
typedef mfc_map_iterator<X, key_t, mapped_t> mutable_iterator;
|
||||
typedef mutable_iterator const_iterator;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// templates
|
||||
//
|
||||
|
||||
template< class Type, class ArgType >
|
||||
struct customization< ::CArray<Type, ArgType> > :
|
||||
array_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef Type val_t;
|
||||
|
||||
typedef val_t *mutable_iterator;
|
||||
typedef val_t const *const_iterator;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template< class Type, class ArgType >
|
||||
struct customization< ::CList<Type, ArgType> > :
|
||||
list_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef Type val_t;
|
||||
|
||||
typedef list_iterator<X, val_t> mutable_iterator;
|
||||
#if !defined(BOOST_RANGE_MFC_CONST_COL_RETURNS_NON_REF)
|
||||
typedef list_iterator<X const, val_t const> const_iterator;
|
||||
#else
|
||||
typedef list_iterator<X const, val_t const, val_t const> const_iterator;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template< class Key, class ArgKey, class Mapped, class ArgMapped >
|
||||
struct customization< ::CMap<Key, ArgKey, Mapped, ArgMapped> > :
|
||||
#if !defined(BOOST_RANGE_MFC_NO_CPAIR)
|
||||
mfc_cpair_map_functions
|
||||
#else
|
||||
mfc_map_functions
|
||||
#endif
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
#if !defined(BOOST_RANGE_MFC_NO_CPAIR)
|
||||
typedef typename X::CPair pair_t;
|
||||
|
||||
typedef mfc_cpair_map_iterator<X, pair_t> mutable_iterator;
|
||||
typedef mfc_cpair_map_iterator<X const, pair_t const> const_iterator;
|
||||
#else
|
||||
typedef Key key_t;
|
||||
typedef Mapped mapped_t;
|
||||
|
||||
typedef mfc_map_iterator<X, key_t, mapped_t> mutable_iterator;
|
||||
typedef mutable_iterator const_iterator;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template< class BaseClass, class PtrType >
|
||||
struct customization< ::CTypedPtrArray<BaseClass, PtrType> >
|
||||
{
|
||||
template< class X >
|
||||
struct fun
|
||||
{
|
||||
typedef typename remove_pointer<PtrType>::type val_t;
|
||||
|
||||
typedef typename mpl::if_< is_const<X>,
|
||||
val_t const,
|
||||
val_t
|
||||
>::type val_t_;
|
||||
|
||||
typedef val_t_ * const result_type;
|
||||
|
||||
template< class PtrType_ >
|
||||
result_type operator()(PtrType_ p) const
|
||||
{
|
||||
return static_cast<result_type>(p);
|
||||
}
|
||||
};
|
||||
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef typename compatible_mutable_iterator<BaseClass>::type miter_t;
|
||||
typedef typename range_const_iterator<BaseClass>::type citer_t;
|
||||
|
||||
typedef transform_iterator<fun<X>, miter_t> mutable_iterator;
|
||||
typedef transform_iterator<fun<X const>, citer_t> const_iterator;
|
||||
};
|
||||
|
||||
template< class Iterator, class X >
|
||||
Iterator begin(X& x)
|
||||
{
|
||||
return Iterator(boost::begin<BaseClass>(x), fun<X>());
|
||||
}
|
||||
|
||||
template< class Iterator, class X >
|
||||
Iterator end(X& x)
|
||||
{
|
||||
return Iterator(boost::end<BaseClass>(x), fun<X>());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template< class BaseClass, class PtrType >
|
||||
struct customization< ::CTypedPtrList<BaseClass, PtrType> > :
|
||||
list_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef typename remove_pointer<PtrType>::type val_t;
|
||||
|
||||
// not l-value
|
||||
typedef list_iterator<X, val_t * const, val_t * const> mutable_iterator;
|
||||
typedef list_iterator<X const, val_t const * const, val_t const * const> const_iterator;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template< class BaseClass, class KeyPtrType, class MappedPtrType >
|
||||
struct customization< ::CTypedPtrMap<BaseClass, KeyPtrType, MappedPtrType> > :
|
||||
mfc_map_functions
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
typedef mfc_map_iterator<X, KeyPtrType, MappedPtrType> mutable_iterator;
|
||||
typedef mutable_iterator const_iterator;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// strings
|
||||
//
|
||||
|
||||
#if defined(BOOST_RANGE_MFC_HAS_LEGACY_STRING)
|
||||
|
||||
template< >
|
||||
struct customization< ::CString >
|
||||
{
|
||||
template< class X >
|
||||
struct meta
|
||||
{
|
||||
// LPTSTR/LPCTSTR is not always defined in <tchar.h>.
|
||||
typedef TCHAR *mutable_iterator;
|
||||
typedef TCHAR const *const_iterator;
|
||||
};
|
||||
|
||||
template< class Iterator, class X >
|
||||
typename mutable_<Iterator, X>::type begin(X& x)
|
||||
{
|
||||
return x.GetBuffer(0);
|
||||
}
|
||||
|
||||
template< class Iterator, class X >
|
||||
Iterator begin(X const& x)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
template< class Iterator, class X >
|
||||
Iterator end(X& x)
|
||||
{
|
||||
return begin<Iterator>(x) + x.GetLength();
|
||||
}
|
||||
};
|
||||
|
||||
#endif // defined(BOOST_RANGE_MFC_HAS_LEGACY_STRING)
|
||||
|
||||
|
||||
} } // namespace boost::range_detail_microsoft
|
||||
|
||||
|
||||
|
||||
|
||||
// range customizations
|
||||
//
|
||||
|
||||
|
||||
// arrays
|
||||
//
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CByteArray
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CDWordArray
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CStringArray
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CUIntArray
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CWordArray
|
||||
)
|
||||
|
||||
|
||||
// lists
|
||||
//
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CObList
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CPtrList
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CStringList
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CObArray
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CPtrArray
|
||||
)
|
||||
|
||||
|
||||
// maps
|
||||
//
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CMapPtrToWord
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CMapPtrToPtr
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CMapStringToOb
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CMapStringToPtr
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CMapStringToString
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CMapWordToOb
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CMapWordToPtr
|
||||
)
|
||||
|
||||
|
||||
// templates
|
||||
//
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CArray, 2
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CList, 2
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CMap, 4
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CTypedPtrArray, 2
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CTypedPtrList, 2
|
||||
)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CTypedPtrMap, 3
|
||||
)
|
||||
|
||||
|
||||
// strings
|
||||
//
|
||||
#if defined(BOOST_RANGE_MFC_HAS_LEGACY_STRING)
|
||||
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(
|
||||
boost::range_detail_microsoft::using_type_as_tag,
|
||||
BOOST_PP_NIL, CString
|
||||
)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,54 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_PLUS_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_PLUS_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_plus
|
||||
#define BOOST_TT_TRAIT_OP +
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
(\
|
||||
/* Lhs==pointer and Rhs==pointer */\
|
||||
(\
|
||||
::boost::is_pointer< Lhs_noref >::value && \
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
) || \
|
||||
/* Lhs==void* and Rhs==fundamental */\
|
||||
(\
|
||||
::boost::is_pointer< Lhs_noref >::value && \
|
||||
::boost::is_void< Lhs_noptr >::value && \
|
||||
::boost::is_fundamental< Rhs_nocv >::value\
|
||||
) || \
|
||||
/* Rhs==void* and Lhs==fundamental */\
|
||||
(\
|
||||
::boost::is_pointer< Rhs_noref >::value && \
|
||||
::boost::is_void< Rhs_noptr >::value && \
|
||||
::boost::is_fundamental< Lhs_nocv >::value\
|
||||
) || \
|
||||
/* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\
|
||||
(\
|
||||
::boost::is_pointer< Lhs_noref >::value && \
|
||||
::boost::is_fundamental< Rhs_nocv >::value && \
|
||||
(! ::boost::is_integral< Rhs_noref >::value )\
|
||||
) || \
|
||||
/* Rhs==pointer and Lhs==fundamental and Lhs!=integral */\
|
||||
(\
|
||||
::boost::is_pointer< Rhs_noref >::value && \
|
||||
::boost::is_fundamental< Lhs_nocv >::value && \
|
||||
(! ::boost::is_integral< Lhs_noref >::value )\
|
||||
)\
|
||||
)
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,37 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2013.
|
||||
# * Distributed under the Boost Software License, Version 1.0. (See
|
||||
# * accompanying file LICENSE_1_0.txt or copy at
|
||||
# * http://www.boost.org/LICENSE_1_0.txt)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_TUPLE_REPLACE_HPP
|
||||
# define BOOST_PREPROCESSOR_TUPLE_REPLACE_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
#
|
||||
# include <boost/preprocessor/array/replace.hpp>
|
||||
# include <boost/preprocessor/array/to_tuple.hpp>
|
||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_REPLACE */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_REPLACE(tuple, i, elem) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_REPLACE(BOOST_PP_TUPLE_TO_ARRAY(tuple), i, elem)) \
|
||||
/**/
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_REPLACE_D */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_REPLACE_D(d, tuple, i, elem) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_REPLACE_D(d, BOOST_PP_TUPLE_TO_ARRAY(tuple), i, elem)) \
|
||||
/**/
|
||||
#
|
||||
# endif // BOOST_PP_VARIADICS
|
||||
#
|
||||
# endif // BOOST_PREPROCESSOR_TUPLE_REPLACE_HPP
|
||||
@@ -0,0 +1,151 @@
|
||||
GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification follow.
|
||||
|
||||
TERMS AND CONDITIONS 0. Definitions. “This License” refers to version 3 of the GNU General Public License.
|
||||
|
||||
“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
|
||||
|
||||
“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
|
||||
|
||||
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
|
||||
|
||||
A “covered work” means either the unmodified Program or a work based on the Program.
|
||||
|
||||
To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
|
||||
|
||||
To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code. The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
|
||||
|
||||
A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
|
||||
|
||||
The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same work.
|
||||
|
||||
2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
|
||||
|
||||
A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
|
||||
|
||||
“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms. “Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
|
||||
|
||||
8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
|
||||
|
||||
An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents. A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
|
||||
|
||||
A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
|
||||
|
||||
A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
|
||||
|
||||
14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
|
||||
|
||||
15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
---------------------------
|
||||
@@ -0,0 +1,16 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct void_;
|
||||
template <
|
||||
typename T0 = void_ , typename T1 = void_ , typename T2 = void_ , typename T3 = void_ , typename T4 = void_ , typename T5 = void_ , typename T6 = void_ , typename T7 = void_ , typename T8 = void_ , typename T9 = void_ , typename T10 = void_ , typename T11 = void_ , typename T12 = void_ , typename T13 = void_ , typename T14 = void_ , typename T15 = void_ , typename T16 = void_ , typename T17 = void_ , typename T18 = void_ , typename T19 = void_ , typename T20 = void_ , typename T21 = void_ , typename T22 = void_ , typename T23 = void_ , typename T24 = void_ , typename T25 = void_ , typename T26 = void_ , typename T27 = void_ , typename T28 = void_ , typename T29 = void_
|
||||
>
|
||||
struct list;
|
||||
}}
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
Creating sparse matrix.
|
||||
Converting from sparse to dense.
|
||||
Converting back to dense again.
|
||||
Testing for equality of two sparse matrices: OK.
|
||||
Converting to dense once again.
|
||||
Testing for equality of two dense matrices: OK.
|
||||
|
||||
DONE WITH TESTS.
|
||||
@@ -0,0 +1,391 @@
|
||||
// Copyright John Maddock 2010.
|
||||
// Copyright Paul A. Bristow 2010.
|
||||
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt
|
||||
// or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MATH_DISTRIBUTIONS_INVERSE_CHI_SQUARED_HPP
|
||||
#define BOOST_MATH_DISTRIBUTIONS_INVERSE_CHI_SQUARED_HPP
|
||||
|
||||
#include <boost/math/distributions/fwd.hpp>
|
||||
#include <boost/math/special_functions/gamma.hpp> // for incomplete beta.
|
||||
#include <boost/math/distributions/complement.hpp> // for complements.
|
||||
#include <boost/math/distributions/detail/common_error_handling.hpp> // for error checks.
|
||||
#include <boost/math/special_functions/fpclassify.hpp> // for isfinite
|
||||
|
||||
// See http://en.wikipedia.org/wiki/Scaled-inverse-chi-square_distribution
|
||||
// for definitions of this scaled version.
|
||||
// See http://en.wikipedia.org/wiki/Inverse-chi-square_distribution
|
||||
// for unscaled version.
|
||||
|
||||
// http://reference.wolfram.com/mathematica/ref/InverseChiSquareDistribution.html
|
||||
// Weisstein, Eric W. "Inverse Chi-Squared Distribution." From MathWorld--A Wolfram Web Resource.
|
||||
// http://mathworld.wolfram.com/InverseChi-SquaredDistribution.html
|
||||
|
||||
#include <utility>
|
||||
|
||||
namespace boost{ namespace math{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <class RealType, class Policy>
|
||||
inline bool check_inverse_chi_squared( // Check both distribution parameters.
|
||||
const char* function,
|
||||
RealType degrees_of_freedom, // degrees_of_freedom (aka nu).
|
||||
RealType scale, // scale (aka sigma^2)
|
||||
RealType* result,
|
||||
const Policy& pol)
|
||||
{
|
||||
return check_scale(function, scale, result, pol)
|
||||
&& check_df(function, degrees_of_freedom,
|
||||
result, pol);
|
||||
} // bool check_inverse_chi_squared
|
||||
} // namespace detail
|
||||
|
||||
template <class RealType = double, class Policy = policies::policy<> >
|
||||
class inverse_chi_squared_distribution
|
||||
{
|
||||
public:
|
||||
typedef RealType value_type;
|
||||
typedef Policy policy_type;
|
||||
|
||||
inverse_chi_squared_distribution(RealType df, RealType l_scale) : m_df(df), m_scale (l_scale)
|
||||
{
|
||||
RealType result;
|
||||
detail::check_df(
|
||||
"boost::math::inverse_chi_squared_distribution<%1%>::inverse_chi_squared_distribution",
|
||||
m_df, &result, Policy())
|
||||
&& detail::check_scale(
|
||||
"boost::math::inverse_chi_squared_distribution<%1%>::inverse_chi_squared_distribution",
|
||||
m_scale, &result, Policy());
|
||||
} // inverse_chi_squared_distribution constructor
|
||||
|
||||
inverse_chi_squared_distribution(RealType df = 1) : m_df(df)
|
||||
{
|
||||
RealType result;
|
||||
m_scale = 1 / m_df ; // Default scale = 1 / degrees of freedom (Wikipedia definition 1).
|
||||
detail::check_df(
|
||||
"boost::math::inverse_chi_squared_distribution<%1%>::inverse_chi_squared_distribution",
|
||||
m_df, &result, Policy());
|
||||
} // inverse_chi_squared_distribution
|
||||
|
||||
RealType degrees_of_freedom()const
|
||||
{
|
||||
return m_df; // aka nu
|
||||
}
|
||||
RealType scale()const
|
||||
{
|
||||
return m_scale; // aka xi
|
||||
}
|
||||
|
||||
// Parameter estimation: NOT implemented yet.
|
||||
//static RealType find_degrees_of_freedom(
|
||||
// RealType difference_from_variance,
|
||||
// RealType alpha,
|
||||
// RealType beta,
|
||||
// RealType variance,
|
||||
// RealType hint = 100);
|
||||
|
||||
private:
|
||||
// Data members:
|
||||
RealType m_df; // degrees of freedom are treated as a real number.
|
||||
RealType m_scale; // distribution scale.
|
||||
|
||||
}; // class chi_squared_distribution
|
||||
|
||||
typedef inverse_chi_squared_distribution<double> inverse_chi_squared;
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline const std::pair<RealType, RealType> range(const inverse_chi_squared_distribution<RealType, Policy>& /*dist*/)
|
||||
{ // Range of permissible values for random variable x.
|
||||
using boost::math::tools::max_value;
|
||||
return std::pair<RealType, RealType>(static_cast<RealType>(0), max_value<RealType>()); // 0 to + infinity.
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline const std::pair<RealType, RealType> support(const inverse_chi_squared_distribution<RealType, Policy>& /*dist*/)
|
||||
{ // Range of supported values for random variable x.
|
||||
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
|
||||
return std::pair<RealType, RealType>(static_cast<RealType>(0), tools::max_value<RealType>()); // 0 to + infinity.
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
RealType pdf(const inverse_chi_squared_distribution<RealType, Policy>& dist, const RealType& x)
|
||||
{
|
||||
BOOST_MATH_STD_USING // for ADL of std functions.
|
||||
RealType df = dist.degrees_of_freedom();
|
||||
RealType scale = dist.scale();
|
||||
RealType error_result;
|
||||
|
||||
static const char* function = "boost::math::pdf(const inverse_chi_squared_distribution<%1%>&, %1%)";
|
||||
|
||||
if(false == detail::check_inverse_chi_squared
|
||||
(function, df, scale, &error_result, Policy())
|
||||
)
|
||||
{ // Bad distribution.
|
||||
return error_result;
|
||||
}
|
||||
if((x < 0) || !(boost::math::isfinite)(x))
|
||||
{ // Bad x.
|
||||
return policies::raise_domain_error<RealType>(
|
||||
function, "inverse Chi Square parameter was %1%, but must be >= 0 !", x, Policy());
|
||||
}
|
||||
|
||||
if(x == 0)
|
||||
{ // Treat as special case.
|
||||
return 0;
|
||||
}
|
||||
// Wikipedia scaled inverse chi sq (df, scale) related to inv gamma (df/2, df * scale /2)
|
||||
// so use inverse gamma pdf with shape = df/2, scale df * scale /2
|
||||
// RealType shape = df /2; // inv_gamma shape
|
||||
// RealType scale = df * scale/2; // inv_gamma scale
|
||||
// RealType result = gamma_p_derivative(shape, scale / x, Policy()) * scale / (x * x);
|
||||
RealType result = df * scale/2 / x;
|
||||
if(result < tools::min_value<RealType>())
|
||||
return 0; // Random variable is near enough infinite.
|
||||
result = gamma_p_derivative(df/2, result, Policy()) * df * scale/2;
|
||||
if(result != 0) // prevent 0 / 0, gamma_p_derivative -> 0 faster than x^2
|
||||
result /= (x * x);
|
||||
return result;
|
||||
} // pdf
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType cdf(const inverse_chi_squared_distribution<RealType, Policy>& dist, const RealType& x)
|
||||
{
|
||||
static const char* function = "boost::math::cdf(const inverse_chi_squared_distribution<%1%>&, %1%)";
|
||||
RealType df = dist.degrees_of_freedom();
|
||||
RealType scale = dist.scale();
|
||||
RealType error_result;
|
||||
|
||||
if(false ==
|
||||
detail::check_inverse_chi_squared(function, df, scale, &error_result, Policy())
|
||||
)
|
||||
{ // Bad distribution.
|
||||
return error_result;
|
||||
}
|
||||
if((x < 0) || !(boost::math::isfinite)(x))
|
||||
{ // Bad x.
|
||||
return policies::raise_domain_error<RealType>(
|
||||
function, "inverse Chi Square parameter was %1%, but must be >= 0 !", x, Policy());
|
||||
}
|
||||
if (x == 0)
|
||||
{ // Treat zero as a special case.
|
||||
return 0;
|
||||
}
|
||||
// RealType shape = df /2; // inv_gamma shape,
|
||||
// RealType scale = df * scale/2; // inv_gamma scale,
|
||||
// result = boost::math::gamma_q(shape, scale / x, Policy()); // inverse_gamma code.
|
||||
return boost::math::gamma_q(df / 2, (df * (scale / 2)) / x, Policy());
|
||||
} // cdf
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType quantile(const inverse_chi_squared_distribution<RealType, Policy>& dist, const RealType& p)
|
||||
{
|
||||
using boost::math::gamma_q_inv;
|
||||
RealType df = dist.degrees_of_freedom();
|
||||
RealType scale = dist.scale();
|
||||
|
||||
static const char* function = "boost::math::quantile(const inverse_chi_squared_distribution<%1%>&, %1%)";
|
||||
// Error check:
|
||||
RealType error_result;
|
||||
if(false == detail::check_df(
|
||||
function, df, &error_result, Policy())
|
||||
&& detail::check_probability(
|
||||
function, p, &error_result, Policy()))
|
||||
{
|
||||
return error_result;
|
||||
}
|
||||
if(false == detail::check_probability(
|
||||
function, p, &error_result, Policy()))
|
||||
{
|
||||
return error_result;
|
||||
}
|
||||
// RealType shape = df /2; // inv_gamma shape,
|
||||
// RealType scale = df * scale/2; // inv_gamma scale,
|
||||
// result = scale / gamma_q_inv(shape, p, Policy());
|
||||
RealType result = gamma_q_inv(df /2, p, Policy());
|
||||
if(result == 0)
|
||||
return policies::raise_overflow_error<RealType, Policy>(function, "Random variable is infinite.", Policy());
|
||||
result = df * (scale / 2) / result;
|
||||
return result;
|
||||
} // quantile
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType cdf(const complemented2_type<inverse_chi_squared_distribution<RealType, Policy>, RealType>& c)
|
||||
{
|
||||
using boost::math::gamma_q_inv;
|
||||
RealType const& df = c.dist.degrees_of_freedom();
|
||||
RealType const& scale = c.dist.scale();
|
||||
RealType const& x = c.param;
|
||||
static const char* function = "boost::math::cdf(const inverse_chi_squared_distribution<%1%>&, %1%)";
|
||||
// Error check:
|
||||
RealType error_result;
|
||||
if(false == detail::check_df(
|
||||
function, df, &error_result, Policy()))
|
||||
{
|
||||
return error_result;
|
||||
}
|
||||
if (x == 0)
|
||||
{ // Treat zero as a special case.
|
||||
return 1;
|
||||
}
|
||||
if((x < 0) || !(boost::math::isfinite)(x))
|
||||
{
|
||||
return policies::raise_domain_error<RealType>(
|
||||
function, "inverse Chi Square parameter was %1%, but must be > 0 !", x, Policy());
|
||||
}
|
||||
// RealType shape = df /2; // inv_gamma shape,
|
||||
// RealType scale = df * scale/2; // inv_gamma scale,
|
||||
// result = gamma_p(shape, scale/c.param, Policy()); use inv_gamma.
|
||||
|
||||
return gamma_p(df / 2, (df * scale/2) / x, Policy()); // OK
|
||||
} // cdf(complemented
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType quantile(const complemented2_type<inverse_chi_squared_distribution<RealType, Policy>, RealType>& c)
|
||||
{
|
||||
using boost::math::gamma_q_inv;
|
||||
|
||||
RealType const& df = c.dist.degrees_of_freedom();
|
||||
RealType const& scale = c.dist.scale();
|
||||
RealType const& q = c.param;
|
||||
static const char* function = "boost::math::quantile(const inverse_chi_squared_distribution<%1%>&, %1%)";
|
||||
// Error check:
|
||||
RealType error_result;
|
||||
if(false == detail::check_df(function, df, &error_result, Policy()))
|
||||
{
|
||||
return error_result;
|
||||
}
|
||||
if(false == detail::check_probability(function, q, &error_result, Policy()))
|
||||
{
|
||||
return error_result;
|
||||
}
|
||||
// RealType shape = df /2; // inv_gamma shape,
|
||||
// RealType scale = df * scale/2; // inv_gamma scale,
|
||||
// result = scale / gamma_p_inv(shape, q, Policy()); // using inv_gamma.
|
||||
RealType result = gamma_p_inv(df/2, q, Policy());
|
||||
if(result == 0)
|
||||
return policies::raise_overflow_error<RealType, Policy>(function, "Random variable is infinite.", Policy());
|
||||
result = (df * scale / 2) / result;
|
||||
return result;
|
||||
} // quantile(const complement
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType mean(const inverse_chi_squared_distribution<RealType, Policy>& dist)
|
||||
{ // Mean of inverse Chi-Squared distribution.
|
||||
RealType df = dist.degrees_of_freedom();
|
||||
RealType scale = dist.scale();
|
||||
|
||||
static const char* function = "boost::math::mean(const inverse_chi_squared_distribution<%1%>&)";
|
||||
if(df <= 2)
|
||||
return policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"inverse Chi-Squared distribution only has a mode for degrees of freedom > 2, but got degrees of freedom = %1%.",
|
||||
df, Policy());
|
||||
return (df * scale) / (df - 2);
|
||||
} // mean
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType variance(const inverse_chi_squared_distribution<RealType, Policy>& dist)
|
||||
{ // Variance of inverse Chi-Squared distribution.
|
||||
RealType df = dist.degrees_of_freedom();
|
||||
RealType scale = dist.scale();
|
||||
static const char* function = "boost::math::variance(const inverse_chi_squared_distribution<%1%>&)";
|
||||
if(df <= 4)
|
||||
{
|
||||
return policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"inverse Chi-Squared distribution only has a variance for degrees of freedom > 4, but got degrees of freedom = %1%.",
|
||||
df, Policy());
|
||||
}
|
||||
return 2 * df * df * scale * scale / ((df - 2)*(df - 2) * (df - 4));
|
||||
} // variance
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType mode(const inverse_chi_squared_distribution<RealType, Policy>& dist)
|
||||
{ // mode is not defined in Mathematica.
|
||||
// See Discussion section http://en.wikipedia.org/wiki/Talk:Scaled-inverse-chi-square_distribution
|
||||
// for origin of the formula used below.
|
||||
|
||||
RealType df = dist.degrees_of_freedom();
|
||||
RealType scale = dist.scale();
|
||||
static const char* function = "boost::math::mode(const inverse_chi_squared_distribution<%1%>&)";
|
||||
if(df < 0)
|
||||
return policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"inverse Chi-Squared distribution only has a mode for degrees of freedom >= 0, but got degrees of freedom = %1%.",
|
||||
df, Policy());
|
||||
return (df * scale) / (df + 2);
|
||||
}
|
||||
|
||||
//template <class RealType, class Policy>
|
||||
//inline RealType median(const inverse_chi_squared_distribution<RealType, Policy>& dist)
|
||||
//{ // Median is given by Quantile[dist, 1/2]
|
||||
// RealType df = dist.degrees_of_freedom();
|
||||
// if(df <= 1)
|
||||
// return tools::domain_error<RealType>(
|
||||
// BOOST_CURRENT_FUNCTION,
|
||||
// "The inverse_Chi-Squared distribution only has a median for degrees of freedom >= 0, but got degrees of freedom = %1%.",
|
||||
// df);
|
||||
// return df;
|
||||
//}
|
||||
// Now implemented via quantile(half) in derived accessors.
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType skewness(const inverse_chi_squared_distribution<RealType, Policy>& dist)
|
||||
{
|
||||
BOOST_MATH_STD_USING // For ADL
|
||||
RealType df = dist.degrees_of_freedom();
|
||||
static const char* function = "boost::math::skewness(const inverse_chi_squared_distribution<%1%>&)";
|
||||
if(df <= 6)
|
||||
return policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"inverse Chi-Squared distribution only has a skewness for degrees of freedom > 6, but got degrees of freedom = %1%.",
|
||||
df, Policy());
|
||||
|
||||
return 4 * sqrt (2 * (df - 4)) / (df - 6); // Not a function of scale.
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType kurtosis(const inverse_chi_squared_distribution<RealType, Policy>& dist)
|
||||
{
|
||||
RealType df = dist.degrees_of_freedom();
|
||||
static const char* function = "boost::math::kurtosis(const inverse_chi_squared_distribution<%1%>&)";
|
||||
if(df <= 8)
|
||||
return policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"inverse Chi-Squared distribution only has a kurtosis for degrees of freedom > 8, but got degrees of freedom = %1%.",
|
||||
df, Policy());
|
||||
|
||||
return kurtosis_excess(dist) + 3;
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType kurtosis_excess(const inverse_chi_squared_distribution<RealType, Policy>& dist)
|
||||
{
|
||||
RealType df = dist.degrees_of_freedom();
|
||||
static const char* function = "boost::math::kurtosis(const inverse_chi_squared_distribution<%1%>&)";
|
||||
if(df <= 8)
|
||||
return policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"inverse Chi-Squared distribution only has a kurtosis excess for degrees of freedom > 8, but got degrees of freedom = %1%.",
|
||||
df, Policy());
|
||||
|
||||
return 12 * (5 * df - 22) / ((df - 6 )*(df - 8)); // Not a function of scale.
|
||||
}
|
||||
|
||||
//
|
||||
// Parameter estimation comes last:
|
||||
//
|
||||
|
||||
} // namespace math
|
||||
} // namespace boost
|
||||
|
||||
// This include must be at the end, *after* the accessors
|
||||
// for this distribution have been defined, in order to
|
||||
// keep compilers that support two-phase lookup happy.
|
||||
#include <boost/math/distributions/detail/derived_accessors.hpp>
|
||||
|
||||
#endif // BOOST_MATH_DISTRIBUTIONS_INVERSE_CHI_SQUARED_HPP
|
||||
@@ -0,0 +1,13 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2007 Hartmut Kaiser
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_INCLUDE_VALUE_AT)
|
||||
#define FUSION_INCLUDE_VALUE_AT
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/value_at.hpp>
|
||||
|
||||
#endif
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Reference in New Issue
Block a user