Initial Commit
This commit is contained in:
@@ -0,0 +1,187 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2003 Joel de Guzman
|
||||
Copyright (c) 2001-2003 Daniel Nuffer
|
||||
http://spirit.sourceforge.net/
|
||||
|
||||
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_SPIRIT_CHSET_HPP
|
||||
#define BOOST_SPIRIT_CHSET_HPP
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/spirit/home/classic/namespace.hpp>
|
||||
#include <boost/spirit/home/classic/core/primitives/primitives.hpp>
|
||||
#include <boost/spirit/home/classic/utility/impl/chset/basic_chset.hpp>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
namespace boost { namespace spirit {
|
||||
|
||||
BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
|
||||
|
||||
namespace utility { namespace impl {
|
||||
|
||||
// This is here because some compilers choke on out-of-line member
|
||||
// template functions. And we don't want to put the whole algorithm
|
||||
// in the chset constructor in the class definition.
|
||||
template <typename CharT, typename CharT2>
|
||||
void construct_chset(boost::shared_ptr<basic_chset<CharT> >& ptr,
|
||||
CharT2 const* definition);
|
||||
|
||||
}} // namespace utility::impl
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// chset class
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
template <typename CharT = char>
|
||||
class chset: public char_parser<chset<CharT> > {
|
||||
|
||||
public:
|
||||
chset();
|
||||
chset(chset const& arg_);
|
||||
explicit chset(CharT arg_);
|
||||
explicit chset(anychar_parser arg_);
|
||||
explicit chset(nothing_parser arg_);
|
||||
explicit chset(chlit<CharT> const& arg_);
|
||||
explicit chset(range<CharT> const& arg_);
|
||||
explicit chset(negated_char_parser<chlit<CharT> > const& arg_);
|
||||
explicit chset(negated_char_parser<range<CharT> > const& arg_);
|
||||
|
||||
template <typename CharT2>
|
||||
explicit chset(CharT2 const* definition)
|
||||
: ptr(new basic_chset<CharT>())
|
||||
{
|
||||
utility::impl::construct_chset(ptr, definition);
|
||||
}
|
||||
~chset();
|
||||
|
||||
chset& operator=(chset const& rhs);
|
||||
chset& operator=(CharT rhs);
|
||||
chset& operator=(anychar_parser rhs);
|
||||
chset& operator=(nothing_parser rhs);
|
||||
chset& operator=(chlit<CharT> const& rhs);
|
||||
chset& operator=(range<CharT> const& rhs);
|
||||
chset& operator=(negated_char_parser<chlit<CharT> > const& rhs);
|
||||
chset& operator=(negated_char_parser<range<CharT> > const& rhs);
|
||||
|
||||
void set(range<CharT> const& arg_);
|
||||
void set(negated_char_parser<chlit<CharT> > const& arg_);
|
||||
void set(negated_char_parser<range<CharT> > const& arg_);
|
||||
|
||||
void clear(range<CharT> const& arg_);
|
||||
void clear(negated_char_parser<range<CharT> > const& arg_);
|
||||
bool test(CharT ch) const;
|
||||
chset& inverse();
|
||||
void swap(chset& x);
|
||||
|
||||
chset& operator|=(chset const& x);
|
||||
chset& operator&=(chset const& x);
|
||||
chset& operator-=(chset const& x);
|
||||
chset& operator^=(chset const& x);
|
||||
|
||||
private:
|
||||
|
||||
boost::shared_ptr<basic_chset<CharT> > ptr;
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generator functions
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
template <typename CharT>
|
||||
inline chset<CharT>
|
||||
chset_p(chlit<CharT> const& arg_)
|
||||
{ return chset<CharT>(arg_); }
|
||||
|
||||
//////////////////////////////////
|
||||
template <typename CharT>
|
||||
inline chset<CharT>
|
||||
chset_p(range<CharT> const& arg_)
|
||||
{ return chset<CharT>(arg_); }
|
||||
|
||||
template <typename CharT>
|
||||
inline chset<CharT>
|
||||
chset_p(negated_char_parser<chlit<CharT> > const& arg_)
|
||||
{ return chset<CharT>(arg_); }
|
||||
|
||||
template <typename CharT>
|
||||
inline chset<CharT>
|
||||
chset_p(negated_char_parser<range<CharT> > const& arg_)
|
||||
{ return chset<CharT>(arg_); }
|
||||
|
||||
//////////////////////////////////
|
||||
inline chset<char>
|
||||
chset_p(char const* init)
|
||||
{ return chset<char>(init); }
|
||||
|
||||
//////////////////////////////////
|
||||
inline chset<wchar_t>
|
||||
chset_p(wchar_t const* init)
|
||||
{ return chset<wchar_t>(init); }
|
||||
|
||||
//////////////////////////////////
|
||||
inline chset<char>
|
||||
chset_p(char ch)
|
||||
{ return chset<char>(ch); }
|
||||
|
||||
//////////////////////////////////
|
||||
inline chset<wchar_t>
|
||||
chset_p(wchar_t ch)
|
||||
{ return chset<wchar_t>(ch); }
|
||||
|
||||
//////////////////////////////////
|
||||
inline chset<int>
|
||||
chset_p(int ch)
|
||||
{ return chset<int>(ch); }
|
||||
|
||||
//////////////////////////////////
|
||||
inline chset<unsigned int>
|
||||
chset_p(unsigned int ch)
|
||||
{ return chset<unsigned int>(ch); }
|
||||
|
||||
//////////////////////////////////
|
||||
inline chset<short>
|
||||
chset_p(short ch)
|
||||
{ return chset<short>(ch); }
|
||||
|
||||
#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
|
||||
//////////////////////////////////
|
||||
inline chset<unsigned short>
|
||||
chset_p(unsigned short ch)
|
||||
{ return chset<unsigned short>(ch); }
|
||||
#endif
|
||||
//////////////////////////////////
|
||||
inline chset<long>
|
||||
chset_p(long ch)
|
||||
{ return chset<long>(ch); }
|
||||
|
||||
//////////////////////////////////
|
||||
inline chset<unsigned long>
|
||||
chset_p(unsigned long ch)
|
||||
{ return chset<unsigned long>(ch); }
|
||||
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
//////////////////////////////////
|
||||
inline chset< ::boost::long_long_type>
|
||||
chset_p( ::boost::long_long_type ch)
|
||||
{ return chset< ::boost::long_long_type>(ch); }
|
||||
|
||||
//////////////////////////////////
|
||||
inline chset< ::boost::ulong_long_type>
|
||||
chset_p( ::boost::ulong_long_type ch)
|
||||
{ return chset< ::boost::ulong_long_type>(ch); }
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
BOOST_SPIRIT_CLASSIC_NAMESPACE_END
|
||||
|
||||
}} // namespace BOOST_SPIRIT_CLASSIC_NS
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/spirit/home/classic/utility/impl/chset.ipp>
|
||||
#include <boost/spirit/home/classic/utility/chset_operators.hpp>
|
||||
@@ -0,0 +1,275 @@
|
||||
// (C) Copyright Jeremy Siek 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 BOOST_ITERATOR_CONCEPTS_HPP
|
||||
#define BOOST_ITERATOR_CONCEPTS_HPP
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/iterator/iterator_categories.hpp>
|
||||
|
||||
// Use boost::detail::iterator_traits to work around some MSVC/Dinkumware problems.
|
||||
#include <boost/detail/iterator.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/is_integral.hpp>
|
||||
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/mpl/or.hpp>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
// Use boost/limits to work around missing limits headers on some compilers
|
||||
#include <boost/limits.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <boost/concept/detail/concept_def.hpp>
|
||||
|
||||
namespace boost_concepts
|
||||
{
|
||||
// Used a different namespace here (instead of "boost") so that the
|
||||
// concept descriptions do not take for granted the names in
|
||||
// namespace boost.
|
||||
|
||||
//===========================================================================
|
||||
// Iterator Access Concepts
|
||||
|
||||
BOOST_concept(ReadableIterator,(Iterator))
|
||||
: boost::Assignable<Iterator>
|
||||
, boost::CopyConstructible<Iterator>
|
||||
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::value_type value_type;
|
||||
typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::reference reference;
|
||||
|
||||
BOOST_CONCEPT_USAGE(ReadableIterator)
|
||||
{
|
||||
|
||||
value_type v = *i;
|
||||
boost::ignore_unused_variable_warning(v);
|
||||
}
|
||||
private:
|
||||
Iterator i;
|
||||
};
|
||||
|
||||
template <
|
||||
typename Iterator
|
||||
, typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::value_type
|
||||
>
|
||||
struct WritableIterator
|
||||
: boost::CopyConstructible<Iterator>
|
||||
{
|
||||
BOOST_CONCEPT_USAGE(WritableIterator)
|
||||
{
|
||||
*i = v;
|
||||
}
|
||||
private:
|
||||
ValueType v;
|
||||
Iterator i;
|
||||
};
|
||||
|
||||
template <
|
||||
typename Iterator
|
||||
, typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::value_type
|
||||
>
|
||||
struct WritableIteratorConcept : WritableIterator<Iterator,ValueType> {};
|
||||
|
||||
BOOST_concept(SwappableIterator,(Iterator))
|
||||
{
|
||||
BOOST_CONCEPT_USAGE(SwappableIterator)
|
||||
{
|
||||
std::iter_swap(i1, i2);
|
||||
}
|
||||
private:
|
||||
Iterator i1;
|
||||
Iterator i2;
|
||||
};
|
||||
|
||||
BOOST_concept(LvalueIterator,(Iterator))
|
||||
{
|
||||
typedef typename boost::detail::iterator_traits<Iterator>::value_type value_type;
|
||||
|
||||
BOOST_CONCEPT_USAGE(LvalueIterator)
|
||||
{
|
||||
value_type& r = const_cast<value_type&>(*i);
|
||||
boost::ignore_unused_variable_warning(r);
|
||||
}
|
||||
private:
|
||||
Iterator i;
|
||||
};
|
||||
|
||||
|
||||
//===========================================================================
|
||||
// Iterator Traversal Concepts
|
||||
|
||||
BOOST_concept(IncrementableIterator,(Iterator))
|
||||
: boost::Assignable<Iterator>
|
||||
, boost::CopyConstructible<Iterator>
|
||||
{
|
||||
typedef typename boost::iterator_traversal<Iterator>::type traversal_category;
|
||||
|
||||
BOOST_CONCEPT_ASSERT((
|
||||
boost::Convertible<
|
||||
traversal_category
|
||||
, boost::incrementable_traversal_tag
|
||||
>));
|
||||
|
||||
BOOST_CONCEPT_USAGE(IncrementableIterator)
|
||||
{
|
||||
++i;
|
||||
(void)i++;
|
||||
}
|
||||
private:
|
||||
Iterator i;
|
||||
};
|
||||
|
||||
BOOST_concept(SinglePassIterator,(Iterator))
|
||||
: IncrementableIterator<Iterator>
|
||||
, boost::EqualityComparable<Iterator>
|
||||
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT((
|
||||
boost::Convertible<
|
||||
BOOST_DEDUCED_TYPENAME SinglePassIterator::traversal_category
|
||||
, boost::single_pass_traversal_tag
|
||||
> ));
|
||||
};
|
||||
|
||||
BOOST_concept(ForwardTraversal,(Iterator))
|
||||
: SinglePassIterator<Iterator>
|
||||
, boost::DefaultConstructible<Iterator>
|
||||
{
|
||||
typedef typename boost::detail::iterator_traits<Iterator>::difference_type difference_type;
|
||||
|
||||
BOOST_MPL_ASSERT((boost::is_integral<difference_type>));
|
||||
BOOST_MPL_ASSERT_RELATION(std::numeric_limits<difference_type>::is_signed, ==, true);
|
||||
|
||||
BOOST_CONCEPT_ASSERT((
|
||||
boost::Convertible<
|
||||
BOOST_DEDUCED_TYPENAME ForwardTraversal::traversal_category
|
||||
, boost::forward_traversal_tag
|
||||
> ));
|
||||
};
|
||||
|
||||
BOOST_concept(BidirectionalTraversal,(Iterator))
|
||||
: ForwardTraversal<Iterator>
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT((
|
||||
boost::Convertible<
|
||||
BOOST_DEDUCED_TYPENAME BidirectionalTraversal::traversal_category
|
||||
, boost::bidirectional_traversal_tag
|
||||
> ));
|
||||
|
||||
BOOST_CONCEPT_USAGE(BidirectionalTraversal)
|
||||
{
|
||||
--i;
|
||||
(void)i--;
|
||||
}
|
||||
private:
|
||||
Iterator i;
|
||||
};
|
||||
|
||||
BOOST_concept(RandomAccessTraversal,(Iterator))
|
||||
: BidirectionalTraversal<Iterator>
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT((
|
||||
boost::Convertible<
|
||||
BOOST_DEDUCED_TYPENAME RandomAccessTraversal::traversal_category
|
||||
, boost::random_access_traversal_tag
|
||||
> ));
|
||||
|
||||
BOOST_CONCEPT_USAGE(RandomAccessTraversal)
|
||||
{
|
||||
i += n;
|
||||
i = i + n;
|
||||
i = n + i;
|
||||
i -= n;
|
||||
i = i - n;
|
||||
n = i - j;
|
||||
}
|
||||
|
||||
private:
|
||||
typename BidirectionalTraversal<Iterator>::difference_type n;
|
||||
Iterator i, j;
|
||||
};
|
||||
|
||||
//===========================================================================
|
||||
// Iterator Interoperability
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <typename Iterator1, typename Iterator2>
|
||||
void interop_single_pass_constraints(Iterator1 const& i1, Iterator2 const& i2)
|
||||
{
|
||||
bool b;
|
||||
b = i1 == i2;
|
||||
b = i1 != i2;
|
||||
|
||||
b = i2 == i1;
|
||||
b = i2 != i1;
|
||||
boost::ignore_unused_variable_warning(b);
|
||||
}
|
||||
|
||||
template <typename Iterator1, typename Iterator2>
|
||||
void interop_rand_access_constraints(
|
||||
Iterator1 const& i1, Iterator2 const& i2,
|
||||
boost::random_access_traversal_tag, boost::random_access_traversal_tag)
|
||||
{
|
||||
bool b;
|
||||
typename boost::detail::iterator_traits<Iterator2>::difference_type n;
|
||||
b = i1 < i2;
|
||||
b = i1 <= i2;
|
||||
b = i1 > i2;
|
||||
b = i1 >= i2;
|
||||
n = i1 - i2;
|
||||
|
||||
b = i2 < i1;
|
||||
b = i2 <= i1;
|
||||
b = i2 > i1;
|
||||
b = i2 >= i1;
|
||||
n = i2 - i1;
|
||||
boost::ignore_unused_variable_warning(b);
|
||||
boost::ignore_unused_variable_warning(n);
|
||||
}
|
||||
|
||||
template <typename Iterator1, typename Iterator2>
|
||||
void interop_rand_access_constraints(
|
||||
Iterator1 const&, Iterator2 const&,
|
||||
boost::single_pass_traversal_tag, boost::single_pass_traversal_tag)
|
||||
{ }
|
||||
|
||||
} // namespace detail
|
||||
|
||||
BOOST_concept(InteroperableIterator,(Iterator)(ConstIterator))
|
||||
{
|
||||
private:
|
||||
typedef typename boost::iterators::pure_iterator_traversal<Iterator>::type traversal_category;
|
||||
typedef typename boost::iterators::pure_iterator_traversal<ConstIterator>::type const_traversal_category;
|
||||
|
||||
public:
|
||||
BOOST_CONCEPT_ASSERT((SinglePassIterator<Iterator>));
|
||||
BOOST_CONCEPT_ASSERT((SinglePassIterator<ConstIterator>));
|
||||
|
||||
BOOST_CONCEPT_USAGE(InteroperableIterator)
|
||||
{
|
||||
detail::interop_single_pass_constraints(i, ci);
|
||||
detail::interop_rand_access_constraints(i, ci, traversal_category(), const_traversal_category());
|
||||
|
||||
ci = i;
|
||||
}
|
||||
|
||||
private:
|
||||
Iterator i;
|
||||
ConstIterator ci;
|
||||
};
|
||||
|
||||
} // namespace boost_concepts
|
||||
|
||||
#include <boost/concept/detail/concept_undef.hpp>
|
||||
|
||||
#endif // BOOST_ITERATOR_CONCEPTS_HPP
|
||||
@@ -0,0 +1,158 @@
|
||||
// Copyright (c) 2006 Xiaogang Zhang
|
||||
// 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_BESSEL_K0_HPP
|
||||
#define BOOST_MATH_BESSEL_K0_HPP
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma once
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4702) // Unreachable code (release mode only warning)
|
||||
#endif
|
||||
|
||||
#include <boost/math/tools/rational.hpp>
|
||||
#include <boost/math/tools/big_constant.hpp>
|
||||
#include <boost/math/policies/error_handling.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
// Modified Bessel function of the second kind of order zero
|
||||
// minimax rational approximations on intervals, see
|
||||
// Russon and Blair, Chalk River Report AECL-3461, 1969
|
||||
|
||||
namespace boost { namespace math { namespace detail{
|
||||
|
||||
template <typename T, typename Policy>
|
||||
T bessel_k0(T x, const Policy&);
|
||||
|
||||
template <class T, class Policy>
|
||||
struct bessel_k0_initializer
|
||||
{
|
||||
struct init
|
||||
{
|
||||
init()
|
||||
{
|
||||
do_init();
|
||||
}
|
||||
static void do_init()
|
||||
{
|
||||
bessel_k0(T(1), Policy());
|
||||
}
|
||||
void force_instantiate()const{}
|
||||
};
|
||||
static const init initializer;
|
||||
static void force_instantiate()
|
||||
{
|
||||
initializer.force_instantiate();
|
||||
}
|
||||
};
|
||||
|
||||
template <class T, class Policy>
|
||||
const typename bessel_k0_initializer<T, Policy>::init bessel_k0_initializer<T, Policy>::initializer;
|
||||
|
||||
template <typename T, typename Policy>
|
||||
T bessel_k0(T x, const Policy& pol)
|
||||
{
|
||||
BOOST_MATH_INSTRUMENT_CODE(x);
|
||||
|
||||
bessel_k0_initializer<T, Policy>::force_instantiate();
|
||||
|
||||
static const T P1[] = {
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.4708152720399552679e+03)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.9169059852270512312e+03)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.6850901201934832188e+02)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.1999463724910714109e+01)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.3166052564989571850e-01)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.8599221412826100000e-04))
|
||||
};
|
||||
static const T Q1[] = {
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.1312714303849120380e+04)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.4994418972832303646e+02)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0))
|
||||
};
|
||||
static const T P2[] = {
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.6128136304458193998e+06)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -3.7333769444840079748e+05)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.7984434409411765813e+04)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.9501657892958843865e+02)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.6414452837299064100e+00))
|
||||
};
|
||||
static const T Q2[] = {
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -1.6128136304458193998e+06)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.9865713163054025489e+04)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, -2.5064972445877992730e+02)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0))
|
||||
};
|
||||
static const T P3[] = {
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.1600249425076035558e+02)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.3444738764199315021e+03)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.8321525870183537725e+04)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 7.1557062783764037541e+04)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.5097646353289914539e+05)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.7398867902565686251e+05)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0577068948034021957e+05)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.1075408980684392399e+04)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.6832589957340267940e+03)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.1394980557384778174e+02))
|
||||
};
|
||||
static const T Q3[] = {
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 9.2556599177304839811e+01)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.8821890840982713696e+03)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.4847228371802360957e+04)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 5.8824616785857027752e+04)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.2689839587977598727e+05)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.5144644673520157801e+05)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 9.7418829762268075784e+04)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 3.1474655750295278825e+04)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 4.4329628889746408858e+03)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 2.0013443064949242491e+02)),
|
||||
static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1.0))
|
||||
};
|
||||
T value, factor, r, r1, r2;
|
||||
|
||||
BOOST_MATH_STD_USING
|
||||
using namespace boost::math::tools;
|
||||
|
||||
static const char* function = "boost::math::bessel_k0<%1%>(%1%,%1%)";
|
||||
|
||||
if (x < 0)
|
||||
{
|
||||
return policies::raise_domain_error<T>(function,
|
||||
"Got x = %1%, but argument x must be non-negative, complex number result not supported", x, pol);
|
||||
}
|
||||
if (x == 0)
|
||||
{
|
||||
return policies::raise_overflow_error<T>(function, 0, pol);
|
||||
}
|
||||
if (x <= 1) // x in (0, 1]
|
||||
{
|
||||
T y = x * x;
|
||||
r1 = evaluate_polynomial(P1, y) / evaluate_polynomial(Q1, y);
|
||||
r2 = evaluate_polynomial(P2, y) / evaluate_polynomial(Q2, y);
|
||||
factor = log(x);
|
||||
value = r1 - factor * r2;
|
||||
}
|
||||
else // x in (1, \infty)
|
||||
{
|
||||
T y = 1 / x;
|
||||
r = evaluate_polynomial(P3, y) / evaluate_polynomial(Q3, y);
|
||||
factor = exp(-x) / sqrt(x);
|
||||
value = factor * r;
|
||||
BOOST_MATH_INSTRUMENT_CODE("y = " << y);
|
||||
BOOST_MATH_INSTRUMENT_CODE("r = " << r);
|
||||
BOOST_MATH_INSTRUMENT_CODE("factor = " << factor);
|
||||
BOOST_MATH_INSTRUMENT_CODE("value = " << value);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
}}} // namespaces
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MATH_BESSEL_K0_HPP
|
||||
|
||||
@@ -0,0 +1,431 @@
|
||||
|
||||
PART 1:
|
||||
|
||||
Matrix m1:
|
||||
|
||||
0: 0
|
||||
1: 1
|
||||
2: 2 3
|
||||
3: 3
|
||||
4: 4
|
||||
5: 5
|
||||
6: 6
|
||||
7: 7
|
||||
8: 8
|
||||
9: 9
|
||||
10: 10 38
|
||||
11: 11
|
||||
12: 12
|
||||
13: 13
|
||||
14: 14
|
||||
15: 15
|
||||
16: 16
|
||||
17: 17
|
||||
18: 18
|
||||
19: 19
|
||||
20: 20
|
||||
21: 21
|
||||
22: 22
|
||||
23: 23
|
||||
24: 24
|
||||
25: 25
|
||||
26: 26
|
||||
27: 27
|
||||
28: 28
|
||||
29: 29
|
||||
30: 30
|
||||
31: 31
|
||||
32: 32
|
||||
33: 33
|
||||
34: 4 34
|
||||
|
||||
Matrix m2, as read from file. Should be same as m1 above.
|
||||
|
||||
0: 0
|
||||
1: 1
|
||||
2: 2 3
|
||||
3: 3
|
||||
4: 4
|
||||
5: 5
|
||||
6: 6
|
||||
7: 7
|
||||
8: 8
|
||||
9: 9
|
||||
10: 10 38
|
||||
11: 11
|
||||
12: 12
|
||||
13: 13
|
||||
14: 14
|
||||
15: 15
|
||||
16: 16
|
||||
17: 17
|
||||
18: 18
|
||||
19: 19
|
||||
20: 20
|
||||
21: 21
|
||||
22: 22
|
||||
23: 23
|
||||
24: 24
|
||||
25: 25
|
||||
26: 26
|
||||
27: 27
|
||||
28: 28
|
||||
29: 29
|
||||
30: 30
|
||||
31: 31
|
||||
32: 32
|
||||
33: 33
|
||||
34: 4 34
|
||||
|
||||
Test of equality of m1 & m2 (should be 1): 1
|
||||
|
||||
Matrix m3, copied from m1 above.
|
||||
|
||||
0: 0
|
||||
1: 1
|
||||
2: 2 3
|
||||
3: 3
|
||||
4: 4
|
||||
5: 5
|
||||
6: 6
|
||||
7: 7
|
||||
8: 8
|
||||
9: 9
|
||||
10: 10 38
|
||||
11: 11
|
||||
12: 12
|
||||
13: 13
|
||||
14: 14
|
||||
15: 15
|
||||
16: 16
|
||||
17: 17
|
||||
18: 18
|
||||
19: 19
|
||||
20: 20
|
||||
21: 21
|
||||
22: 22
|
||||
23: 23
|
||||
24: 24
|
||||
25: 25
|
||||
26: 26
|
||||
27: 27
|
||||
28: 28
|
||||
29: 29
|
||||
30: 30
|
||||
31: 31
|
||||
32: 32
|
||||
33: 33
|
||||
34: 4 34
|
||||
|
||||
Test of equality of m1 & m3 (should be 1): 1
|
||||
|
||||
Matrix m3 again, should now be all zeros.
|
||||
|
||||
0:
|
||||
1:
|
||||
2:
|
||||
3:
|
||||
4:
|
||||
5:
|
||||
6:
|
||||
7:
|
||||
8:
|
||||
9:
|
||||
10:
|
||||
11:
|
||||
12:
|
||||
13:
|
||||
14:
|
||||
15:
|
||||
16:
|
||||
17:
|
||||
18:
|
||||
19:
|
||||
20:
|
||||
21:
|
||||
22:
|
||||
23:
|
||||
24:
|
||||
25:
|
||||
26:
|
||||
27:
|
||||
28:
|
||||
29:
|
||||
30:
|
||||
31:
|
||||
32:
|
||||
33:
|
||||
34:
|
||||
|
||||
Test of equality of m1 & m3 (should be 0): 0
|
||||
|
||||
|
||||
PART 2:
|
||||
|
||||
Transpose of m1.
|
||||
|
||||
0: 0
|
||||
1: 1
|
||||
2: 2
|
||||
3: 2 3
|
||||
4: 4 34
|
||||
5: 5
|
||||
6: 6
|
||||
7: 7
|
||||
8: 8
|
||||
9: 9
|
||||
10: 10
|
||||
11: 11
|
||||
12: 12
|
||||
13: 13
|
||||
14: 14
|
||||
15: 15
|
||||
16: 16
|
||||
17: 17
|
||||
18: 18
|
||||
19: 19
|
||||
20: 20
|
||||
21: 21
|
||||
22: 22
|
||||
23: 23
|
||||
24: 24
|
||||
25: 25
|
||||
26: 26
|
||||
27: 27
|
||||
28: 28
|
||||
29: 29
|
||||
30: 30
|
||||
31: 31
|
||||
32: 32
|
||||
33: 33
|
||||
34: 34
|
||||
35:
|
||||
36:
|
||||
37:
|
||||
38: 10
|
||||
39:
|
||||
|
||||
Matrix m1 after adding rows 2 and 12 and 3 to 10.
|
||||
|
||||
0: 0
|
||||
1: 1
|
||||
2: 2 3
|
||||
3: 3
|
||||
4: 4
|
||||
5: 5
|
||||
6: 6
|
||||
7: 7
|
||||
8: 8
|
||||
9: 9
|
||||
10: 2 10 12 38
|
||||
11: 11
|
||||
12: 12
|
||||
13: 13
|
||||
14: 14
|
||||
15: 15
|
||||
16: 16
|
||||
17: 17
|
||||
18: 18
|
||||
19: 19
|
||||
20: 20
|
||||
21: 21
|
||||
22: 22
|
||||
23: 23
|
||||
24: 24
|
||||
25: 25
|
||||
26: 26
|
||||
27: 27
|
||||
28: 28
|
||||
29: 29
|
||||
30: 30
|
||||
31: 31
|
||||
32: 32
|
||||
33: 33
|
||||
34: 4 34
|
||||
|
||||
Matrix m1 after further adding column 34 to 0.
|
||||
|
||||
0: 0
|
||||
1: 1
|
||||
2: 2 3
|
||||
3: 3
|
||||
4: 4
|
||||
5: 5
|
||||
6: 6
|
||||
7: 7
|
||||
8: 8
|
||||
9: 9
|
||||
10: 2 10 12 38
|
||||
11: 11
|
||||
12: 12
|
||||
13: 13
|
||||
14: 14
|
||||
15: 15
|
||||
16: 16
|
||||
17: 17
|
||||
18: 18
|
||||
19: 19
|
||||
20: 20
|
||||
21: 21
|
||||
22: 22
|
||||
23: 23
|
||||
24: 24
|
||||
25: 25
|
||||
26: 26
|
||||
27: 27
|
||||
28: 28
|
||||
29: 29
|
||||
30: 30
|
||||
31: 31
|
||||
32: 32
|
||||
33: 33
|
||||
34: 0 4 34
|
||||
|
||||
|
||||
PART 3:
|
||||
|
||||
Matrix s0.
|
||||
|
||||
0:
|
||||
1: 3 4
|
||||
2: 0
|
||||
3: 1
|
||||
4:
|
||||
|
||||
Matrix s1.
|
||||
|
||||
0:
|
||||
1: 3 5
|
||||
2:
|
||||
3: 0 1 6
|
||||
4:
|
||||
|
||||
Matrix s2.
|
||||
|
||||
0: 0
|
||||
1: 1
|
||||
2:
|
||||
3:
|
||||
4:
|
||||
5: 1 2 3
|
||||
6:
|
||||
|
||||
Maxtrix s1 times unpacked vector ( 1 0 0 1 0 1 0 ).
|
||||
|
||||
( 0 0 0 1 0 )
|
||||
|
||||
Sum of s0 and s1.
|
||||
|
||||
0:
|
||||
1: 4 5
|
||||
2: 0
|
||||
3: 0 6
|
||||
4:
|
||||
|
||||
Product of s1 and s2.
|
||||
|
||||
0:
|
||||
1: 1 2 3
|
||||
2:
|
||||
3: 0 1
|
||||
4:
|
||||
|
||||
Tried to find (1,2), actually found: (1,2)
|
||||
|
||||
Above matrix with (1,2) cleared.
|
||||
|
||||
0:
|
||||
1: 1 3
|
||||
2:
|
||||
3: 0 1
|
||||
4:
|
||||
|
||||
Tried to find (1,1), actually found: (1,1)
|
||||
|
||||
Matrix with (1,1) cleared as well.
|
||||
|
||||
0:
|
||||
1: 3
|
||||
2:
|
||||
3: 0 1
|
||||
4:
|
||||
|
||||
|
||||
PART 4:
|
||||
|
||||
Matrix s1.
|
||||
|
||||
0: 3 5
|
||||
1: 1 6
|
||||
2: 0
|
||||
3: 1 2
|
||||
4: 0 2
|
||||
5: 6
|
||||
|
||||
LU decomposition (returned value was 0).
|
||||
|
||||
L=
|
||||
0: 3
|
||||
1: 1
|
||||
2: 0
|
||||
3: 1 2
|
||||
4: 0 2 4
|
||||
5:
|
||||
|
||||
U=
|
||||
0: 0
|
||||
1: 1 6
|
||||
2: 2 6
|
||||
3: 3
|
||||
4: 6
|
||||
|
||||
cols: 0 1 2 3 6 5 4
|
||||
rows: 2 1 3 0 4 5
|
||||
|
||||
Product of L and U.
|
||||
|
||||
0: 3
|
||||
1: 1 6
|
||||
2: 0
|
||||
3: 1 2
|
||||
4: 0 2
|
||||
5:
|
||||
|
||||
Solution of Ly=x with x from ( 0 1 1 0 1 0 ) according to rows selected.
|
||||
|
||||
1 1 1 0 1
|
||||
|
||||
Returned value from forward_sub was 1
|
||||
|
||||
Solution of Uz=y.
|
||||
|
||||
1 0 0 0 0 0 1
|
||||
|
||||
Returned value from backward_sub was 1
|
||||
|
||||
|
||||
PART 5:
|
||||
|
||||
Matrix m1:
|
||||
|
||||
0: 3
|
||||
1: 1
|
||||
2: 2
|
||||
3: 0
|
||||
|
||||
Matrix m2, copyrows of m1 in order 3,1,2,0 (should be identity)
|
||||
|
||||
0: 0
|
||||
1: 1
|
||||
2: 2
|
||||
3: 3
|
||||
|
||||
Matrix m3, copycols of m1 in order 3,1,2,0 (should be identity)
|
||||
|
||||
0: 0
|
||||
1: 1
|
||||
2: 2
|
||||
3: 3
|
||||
|
||||
|
||||
DONE WITH TESTS.
|
||||
@@ -0,0 +1,31 @@
|
||||
// Boost.Range library
|
||||
//
|
||||
// Copyright Neil Groves 2007.
|
||||
// Copyright Thorsten Ottosen 2006.
|
||||
// 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_ADAPTORS_HPP
|
||||
#define BOOST_RANGE_ADAPTORS_HPP
|
||||
|
||||
#include <boost/range/adaptor/adjacent_filtered.hpp>
|
||||
#include <boost/range/adaptor/copied.hpp>
|
||||
#include <boost/range/adaptor/filtered.hpp>
|
||||
#include <boost/range/adaptor/formatted.hpp>
|
||||
#include <boost/range/adaptor/indexed.hpp>
|
||||
#include <boost/range/adaptor/indirected.hpp>
|
||||
#include <boost/range/adaptor/map.hpp>
|
||||
#include <boost/range/adaptor/replaced.hpp>
|
||||
#include <boost/range/adaptor/replaced_if.hpp>
|
||||
#include <boost/range/adaptor/reversed.hpp>
|
||||
#include <boost/range/adaptor/sliced.hpp>
|
||||
#include <boost/range/adaptor/strided.hpp>
|
||||
#include <boost/range/adaptor/tokenized.hpp>
|
||||
#include <boost/range/adaptor/transformed.hpp>
|
||||
#include <boost/range/adaptor/uniqued.hpp>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,462 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2007 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)
|
||||
==============================================================================*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<2, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1>
|
||||
RT operator()(A0 & a0 , A1 & a1) const
|
||||
{
|
||||
return fp(a0 , a1);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<3, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1 , typename A2>
|
||||
RT operator()(A0 & a0 , A1 & a1 , A2 & a2) const
|
||||
{
|
||||
return fp(a0 , a1 , a2);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<4, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3>
|
||||
RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3) const
|
||||
{
|
||||
return fp(a0 , a1 , a2 , a3);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<5, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
|
||||
RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4) const
|
||||
{
|
||||
return fp(a0 , a1 , a2 , a3 , a4);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<6, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
|
||||
RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5) const
|
||||
{
|
||||
return fp(a0 , a1 , a2 , a3 , a4 , a5);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<7, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
|
||||
RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6) const
|
||||
{
|
||||
return fp(a0 , a1 , a2 , a3 , a4 , a5 , a6);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<8, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
|
||||
RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7) const
|
||||
{
|
||||
return fp(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<9, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
|
||||
RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8) const
|
||||
{
|
||||
return fp(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<10, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
|
||||
RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8 , A9 & a9) const
|
||||
{
|
||||
return fp(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<11, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10>
|
||||
RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8 , A9 & a9 , A10 & a10) const
|
||||
{
|
||||
return fp(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<12, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11>
|
||||
RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8 , A9 & a9 , A10 & a10 , A11 & a11) const
|
||||
{
|
||||
return fp(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<13, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12>
|
||||
RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8 , A9 & a9 , A10 & a10 , A11 & a11 , A12 & a12) const
|
||||
{
|
||||
return fp(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<14, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13>
|
||||
RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8 , A9 & a9 , A10 & a10 , A11 & a11 , A12 & a12 , A13 & a13) const
|
||||
{
|
||||
return fp(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<15, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14>
|
||||
RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8 , A9 & a9 , A10 & a10 , A11 & a11 , A12 & a12 , A13 & a13 , A14 & a14) const
|
||||
{
|
||||
return fp(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<16, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15>
|
||||
RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8 , A9 & a9 , A10 & a10 , A11 & a11 , A12 & a12 , A13 & a13 , A14 & a14 , A15 & a15) const
|
||||
{
|
||||
return fp(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14 , a15);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<17, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16>
|
||||
RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8 , A9 & a9 , A10 & a10 , A11 & a11 , A12 & a12 , A13 & a13 , A14 & a14 , A15 & a15 , A16 & a16) const
|
||||
{
|
||||
return fp(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14 , a15 , a16);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<18, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17>
|
||||
RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8 , A9 & a9 , A10 & a10 , A11 & a11 , A12 & a12 , A13 & a13 , A14 & a14 , A15 & a15 , A16 & a16 , A17 & a17) const
|
||||
{
|
||||
return fp(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14 , a15 , a16 , a17);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<19, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18>
|
||||
RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8 , A9 & a9 , A10 & a10 , A11 & a11 , A12 & a12 , A13 & a13 , A14 & a14 , A15 & a15 , A16 & a16 , A17 & a17 , A18 & a18) const
|
||||
{
|
||||
return fp(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14 , a15 , a16 , a17 , a18);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Dummy>
|
||||
struct function_ptr_impl<20, Dummy>
|
||||
{
|
||||
template <typename RT, typename FP>
|
||||
struct impl
|
||||
{
|
||||
typedef RT result_type;
|
||||
impl(FP fp_)
|
||||
: fp(fp_) {}
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19>
|
||||
RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8 , A9 & a9 , A10 & a10 , A11 & a11 , A12 & a12 , A13 & a13 , A14 & a14 , A15 & a15 , A16 & a16 , A17 & a17 , A18 & a18 , A19 & a19) const
|
||||
{
|
||||
return fp(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14 , a15 , a16 , a17 , a18 , a19);
|
||||
}
|
||||
FP fp;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,53 @@
|
||||
|
||||
#ifndef BOOST_MPL_PUSH_BACK_HPP_INCLUDED
|
||||
#define BOOST_MPL_PUSH_BACK_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/push_back_fwd.hpp>
|
||||
#include <boost/mpl/aux_/push_back_impl.hpp>
|
||||
#include <boost/mpl/sequence_tag.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(T)
|
||||
>
|
||||
struct push_back
|
||||
: push_back_impl< typename sequence_tag<Sequence>::type >
|
||||
::template apply< Sequence,T >
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,push_back,(Sequence,T))
|
||||
};
|
||||
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
||||
>
|
||||
struct has_push_back
|
||||
: has_push_back_impl< typename sequence_tag<Sequence>::type >
|
||||
::template apply< Sequence >
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,has_push_back,(Sequence))
|
||||
};
|
||||
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC(2, push_back)
|
||||
BOOST_MPL_AUX_NA_SPEC(1, has_push_back)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_PUSH_BACK_HPP_INCLUDED
|
||||
@@ -0,0 +1,435 @@
|
||||
// Copyright Vladimir Prus 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 BOOST_VALUE_SEMANTIC_HPP_VP_2004_02_24
|
||||
#define BOOST_VALUE_SEMANTIC_HPP_VP_2004_02_24
|
||||
|
||||
#include <boost/program_options/config.hpp>
|
||||
#include <boost/program_options/errors.hpp>
|
||||
|
||||
#include <boost/any.hpp>
|
||||
#include <boost/function/function1.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <typeinfo>
|
||||
#include <limits>
|
||||
|
||||
namespace boost { namespace program_options {
|
||||
|
||||
/** Class which specifies how the option's value is to be parsed
|
||||
and converted into C++ types.
|
||||
*/
|
||||
class BOOST_PROGRAM_OPTIONS_DECL value_semantic {
|
||||
public:
|
||||
/** Returns the name of the option. The name is only meaningful
|
||||
for automatic help message.
|
||||
*/
|
||||
virtual std::string name() const = 0;
|
||||
|
||||
/** The minimum number of tokens for this option that
|
||||
should be present on the command line. */
|
||||
virtual unsigned min_tokens() const = 0;
|
||||
|
||||
/** The maximum number of tokens for this option that
|
||||
should be present on the command line. */
|
||||
virtual unsigned max_tokens() const = 0;
|
||||
|
||||
/** Returns true if the option should only take adjacent token,
|
||||
not one from further command-line arguments.
|
||||
*/
|
||||
virtual bool adjacent_tokens_only() const = 0;
|
||||
|
||||
/** Returns true if values from different sources should be composed.
|
||||
Otherwise, value from the first source is used and values from
|
||||
other sources are discarded.
|
||||
*/
|
||||
virtual bool is_composing() const = 0;
|
||||
|
||||
/** Returns true if value must be given. Non-optional value
|
||||
|
||||
*/
|
||||
virtual bool is_required() const = 0;
|
||||
|
||||
/** Parses a group of tokens that specify a value of option.
|
||||
Stores the result in 'value_store', using whatever representation
|
||||
is desired. May be be called several times if value of the same
|
||||
option is specified more than once.
|
||||
*/
|
||||
virtual void parse(boost::any& value_store,
|
||||
const std::vector<std::string>& new_tokens,
|
||||
bool utf8) const
|
||||
= 0;
|
||||
|
||||
/** Called to assign default value to 'value_store'. Returns
|
||||
true if default value is assigned, and false if no default
|
||||
value exists. */
|
||||
virtual bool apply_default(boost::any& value_store) const = 0;
|
||||
|
||||
/** Called when final value of an option is determined.
|
||||
*/
|
||||
virtual void notify(const boost::any& value_store) const = 0;
|
||||
|
||||
virtual ~value_semantic() {}
|
||||
};
|
||||
|
||||
/** Helper class which perform necessary character conversions in the
|
||||
'parse' method and forwards the data further.
|
||||
*/
|
||||
template<class charT>
|
||||
class value_semantic_codecvt_helper {
|
||||
// Nothing here. Specializations to follow.
|
||||
};
|
||||
|
||||
/** Helper conversion class for values that accept ascii
|
||||
strings as input.
|
||||
Overrides the 'parse' method and defines new 'xparse'
|
||||
method taking std::string. Depending on whether input
|
||||
to parse is ascii or UTF8, will pass it to xparse unmodified,
|
||||
or with UTF8->ascii conversion.
|
||||
*/
|
||||
template<>
|
||||
class BOOST_PROGRAM_OPTIONS_DECL
|
||||
value_semantic_codecvt_helper<char> : public value_semantic {
|
||||
private: // base overrides
|
||||
void parse(boost::any& value_store,
|
||||
const std::vector<std::string>& new_tokens,
|
||||
bool utf8) const;
|
||||
protected: // interface for derived classes.
|
||||
virtual void xparse(boost::any& value_store,
|
||||
const std::vector<std::string>& new_tokens)
|
||||
const = 0;
|
||||
};
|
||||
|
||||
/** Helper conversion class for values that accept ascii
|
||||
strings as input.
|
||||
Overrides the 'parse' method and defines new 'xparse'
|
||||
method taking std::wstring. Depending on whether input
|
||||
to parse is ascii or UTF8, will recode input to Unicode, or
|
||||
pass it unmodified.
|
||||
*/
|
||||
template<>
|
||||
class BOOST_PROGRAM_OPTIONS_DECL
|
||||
value_semantic_codecvt_helper<wchar_t> : public value_semantic {
|
||||
private: // base overrides
|
||||
void parse(boost::any& value_store,
|
||||
const std::vector<std::string>& new_tokens,
|
||||
bool utf8) const;
|
||||
protected: // interface for derived classes.
|
||||
#if !defined(BOOST_NO_STD_WSTRING)
|
||||
virtual void xparse(boost::any& value_store,
|
||||
const std::vector<std::wstring>& new_tokens)
|
||||
const = 0;
|
||||
#endif
|
||||
};
|
||||
|
||||
/** Class which specifies a simple handling of a value: the value will
|
||||
have string type and only one token is allowed. */
|
||||
class BOOST_PROGRAM_OPTIONS_DECL
|
||||
untyped_value : public value_semantic_codecvt_helper<char> {
|
||||
public:
|
||||
untyped_value(bool zero_tokens = false)
|
||||
: m_zero_tokens(zero_tokens)
|
||||
{}
|
||||
|
||||
std::string name() const;
|
||||
|
||||
unsigned min_tokens() const;
|
||||
unsigned max_tokens() const;
|
||||
bool adjacent_tokens_only() const { return false; }
|
||||
|
||||
bool is_composing() const { return false; }
|
||||
|
||||
bool is_required() const { return false; }
|
||||
|
||||
/** If 'value_store' is already initialized, or new_tokens
|
||||
has more than one elements, throws. Otherwise, assigns
|
||||
the first string from 'new_tokens' to 'value_store', without
|
||||
any modifications.
|
||||
*/
|
||||
void xparse(boost::any& value_store,
|
||||
const std::vector<std::string>& new_tokens) const;
|
||||
|
||||
/** Does nothing. */
|
||||
bool apply_default(boost::any&) const { return false; }
|
||||
|
||||
/** Does nothing. */
|
||||
void notify(const boost::any&) const {}
|
||||
private:
|
||||
bool m_zero_tokens;
|
||||
};
|
||||
|
||||
#ifndef BOOST_NO_RTTI
|
||||
/** Base class for all option that have a fixed type, and are
|
||||
willing to announce this type to the outside world.
|
||||
Any 'value_semantics' for which you want to find out the
|
||||
type can be dynamic_cast-ed to typed_value_base. If conversion
|
||||
succeeds, the 'type' method can be called.
|
||||
*/
|
||||
class typed_value_base
|
||||
{
|
||||
public:
|
||||
// Returns the type of the value described by this
|
||||
// object.
|
||||
virtual const std::type_info& value_type() const = 0;
|
||||
// Not really needed, since deletion from this
|
||||
// class is silly, but just in case.
|
||||
virtual ~typed_value_base() {}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
/** Class which handles value of a specific type. */
|
||||
template<class T, class charT = char>
|
||||
class typed_value : public value_semantic_codecvt_helper<charT>
|
||||
#ifndef BOOST_NO_RTTI
|
||||
, public typed_value_base
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
/** Ctor. The 'store_to' parameter tells where to store
|
||||
the value when it's known. The parameter can be NULL. */
|
||||
typed_value(T* store_to)
|
||||
: m_store_to(store_to), m_composing(false),
|
||||
m_implicit(false), m_multitoken(false),
|
||||
m_zero_tokens(false), m_required(false)
|
||||
{}
|
||||
|
||||
/** Specifies default value, which will be used
|
||||
if none is explicitly specified. The type 'T' should
|
||||
provide operator<< for ostream.
|
||||
*/
|
||||
typed_value* default_value(const T& v)
|
||||
{
|
||||
m_default_value = boost::any(v);
|
||||
m_default_value_as_text = boost::lexical_cast<std::string>(v);
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Specifies default value, which will be used
|
||||
if none is explicitly specified. Unlike the above overload,
|
||||
the type 'T' need not provide operator<< for ostream,
|
||||
but textual representation of default value must be provided
|
||||
by the user.
|
||||
*/
|
||||
typed_value* default_value(const T& v, const std::string& textual)
|
||||
{
|
||||
m_default_value = boost::any(v);
|
||||
m_default_value_as_text = textual;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Specifies an implicit value, which will be used
|
||||
if the option is given, but without an adjacent value.
|
||||
Using this implies that an explicit value is optional, but if
|
||||
given, must be strictly adjacent to the option, i.e.: '-ovalue'
|
||||
or '--option=value'. Giving '-o' or '--option' will cause the
|
||||
implicit value to be applied.
|
||||
*/
|
||||
typed_value* implicit_value(const T &v)
|
||||
{
|
||||
m_implicit_value = boost::any(v);
|
||||
m_implicit_value_as_text =
|
||||
boost::lexical_cast<std::string>(v);
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Specifies the name used to to the value in help message. */
|
||||
typed_value* value_name(const std::string& name)
|
||||
{
|
||||
m_value_name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Specifies an implicit value, which will be used
|
||||
if the option is given, but without an adjacent value.
|
||||
Using this implies that an explicit value is optional, but if
|
||||
given, must be strictly adjacent to the option, i.e.: '-ovalue'
|
||||
or '--option=value'. Giving '-o' or '--option' will cause the
|
||||
implicit value to be applied.
|
||||
Unlike the above overload, the type 'T' need not provide
|
||||
operator<< for ostream, but textual representation of default
|
||||
value must be provided by the user.
|
||||
*/
|
||||
typed_value* implicit_value(const T &v, const std::string& textual)
|
||||
{
|
||||
m_implicit_value = boost::any(v);
|
||||
m_implicit_value_as_text = textual;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Specifies a function to be called when the final value
|
||||
is determined. */
|
||||
typed_value* notifier(function1<void, const T&> f)
|
||||
{
|
||||
m_notifier = f;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Specifies that the value is composing. See the 'is_composing'
|
||||
method for explanation.
|
||||
*/
|
||||
typed_value* composing()
|
||||
{
|
||||
m_composing = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Specifies that the value can span multiple tokens.
|
||||
*/
|
||||
typed_value* multitoken()
|
||||
{
|
||||
m_multitoken = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Specifies that no tokens may be provided as the value of
|
||||
this option, which means that only presense of the option
|
||||
is significant. For such option to be useful, either the
|
||||
'validate' function should be specialized, or the
|
||||
'implicit_value' method should be also used. In most
|
||||
cases, you can use the 'bool_switch' function instead of
|
||||
using this method. */
|
||||
typed_value* zero_tokens()
|
||||
{
|
||||
m_zero_tokens = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Specifies that the value must occur. */
|
||||
typed_value* required()
|
||||
{
|
||||
m_required = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public: // value semantic overrides
|
||||
|
||||
std::string name() const;
|
||||
|
||||
bool is_composing() const { return m_composing; }
|
||||
|
||||
unsigned min_tokens() const
|
||||
{
|
||||
if (m_zero_tokens || !m_implicit_value.empty()) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned max_tokens() const {
|
||||
if (m_multitoken) {
|
||||
return std::numeric_limits<unsigned>::max BOOST_PREVENT_MACRO_SUBSTITUTION();
|
||||
} else if (m_zero_tokens) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
bool adjacent_tokens_only() const { return !m_implicit_value.empty(); }
|
||||
|
||||
bool is_required() const { return m_required; }
|
||||
|
||||
/** Creates an instance of the 'validator' class and calls
|
||||
its operator() to perform the actual conversion. */
|
||||
void xparse(boost::any& value_store,
|
||||
const std::vector< std::basic_string<charT> >& new_tokens)
|
||||
const;
|
||||
|
||||
/** If default value was specified via previous call to
|
||||
'default_value', stores that value into 'value_store'.
|
||||
Returns true if default value was stored.
|
||||
*/
|
||||
virtual bool apply_default(boost::any& value_store) const
|
||||
{
|
||||
if (m_default_value.empty()) {
|
||||
return false;
|
||||
} else {
|
||||
value_store = m_default_value;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/** If an address of variable to store value was specified
|
||||
when creating *this, stores the value there. Otherwise,
|
||||
does nothing. */
|
||||
void notify(const boost::any& value_store) const;
|
||||
|
||||
public: // typed_value_base overrides
|
||||
|
||||
#ifndef BOOST_NO_RTTI
|
||||
const std::type_info& value_type() const
|
||||
{
|
||||
return typeid(T);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
private:
|
||||
T* m_store_to;
|
||||
|
||||
// Default value is stored as boost::any and not
|
||||
// as boost::optional to avoid unnecessary instantiations.
|
||||
std::string m_value_name;
|
||||
boost::any m_default_value;
|
||||
std::string m_default_value_as_text;
|
||||
boost::any m_implicit_value;
|
||||
std::string m_implicit_value_as_text;
|
||||
bool m_composing, m_implicit, m_multitoken, m_zero_tokens, m_required;
|
||||
boost::function1<void, const T&> m_notifier;
|
||||
};
|
||||
|
||||
|
||||
/** Creates a typed_value<T> instance. This function is the primary
|
||||
method to create value_semantic instance for a specific type, which
|
||||
can later be passed to 'option_description' constructor.
|
||||
The second overload is used when it's additionally desired to store the
|
||||
value of option into program variable.
|
||||
*/
|
||||
template<class T>
|
||||
typed_value<T>*
|
||||
value();
|
||||
|
||||
/** @overload
|
||||
*/
|
||||
template<class T>
|
||||
typed_value<T>*
|
||||
value(T* v);
|
||||
|
||||
/** Creates a typed_value<T> instance. This function is the primary
|
||||
method to create value_semantic instance for a specific type, which
|
||||
can later be passed to 'option_description' constructor.
|
||||
*/
|
||||
template<class T>
|
||||
typed_value<T, wchar_t>*
|
||||
wvalue();
|
||||
|
||||
/** @overload
|
||||
*/
|
||||
template<class T>
|
||||
typed_value<T, wchar_t>*
|
||||
wvalue(T* v);
|
||||
|
||||
/** Works the same way as the 'value<bool>' function, but the created
|
||||
value_semantic won't accept any explicit value. So, if the option
|
||||
is present on the command line, the value will be 'true'.
|
||||
*/
|
||||
BOOST_PROGRAM_OPTIONS_DECL typed_value<bool>*
|
||||
bool_switch();
|
||||
|
||||
/** @overload
|
||||
*/
|
||||
BOOST_PROGRAM_OPTIONS_DECL typed_value<bool>*
|
||||
bool_switch(bool* v);
|
||||
|
||||
}}
|
||||
|
||||
#include "boost/program_options/detail/value_semantic.hpp"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
|
||||
#ifndef BOOST_MPL_LIST_LIST0_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_LIST0_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/long.hpp>
|
||||
#include <boost/mpl/aux_/na.hpp>
|
||||
#include <boost/mpl/list/aux_/push_front.hpp>
|
||||
#include <boost/mpl/list/aux_/pop_front.hpp>
|
||||
#include <boost/mpl/list/aux_/push_back.hpp>
|
||||
#include <boost/mpl/list/aux_/front.hpp>
|
||||
#include <boost/mpl/list/aux_/clear.hpp>
|
||||
#include <boost/mpl/list/aux_/O1_size.hpp>
|
||||
#include <boost/mpl/list/aux_/size.hpp>
|
||||
#include <boost/mpl/list/aux_/empty.hpp>
|
||||
#include <boost/mpl/list/aux_/begin_end.hpp>
|
||||
#include <boost/mpl/list/aux_/item.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template< typename Dummy = na > struct list0;
|
||||
|
||||
template<> struct list0<na>
|
||||
: l_end
|
||||
{
|
||||
typedef l_end type;
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_LIST_LIST0_HPP_INCLUDED
|
||||
@@ -0,0 +1,36 @@
|
||||
<table cellspacing=1>
|
||||
<tr><td><b>F1 </b></td><td>Online User's Guide</td></tr>
|
||||
<tr><td><b>Ctrl+F1 </b></td><td>About WSJT-X</td></tr>
|
||||
<tr><td><b>F2 </b></td><td>Open settings window</td></tr>
|
||||
<tr><td><b>F3 </b></td><td>Display keyboard shortcuts</td></tr>
|
||||
<tr><td><b>F4 </b></td><td>Clear DX Call, DX Grid, Tx messages 1-5</td></tr>
|
||||
<tr><td><b>Alt+F4 </b></td><td>Exit program</td></tr>
|
||||
<tr><td><b>F5 </b></td><td>Display special mouse commands</td></tr>
|
||||
<tr><td><b>F6 </b></td><td>Open next file in directory</td></tr>
|
||||
<tr><td><b>Shift+F6 </b></td><td>Decode all remaining files in directrory</td></tr>
|
||||
<tr><td><b>F7 </b></td><td>Display Message Averaging window</td></tr>
|
||||
<tr><td><b>F11 </b></td><td>Move Rx frequency down 1 Hz</td></tr>
|
||||
<tr><td><b>Ctrl+F11 </b></td><td>Move Rx and Tx frequencies down 1 Hz</td></tr>
|
||||
<tr><td><b>Shift+F11 </b></td><td>Move Tx frequency down 50 Hz (rounded)</td></tr>
|
||||
<tr><td><b>F12 </b></td><td>Move Rx frequency up 1 Hz</td></tr>
|
||||
<tr><td><b>Ctrl+F12 </b></td><td>Move Rx and Tx frequencies up 1 Hz</td></tr>
|
||||
<tr><td><b>Shift+F12 </b></td><td>Move Tx frequency up 50 Hz (rounded)</td></tr>
|
||||
<tr><td><b>Alt+1-6 </b></td><td>Set now transmission to this number on Tab 1</td></tr>
|
||||
<tr><td><b>Ctl+1-6 </b></td><td>Set next transmission to this number on Tab 1</td></tr>
|
||||
<tr><td><b>Alt+D </b></td><td>Decode again at QSO frequency</td></tr>
|
||||
<tr><td><b>Shift+D </b></td><td>Full decode (both windows)</td></tr>
|
||||
<tr><td><b>Ctrl+E </b></td><td>Turn on TX even/1st</td></tr>
|
||||
<tr><td><b>Shift+E </b></td><td>Turn off TX even/1st</td></tr>
|
||||
<tr><td><b>Alt+E </b></td><td>Erase</td></tr>
|
||||
<tr><td><b>Ctrl+F </b></td><td>Edit the free text message box</td></tr>
|
||||
<tr><td><b>Alt+G </b></td><td>Generate standard messages</td></tr>
|
||||
<tr><td><b>Alt+H </b></td><td>Halt Tx</td></tr>
|
||||
<tr><td><b>Ctrl+L </b></td><td>Lookup callsign in database, generate standard messages</td></tr>
|
||||
<tr><td><b>Alt+M </b></td><td>Monitor</td></tr>
|
||||
<tr><td><b>Alt+N </b></td><td>Enable Tx</td></tr>
|
||||
<tr><td><b>Ctrl+O </b></td><td>Open a .wav file</td></tr>
|
||||
<tr><td><b>Alt+Q </b></td><td>Log QSO</td></tr>
|
||||
<tr><td><b>Alt+S </b></td><td>Stop monitoring</td></tr>
|
||||
<tr><td><b>Alt+T </b></td><td>Tune</td></tr>
|
||||
<tr><td><b>Alt+V </b></td><td>Save the most recently completed *.wav file</td></tr>
|
||||
</table>
|
||||
@@ -0,0 +1,46 @@
|
||||
#ifndef WSPRNET_H
|
||||
#define WSPRNET_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
#include <QHash>
|
||||
#include <QQueue>
|
||||
|
||||
class QNetworkAccessManager;
|
||||
class QTimer;
|
||||
class QNetworkReply;
|
||||
|
||||
class WSPRNet : public QObject
|
||||
{
|
||||
Q_OBJECT;
|
||||
|
||||
public:
|
||||
explicit WSPRNet(QNetworkAccessManager *, QObject *parent = nullptr);
|
||||
void upload(QString const& call, QString const& grid, QString const& rfreq, QString const& tfreq,
|
||||
QString const& mode, QString const& tpct, QString const& dbm, QString const& version,
|
||||
QString const& fileName);
|
||||
static bool decodeLine(QString const& line, QHash<QString,QString> &query);
|
||||
|
||||
signals:
|
||||
void uploadStatus(QString);
|
||||
|
||||
public slots:
|
||||
void networkReply(QNetworkReply *);
|
||||
void work();
|
||||
void abortOutstandingRequests ();
|
||||
|
||||
private:
|
||||
QNetworkAccessManager *networkManager;
|
||||
QList<QNetworkReply *> m_outstandingRequests;
|
||||
QString m_call, m_grid, m_rfreq, m_tfreq, m_mode, m_tpct, m_dbm, m_vers, m_file;
|
||||
QQueue<QString> urlQueue;
|
||||
QTimer *uploadTimer;
|
||||
int m_urlQueueSize;
|
||||
int m_uploadType;
|
||||
|
||||
QString urlEncodeNoSpot();
|
||||
QString urlEncodeSpot(QHash<QString,QString> const& spot);
|
||||
};
|
||||
|
||||
#endif // WSPRNET_H
|
||||
@@ -0,0 +1,161 @@
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.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://boostorg.github.com/compute for more information.
|
||||
//---------------------------------------------------------------------------//
|
||||
|
||||
#ifndef BOOST_COMPUTE_ALGORITHM_SORT_BY_KEY_HPP
|
||||
#define BOOST_COMPUTE_ALGORITHM_SORT_BY_KEY_HPP
|
||||
|
||||
#include <iterator>
|
||||
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
#include <boost/compute/system.hpp>
|
||||
#include <boost/compute/command_queue.hpp>
|
||||
#include <boost/compute/algorithm/detail/merge_sort_on_cpu.hpp>
|
||||
#include <boost/compute/algorithm/detail/merge_sort_on_gpu.hpp>
|
||||
#include <boost/compute/algorithm/detail/insertion_sort.hpp>
|
||||
#include <boost/compute/algorithm/detail/radix_sort.hpp>
|
||||
#include <boost/compute/algorithm/reverse.hpp>
|
||||
#include <boost/compute/detail/iterator_range_size.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace compute {
|
||||
|
||||
namespace detail {
|
||||
|
||||
template<class KeyIterator, class ValueIterator>
|
||||
inline void
|
||||
dispatch_gpu_sort_by_key(KeyIterator keys_first,
|
||||
KeyIterator keys_last,
|
||||
ValueIterator values_first,
|
||||
less<typename std::iterator_traits<KeyIterator>::value_type> compare,
|
||||
command_queue &queue,
|
||||
typename boost::enable_if_c<
|
||||
is_radix_sortable<
|
||||
typename std::iterator_traits<KeyIterator>::value_type
|
||||
>::value
|
||||
>::type* = 0)
|
||||
{
|
||||
size_t count = detail::iterator_range_size(keys_first, keys_last);
|
||||
|
||||
if(count < 32){
|
||||
detail::serial_insertion_sort_by_key(
|
||||
keys_first, keys_last, values_first, compare, queue
|
||||
);
|
||||
}
|
||||
else {
|
||||
detail::radix_sort_by_key(
|
||||
keys_first, keys_last, values_first, queue
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
template<class KeyIterator, class ValueIterator>
|
||||
inline void
|
||||
dispatch_gpu_sort_by_key(KeyIterator keys_first,
|
||||
KeyIterator keys_last,
|
||||
ValueIterator values_first,
|
||||
greater<typename std::iterator_traits<KeyIterator>::value_type> compare,
|
||||
command_queue &queue,
|
||||
typename boost::enable_if_c<
|
||||
is_radix_sortable<
|
||||
typename std::iterator_traits<KeyIterator>::value_type
|
||||
>::value
|
||||
>::type* = 0)
|
||||
{
|
||||
size_t count = detail::iterator_range_size(keys_first, keys_last);
|
||||
|
||||
if(count < 32){
|
||||
detail::serial_insertion_sort_by_key(
|
||||
keys_first, keys_last, values_first, compare, queue
|
||||
);
|
||||
}
|
||||
else {
|
||||
// radix sorts in descending order
|
||||
detail::radix_sort_by_key(
|
||||
keys_first, keys_last, values_first, false, queue
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
template<class KeyIterator, class ValueIterator, class Compare>
|
||||
inline void dispatch_gpu_sort_by_key(KeyIterator keys_first,
|
||||
KeyIterator keys_last,
|
||||
ValueIterator values_first,
|
||||
Compare compare,
|
||||
command_queue &queue)
|
||||
{
|
||||
size_t count = detail::iterator_range_size(keys_first, keys_last);
|
||||
|
||||
if(count < 32){
|
||||
detail::serial_insertion_sort_by_key(
|
||||
keys_first, keys_last, values_first, compare, queue
|
||||
);
|
||||
} else {
|
||||
detail::merge_sort_by_key_on_gpu(
|
||||
keys_first, keys_last, values_first, compare, queue
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
template<class KeyIterator, class ValueIterator, class Compare>
|
||||
inline void dispatch_sort_by_key(KeyIterator keys_first,
|
||||
KeyIterator keys_last,
|
||||
ValueIterator values_first,
|
||||
Compare compare,
|
||||
command_queue &queue)
|
||||
{
|
||||
if(queue.get_device().type() & device::gpu) {
|
||||
dispatch_gpu_sort_by_key(keys_first, keys_last, values_first, compare, queue);
|
||||
return;
|
||||
}
|
||||
::boost::compute::detail::merge_sort_by_key_on_cpu(
|
||||
keys_first, keys_last, values_first, compare, queue
|
||||
);
|
||||
}
|
||||
|
||||
} // end detail namespace
|
||||
|
||||
/// Performs a key-value sort using the keys in the range [\p keys_first,
|
||||
/// \p keys_last) on the values in the range [\p values_first,
|
||||
/// \p values_first \c + (\p keys_last \c - \p keys_first)) using \p compare.
|
||||
///
|
||||
/// If no compare function is specified, \c less is used.
|
||||
///
|
||||
/// \see sort()
|
||||
template<class KeyIterator, class ValueIterator, class Compare>
|
||||
inline void sort_by_key(KeyIterator keys_first,
|
||||
KeyIterator keys_last,
|
||||
ValueIterator values_first,
|
||||
Compare compare,
|
||||
command_queue &queue = system::default_queue())
|
||||
{
|
||||
::boost::compute::detail::dispatch_sort_by_key(
|
||||
keys_first, keys_last, values_first, compare, queue
|
||||
);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class KeyIterator, class ValueIterator>
|
||||
inline void sort_by_key(KeyIterator keys_first,
|
||||
KeyIterator keys_last,
|
||||
ValueIterator values_first,
|
||||
command_queue &queue = system::default_queue())
|
||||
{
|
||||
typedef typename std::iterator_traits<KeyIterator>::value_type key_type;
|
||||
|
||||
::boost::compute::sort_by_key(
|
||||
keys_first, keys_last, values_first, less<key_type>(), queue
|
||||
);
|
||||
}
|
||||
|
||||
} // end compute namespace
|
||||
} // end boost namespace
|
||||
|
||||
#endif // BOOST_COMPUTE_ALGORITHM_SORT_BY_KEY_HPP
|
||||
@@ -0,0 +1,53 @@
|
||||
|
||||
// (C) Copyright Tobias Schwinger
|
||||
//
|
||||
// Use modification and distribution are subject to the boost Software License,
|
||||
// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// no include guards, this file is intended for multiple inclusion
|
||||
|
||||
// input: BOOST_FT_syntax type macro to use
|
||||
// input: BOOST_FT_cc empty or cc specifier
|
||||
// input: BOOST_FT_ell empty or "..."
|
||||
// input: BOOST_FT_cv empty or cv qualifiers
|
||||
// input: BOOST_FT_flags single decimal integer encoding the flags
|
||||
// output: BOOST_FT_n number of component types (arity+1)
|
||||
// output: BOOST_FT_arity current arity
|
||||
// output: BOOST_FT_type macro that expands to the type
|
||||
// output: BOOST_FT_tplargs(p) template arguments with given prefix
|
||||
// output: BOOST_FT_params(p) parameters with given prefix
|
||||
|
||||
# include <boost/function_types/detail/classifier_impl/arity30_1.hpp>
|
||||
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 >
|
||||
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,31> ::type
|
||||
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 BOOST_FT_ell) BOOST_FT_cv);
|
||||
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 >
|
||||
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,32> ::type
|
||||
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 BOOST_FT_ell) BOOST_FT_cv);
|
||||
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 >
|
||||
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,33> ::type
|
||||
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 BOOST_FT_ell) BOOST_FT_cv);
|
||||
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 >
|
||||
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,34> ::type
|
||||
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 BOOST_FT_ell) BOOST_FT_cv);
|
||||
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 >
|
||||
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,35> ::type
|
||||
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 BOOST_FT_ell) BOOST_FT_cv);
|
||||
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 >
|
||||
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,36> ::type
|
||||
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 BOOST_FT_ell) BOOST_FT_cv);
|
||||
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 >
|
||||
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,37> ::type
|
||||
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 BOOST_FT_ell) BOOST_FT_cv);
|
||||
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 >
|
||||
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,38> ::type
|
||||
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 BOOST_FT_ell) BOOST_FT_cv);
|
||||
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 >
|
||||
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,39> ::type
|
||||
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 BOOST_FT_ell) BOOST_FT_cv);
|
||||
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 >
|
||||
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,40> ::type
|
||||
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 BOOST_FT_ell) BOOST_FT_cv);
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
// Copyright John Maddock 2007-8.
|
||||
// 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_REAL_TYPE_CONCEPT_HPP
|
||||
#define BOOST_MATH_REAL_TYPE_CONCEPT_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4100)
|
||||
#pragma warning(disable: 4510)
|
||||
#pragma warning(disable: 4610)
|
||||
#endif
|
||||
#include <boost/concept_check.hpp>
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#include <boost/math/tools/config.hpp>
|
||||
#include <boost/math/tools/precision.hpp>
|
||||
|
||||
|
||||
namespace boost{ namespace math{ namespace concepts{
|
||||
|
||||
template <class RealType>
|
||||
struct RealTypeConcept
|
||||
{
|
||||
template <class Other>
|
||||
void check_binary_ops(Other o)
|
||||
{
|
||||
RealType r(o);
|
||||
r = o;
|
||||
r -= o;
|
||||
r += o;
|
||||
r *= o;
|
||||
r /= o;
|
||||
r = r - o;
|
||||
r = o - r;
|
||||
r = r + o;
|
||||
r = o + r;
|
||||
r = o * r;
|
||||
r = r * o;
|
||||
r = r / o;
|
||||
r = o / r;
|
||||
bool b;
|
||||
b = r == o;
|
||||
suppress_unused_variable_warning(b);
|
||||
b = o == r;
|
||||
suppress_unused_variable_warning(b);
|
||||
b = r != o;
|
||||
suppress_unused_variable_warning(b);
|
||||
b = o != r;
|
||||
suppress_unused_variable_warning(b);
|
||||
b = r <= o;
|
||||
suppress_unused_variable_warning(b);
|
||||
b = o <= r;
|
||||
suppress_unused_variable_warning(b);
|
||||
b = r >= o;
|
||||
suppress_unused_variable_warning(b);
|
||||
b = o >= r;
|
||||
suppress_unused_variable_warning(b);
|
||||
b = r < o;
|
||||
suppress_unused_variable_warning(b);
|
||||
b = o < r;
|
||||
suppress_unused_variable_warning(b);
|
||||
b = r > o;
|
||||
suppress_unused_variable_warning(b);
|
||||
b = o > r;
|
||||
suppress_unused_variable_warning(b);
|
||||
}
|
||||
|
||||
void constraints()
|
||||
{
|
||||
BOOST_MATH_STD_USING
|
||||
|
||||
RealType r;
|
||||
check_binary_ops(r);
|
||||
check_binary_ops(0.5f);
|
||||
check_binary_ops(0.5);
|
||||
//check_binary_ops(0.5L);
|
||||
check_binary_ops(1);
|
||||
//check_binary_ops(1u);
|
||||
check_binary_ops(1L);
|
||||
//check_binary_ops(1uL);
|
||||
#ifndef BOOST_HAS_LONG_LONG
|
||||
check_binary_ops(1LL);
|
||||
#endif
|
||||
RealType r2 = +r;
|
||||
r2 = -r;
|
||||
|
||||
r2 = fabs(r);
|
||||
r2 = abs(r);
|
||||
r2 = ceil(r);
|
||||
r2 = floor(r);
|
||||
r2 = exp(r);
|
||||
r2 = pow(r, r2);
|
||||
r2 = sqrt(r);
|
||||
r2 = log(r);
|
||||
r2 = cos(r);
|
||||
r2 = sin(r);
|
||||
r2 = tan(r);
|
||||
r2 = asin(r);
|
||||
r2 = acos(r);
|
||||
r2 = atan(r);
|
||||
int i;
|
||||
r2 = ldexp(r, i);
|
||||
r2 = frexp(r, &i);
|
||||
i = boost::math::tools::digits<RealType>();
|
||||
r2 = boost::math::tools::max_value<RealType>();
|
||||
r2 = boost::math::tools::min_value<RealType>();
|
||||
r2 = boost::math::tools::log_max_value<RealType>();
|
||||
r2 = boost::math::tools::log_min_value<RealType>();
|
||||
r2 = boost::math::tools::epsilon<RealType>();
|
||||
}
|
||||
}; // struct DistributionConcept
|
||||
|
||||
|
||||
}}} // namespaces
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* 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)
|
||||
*
|
||||
* Copyright (c) 2014 Andrey Semashev
|
||||
*/
|
||||
/*!
|
||||
* \file atomic/detail/operations.hpp
|
||||
*
|
||||
* This header defines atomic operations, including the emulated version.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_ATOMIC_DETAIL_OPERATIONS_HPP_INCLUDED_
|
||||
#define BOOST_ATOMIC_DETAIL_OPERATIONS_HPP_INCLUDED_
|
||||
|
||||
#include <boost/atomic/detail/operations_lockfree.hpp>
|
||||
#include <boost/atomic/detail/ops_emulated.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_ATOMIC_DETAIL_OPERATIONS_HPP_INCLUDED_
|
||||
@@ -0,0 +1,44 @@
|
||||
#ifndef WSJTX_UDP_DECODES_MODEL_HPP__
|
||||
#define WSJTX_UDP_DECODES_MODEL_HPP__
|
||||
|
||||
#include <QStandardItemModel>
|
||||
|
||||
#include "MessageServer.hpp"
|
||||
|
||||
using Frequency = MessageServer::Frequency;
|
||||
|
||||
class QTime;
|
||||
class QString;
|
||||
class QModelIndex;
|
||||
|
||||
//
|
||||
// Decodes Model - simple data model for all decodes
|
||||
//
|
||||
// The model is a basic table with uniform row format. Rows consist of
|
||||
// QStandardItem instances containing the string representation of the
|
||||
// column data and if the underlying field is not a string then the
|
||||
// UserRole+1 role contains the underlying data item.
|
||||
//
|
||||
// Three slots are provided to add a new decode, remove all decodes
|
||||
// for a client and, to build a reply to CQ message for a given row
|
||||
// which is emitted as a signal respectively.
|
||||
//
|
||||
class DecodesModel
|
||||
: public QStandardItemModel
|
||||
{
|
||||
Q_OBJECT;
|
||||
|
||||
public:
|
||||
explicit DecodesModel (QObject * parent = nullptr);
|
||||
|
||||
Q_SLOT void add_decode (bool is_new, QString const& client_id, QTime time, qint32 snr, float delta_time
|
||||
, quint32 delta_frequency, QString const& mode, QString const& message
|
||||
, bool low_confidence, bool off_air, bool is_fast);
|
||||
Q_SLOT void clear_decodes (QString const& client_id);
|
||||
Q_SLOT void do_reply (QModelIndex const& source, quint8 modifiers);
|
||||
|
||||
Q_SIGNAL void reply (QString const& id, QTime time, qint32 snr, float delta_time, quint32 delta_frequency
|
||||
, QString const& mode, QString const& message, bool low_confidence, quint8 modifiers);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,31 @@
|
||||
// Boost.Range library
|
||||
//
|
||||
// Copyright Thorsten Ottosen 2003-2004. 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_METAFUNCTIONS_HPP
|
||||
#define BOOST_RANGE_METAFUNCTIONS_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/range/iterator.hpp>
|
||||
#include <boost/range/has_range_iterator.hpp>
|
||||
#include <boost/range/result_iterator.hpp>
|
||||
#include <boost/range/reverse_iterator.hpp>
|
||||
#include <boost/range/const_reverse_iterator.hpp>
|
||||
#include <boost/range/reverse_result_iterator.hpp>
|
||||
#include <boost/range/value_type.hpp>
|
||||
#include <boost/range/size_type.hpp>
|
||||
#include <boost/range/difference_type.hpp>
|
||||
#include <boost/range/category.hpp>
|
||||
#include <boost/range/reference.hpp>
|
||||
#include <boost/range/pointer.hpp>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,80 @@
|
||||
/* MOD2CONVERT-TEST. C - Program to test mod2convert module. */
|
||||
|
||||
/* Copyright (c) 1995-2012 by Radford M. Neal.
|
||||
*
|
||||
* Permission is granted for anyone to copy, use, modify, and distribute
|
||||
* these programs and accompanying documents for any purpose, provided
|
||||
* this copyright notice is retained and prominently displayed, and note
|
||||
* is made of any changes made to these programs. These programs and
|
||||
* documents are distributed without any warranty, express or implied.
|
||||
* As the programs were written for research purposes only, they have not
|
||||
* been tested to the degree that would be advisable in any important
|
||||
* application. All use of these programs is entirely at the user's own
|
||||
* risk.
|
||||
*/
|
||||
|
||||
|
||||
/* Correct output for this program is saved in the file mod2convert-test-out */
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "mod2dense.h"
|
||||
#include "mod2sparse.h"
|
||||
#include "mod2convert.h"
|
||||
#include "rand.h"
|
||||
|
||||
#define Rows 40 /* Dimensions of matrix to use in test */
|
||||
#define Cols 13
|
||||
|
||||
#define N 100 /* Number of bits to set in test matrix (some may be
|
||||
duplicates, leading to fewer 1's in matrix */
|
||||
|
||||
main(void)
|
||||
{
|
||||
mod2sparse *sm1, *sm2;
|
||||
mod2dense *dm1, *dm2;
|
||||
int i;
|
||||
|
||||
sm1 = mod2sparse_allocate(Rows,Cols);
|
||||
sm2 = mod2sparse_allocate(Rows,Cols);
|
||||
|
||||
dm1 = mod2dense_allocate(Rows,Cols);
|
||||
dm2 = mod2dense_allocate(Rows,Cols);
|
||||
|
||||
printf("\nCreating sparse matrix.\n");
|
||||
fflush(stdout);
|
||||
|
||||
for (i = 0; i<N; i++)
|
||||
{ mod2sparse_insert(sm1,rand_int(Rows),rand_int(Cols));
|
||||
}
|
||||
|
||||
printf("Converting from sparse to dense.\n");
|
||||
fflush(stdout);
|
||||
|
||||
mod2sparse_to_dense(sm1,dm1);
|
||||
|
||||
printf("Converting back to dense again.\n");
|
||||
fflush(stdout);
|
||||
|
||||
mod2dense_to_sparse(dm1,sm2);
|
||||
|
||||
printf("Testing for equality of two sparse matrices: %s.\n",
|
||||
mod2sparse_equal(sm1,sm2) ? "OK" : "NOT OK");
|
||||
fflush(stdout);
|
||||
|
||||
printf("Converting to dense once again.\n");
|
||||
fflush(stdout);
|
||||
|
||||
mod2sparse_to_dense(sm2,dm2);
|
||||
|
||||
printf("Testing for equality of two dense matrices: %s.\n",
|
||||
mod2dense_equal(dm1,dm2) ? "OK" : "NOT OK");
|
||||
fflush(stdout);
|
||||
|
||||
printf("\nDONE WITH TESTS.\n");
|
||||
|
||||
exit(0);
|
||||
}
|
||||
@@ -0,0 +1,688 @@
|
||||
/*==============================================================================
|
||||
Copyright (c) 2005-2010 Joel de Guzman
|
||||
Copyright (c) 2010 Thomas Heller
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 1>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 2>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 3>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1; typedef typename proto::result_of::child_c<Expr, 2>::type A2;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1 , A2, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e) , proto::child_c< 2>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 4>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1; typedef typename proto::result_of::child_c<Expr, 2>::type A2; typedef typename proto::result_of::child_c<Expr, 3>::type A3;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1 , A2 , A3, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e) , proto::child_c< 2>(e) , proto::child_c< 3>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 5>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1; typedef typename proto::result_of::child_c<Expr, 2>::type A2; typedef typename proto::result_of::child_c<Expr, 3>::type A3; typedef typename proto::result_of::child_c<Expr, 4>::type A4;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1 , A2 , A3 , A4, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e) , proto::child_c< 2>(e) , proto::child_c< 3>(e) , proto::child_c< 4>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 6>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1; typedef typename proto::result_of::child_c<Expr, 2>::type A2; typedef typename proto::result_of::child_c<Expr, 3>::type A3; typedef typename proto::result_of::child_c<Expr, 4>::type A4; typedef typename proto::result_of::child_c<Expr, 5>::type A5;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1 , A2 , A3 , A4 , A5, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e) , proto::child_c< 2>(e) , proto::child_c< 3>(e) , proto::child_c< 4>(e) , proto::child_c< 5>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 7>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1; typedef typename proto::result_of::child_c<Expr, 2>::type A2; typedef typename proto::result_of::child_c<Expr, 3>::type A3; typedef typename proto::result_of::child_c<Expr, 4>::type A4; typedef typename proto::result_of::child_c<Expr, 5>::type A5; typedef typename proto::result_of::child_c<Expr, 6>::type A6;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e) , proto::child_c< 2>(e) , proto::child_c< 3>(e) , proto::child_c< 4>(e) , proto::child_c< 5>(e) , proto::child_c< 6>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 8>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1; typedef typename proto::result_of::child_c<Expr, 2>::type A2; typedef typename proto::result_of::child_c<Expr, 3>::type A3; typedef typename proto::result_of::child_c<Expr, 4>::type A4; typedef typename proto::result_of::child_c<Expr, 5>::type A5; typedef typename proto::result_of::child_c<Expr, 6>::type A6; typedef typename proto::result_of::child_c<Expr, 7>::type A7;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e) , proto::child_c< 2>(e) , proto::child_c< 3>(e) , proto::child_c< 4>(e) , proto::child_c< 5>(e) , proto::child_c< 6>(e) , proto::child_c< 7>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 9>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1; typedef typename proto::result_of::child_c<Expr, 2>::type A2; typedef typename proto::result_of::child_c<Expr, 3>::type A3; typedef typename proto::result_of::child_c<Expr, 4>::type A4; typedef typename proto::result_of::child_c<Expr, 5>::type A5; typedef typename proto::result_of::child_c<Expr, 6>::type A6; typedef typename proto::result_of::child_c<Expr, 7>::type A7; typedef typename proto::result_of::child_c<Expr, 8>::type A8;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e) , proto::child_c< 2>(e) , proto::child_c< 3>(e) , proto::child_c< 4>(e) , proto::child_c< 5>(e) , proto::child_c< 6>(e) , proto::child_c< 7>(e) , proto::child_c< 8>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 10>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1; typedef typename proto::result_of::child_c<Expr, 2>::type A2; typedef typename proto::result_of::child_c<Expr, 3>::type A3; typedef typename proto::result_of::child_c<Expr, 4>::type A4; typedef typename proto::result_of::child_c<Expr, 5>::type A5; typedef typename proto::result_of::child_c<Expr, 6>::type A6; typedef typename proto::result_of::child_c<Expr, 7>::type A7; typedef typename proto::result_of::child_c<Expr, 8>::type A8; typedef typename proto::result_of::child_c<Expr, 9>::type A9;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e) , proto::child_c< 2>(e) , proto::child_c< 3>(e) , proto::child_c< 4>(e) , proto::child_c< 5>(e) , proto::child_c< 6>(e) , proto::child_c< 7>(e) , proto::child_c< 8>(e) , proto::child_c< 9>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 11>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1; typedef typename proto::result_of::child_c<Expr, 2>::type A2; typedef typename proto::result_of::child_c<Expr, 3>::type A3; typedef typename proto::result_of::child_c<Expr, 4>::type A4; typedef typename proto::result_of::child_c<Expr, 5>::type A5; typedef typename proto::result_of::child_c<Expr, 6>::type A6; typedef typename proto::result_of::child_c<Expr, 7>::type A7; typedef typename proto::result_of::child_c<Expr, 8>::type A8; typedef typename proto::result_of::child_c<Expr, 9>::type A9; typedef typename proto::result_of::child_c<Expr, 10>::type A10;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e) , proto::child_c< 2>(e) , proto::child_c< 3>(e) , proto::child_c< 4>(e) , proto::child_c< 5>(e) , proto::child_c< 6>(e) , proto::child_c< 7>(e) , proto::child_c< 8>(e) , proto::child_c< 9>(e) , proto::child_c< 10>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 12>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1; typedef typename proto::result_of::child_c<Expr, 2>::type A2; typedef typename proto::result_of::child_c<Expr, 3>::type A3; typedef typename proto::result_of::child_c<Expr, 4>::type A4; typedef typename proto::result_of::child_c<Expr, 5>::type A5; typedef typename proto::result_of::child_c<Expr, 6>::type A6; typedef typename proto::result_of::child_c<Expr, 7>::type A7; typedef typename proto::result_of::child_c<Expr, 8>::type A8; typedef typename proto::result_of::child_c<Expr, 9>::type A9; typedef typename proto::result_of::child_c<Expr, 10>::type A10; typedef typename proto::result_of::child_c<Expr, 11>::type A11;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e) , proto::child_c< 2>(e) , proto::child_c< 3>(e) , proto::child_c< 4>(e) , proto::child_c< 5>(e) , proto::child_c< 6>(e) , proto::child_c< 7>(e) , proto::child_c< 8>(e) , proto::child_c< 9>(e) , proto::child_c< 10>(e) , proto::child_c< 11>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 13>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1; typedef typename proto::result_of::child_c<Expr, 2>::type A2; typedef typename proto::result_of::child_c<Expr, 3>::type A3; typedef typename proto::result_of::child_c<Expr, 4>::type A4; typedef typename proto::result_of::child_c<Expr, 5>::type A5; typedef typename proto::result_of::child_c<Expr, 6>::type A6; typedef typename proto::result_of::child_c<Expr, 7>::type A7; typedef typename proto::result_of::child_c<Expr, 8>::type A8; typedef typename proto::result_of::child_c<Expr, 9>::type A9; typedef typename proto::result_of::child_c<Expr, 10>::type A10; typedef typename proto::result_of::child_c<Expr, 11>::type A11; typedef typename proto::result_of::child_c<Expr, 12>::type A12;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e) , proto::child_c< 2>(e) , proto::child_c< 3>(e) , proto::child_c< 4>(e) , proto::child_c< 5>(e) , proto::child_c< 6>(e) , proto::child_c< 7>(e) , proto::child_c< 8>(e) , proto::child_c< 9>(e) , proto::child_c< 10>(e) , proto::child_c< 11>(e) , proto::child_c< 12>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 14>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1; typedef typename proto::result_of::child_c<Expr, 2>::type A2; typedef typename proto::result_of::child_c<Expr, 3>::type A3; typedef typename proto::result_of::child_c<Expr, 4>::type A4; typedef typename proto::result_of::child_c<Expr, 5>::type A5; typedef typename proto::result_of::child_c<Expr, 6>::type A6; typedef typename proto::result_of::child_c<Expr, 7>::type A7; typedef typename proto::result_of::child_c<Expr, 8>::type A8; typedef typename proto::result_of::child_c<Expr, 9>::type A9; typedef typename proto::result_of::child_c<Expr, 10>::type A10; typedef typename proto::result_of::child_c<Expr, 11>::type A11; typedef typename proto::result_of::child_c<Expr, 12>::type A12; typedef typename proto::result_of::child_c<Expr, 13>::type A13;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e) , proto::child_c< 2>(e) , proto::child_c< 3>(e) , proto::child_c< 4>(e) , proto::child_c< 5>(e) , proto::child_c< 6>(e) , proto::child_c< 7>(e) , proto::child_c< 8>(e) , proto::child_c< 9>(e) , proto::child_c< 10>(e) , proto::child_c< 11>(e) , proto::child_c< 12>(e) , proto::child_c< 13>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 15>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1; typedef typename proto::result_of::child_c<Expr, 2>::type A2; typedef typename proto::result_of::child_c<Expr, 3>::type A3; typedef typename proto::result_of::child_c<Expr, 4>::type A4; typedef typename proto::result_of::child_c<Expr, 5>::type A5; typedef typename proto::result_of::child_c<Expr, 6>::type A6; typedef typename proto::result_of::child_c<Expr, 7>::type A7; typedef typename proto::result_of::child_c<Expr, 8>::type A8; typedef typename proto::result_of::child_c<Expr, 9>::type A9; typedef typename proto::result_of::child_c<Expr, 10>::type A10; typedef typename proto::result_of::child_c<Expr, 11>::type A11; typedef typename proto::result_of::child_c<Expr, 12>::type A12; typedef typename proto::result_of::child_c<Expr, 13>::type A13; typedef typename proto::result_of::child_c<Expr, 14>::type A14;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e) , proto::child_c< 2>(e) , proto::child_c< 3>(e) , proto::child_c< 4>(e) , proto::child_c< 5>(e) , proto::child_c< 6>(e) , proto::child_c< 7>(e) , proto::child_c< 8>(e) , proto::child_c< 9>(e) , proto::child_c< 10>(e) , proto::child_c< 11>(e) , proto::child_c< 12>(e) , proto::child_c< 13>(e) , proto::child_c< 14>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 16>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1; typedef typename proto::result_of::child_c<Expr, 2>::type A2; typedef typename proto::result_of::child_c<Expr, 3>::type A3; typedef typename proto::result_of::child_c<Expr, 4>::type A4; typedef typename proto::result_of::child_c<Expr, 5>::type A5; typedef typename proto::result_of::child_c<Expr, 6>::type A6; typedef typename proto::result_of::child_c<Expr, 7>::type A7; typedef typename proto::result_of::child_c<Expr, 8>::type A8; typedef typename proto::result_of::child_c<Expr, 9>::type A9; typedef typename proto::result_of::child_c<Expr, 10>::type A10; typedef typename proto::result_of::child_c<Expr, 11>::type A11; typedef typename proto::result_of::child_c<Expr, 12>::type A12; typedef typename proto::result_of::child_c<Expr, 13>::type A13; typedef typename proto::result_of::child_c<Expr, 14>::type A14; typedef typename proto::result_of::child_c<Expr, 15>::type A15;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e) , proto::child_c< 2>(e) , proto::child_c< 3>(e) , proto::child_c< 4>(e) , proto::child_c< 5>(e) , proto::child_c< 6>(e) , proto::child_c< 7>(e) , proto::child_c< 8>(e) , proto::child_c< 9>(e) , proto::child_c< 10>(e) , proto::child_c< 11>(e) , proto::child_c< 12>(e) , proto::child_c< 13>(e) , proto::child_c< 14>(e) , proto::child_c< 15>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 17>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1; typedef typename proto::result_of::child_c<Expr, 2>::type A2; typedef typename proto::result_of::child_c<Expr, 3>::type A3; typedef typename proto::result_of::child_c<Expr, 4>::type A4; typedef typename proto::result_of::child_c<Expr, 5>::type A5; typedef typename proto::result_of::child_c<Expr, 6>::type A6; typedef typename proto::result_of::child_c<Expr, 7>::type A7; typedef typename proto::result_of::child_c<Expr, 8>::type A8; typedef typename proto::result_of::child_c<Expr, 9>::type A9; typedef typename proto::result_of::child_c<Expr, 10>::type A10; typedef typename proto::result_of::child_c<Expr, 11>::type A11; typedef typename proto::result_of::child_c<Expr, 12>::type A12; typedef typename proto::result_of::child_c<Expr, 13>::type A13; typedef typename proto::result_of::child_c<Expr, 14>::type A14; typedef typename proto::result_of::child_c<Expr, 15>::type A15; typedef typename proto::result_of::child_c<Expr, 16>::type A16;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e) , proto::child_c< 2>(e) , proto::child_c< 3>(e) , proto::child_c< 4>(e) , proto::child_c< 5>(e) , proto::child_c< 6>(e) , proto::child_c< 7>(e) , proto::child_c< 8>(e) , proto::child_c< 9>(e) , proto::child_c< 10>(e) , proto::child_c< 11>(e) , proto::child_c< 12>(e) , proto::child_c< 13>(e) , proto::child_c< 14>(e) , proto::child_c< 15>(e) , proto::child_c< 16>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 18>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1; typedef typename proto::result_of::child_c<Expr, 2>::type A2; typedef typename proto::result_of::child_c<Expr, 3>::type A3; typedef typename proto::result_of::child_c<Expr, 4>::type A4; typedef typename proto::result_of::child_c<Expr, 5>::type A5; typedef typename proto::result_of::child_c<Expr, 6>::type A6; typedef typename proto::result_of::child_c<Expr, 7>::type A7; typedef typename proto::result_of::child_c<Expr, 8>::type A8; typedef typename proto::result_of::child_c<Expr, 9>::type A9; typedef typename proto::result_of::child_c<Expr, 10>::type A10; typedef typename proto::result_of::child_c<Expr, 11>::type A11; typedef typename proto::result_of::child_c<Expr, 12>::type A12; typedef typename proto::result_of::child_c<Expr, 13>::type A13; typedef typename proto::result_of::child_c<Expr, 14>::type A14; typedef typename proto::result_of::child_c<Expr, 15>::type A15; typedef typename proto::result_of::child_c<Expr, 16>::type A16; typedef typename proto::result_of::child_c<Expr, 17>::type A17;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e) , proto::child_c< 2>(e) , proto::child_c< 3>(e) , proto::child_c< 4>(e) , proto::child_c< 5>(e) , proto::child_c< 6>(e) , proto::child_c< 7>(e) , proto::child_c< 8>(e) , proto::child_c< 9>(e) , proto::child_c< 10>(e) , proto::child_c< 11>(e) , proto::child_c< 12>(e) , proto::child_c< 13>(e) , proto::child_c< 14>(e) , proto::child_c< 15>(e) , proto::child_c< 16>(e) , proto::child_c< 17>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 19>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1; typedef typename proto::result_of::child_c<Expr, 2>::type A2; typedef typename proto::result_of::child_c<Expr, 3>::type A3; typedef typename proto::result_of::child_c<Expr, 4>::type A4; typedef typename proto::result_of::child_c<Expr, 5>::type A5; typedef typename proto::result_of::child_c<Expr, 6>::type A6; typedef typename proto::result_of::child_c<Expr, 7>::type A7; typedef typename proto::result_of::child_c<Expr, 8>::type A8; typedef typename proto::result_of::child_c<Expr, 9>::type A9; typedef typename proto::result_of::child_c<Expr, 10>::type A10; typedef typename proto::result_of::child_c<Expr, 11>::type A11; typedef typename proto::result_of::child_c<Expr, 12>::type A12; typedef typename proto::result_of::child_c<Expr, 13>::type A13; typedef typename proto::result_of::child_c<Expr, 14>::type A14; typedef typename proto::result_of::child_c<Expr, 15>::type A15; typedef typename proto::result_of::child_c<Expr, 16>::type A16; typedef typename proto::result_of::child_c<Expr, 17>::type A17; typedef typename proto::result_of::child_c<Expr, 18>::type A18;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e) , proto::child_c< 2>(e) , proto::child_c< 3>(e) , proto::child_c< 4>(e) , proto::child_c< 5>(e) , proto::child_c< 6>(e) , proto::child_c< 7>(e) , proto::child_c< 8>(e) , proto::child_c< 9>(e) , proto::child_c< 10>(e) , proto::child_c< 11>(e) , proto::child_c< 12>(e) , proto::child_c< 13>(e) , proto::child_c< 14>(e) , proto::child_c< 15>(e) , proto::child_c< 16>(e) , proto::child_c< 17>(e) , proto::child_c< 18>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Fun, typename Expr, typename State, typename Data>
|
||||
struct call_impl<Fun, Expr, State, Data, 20>
|
||||
: proto::transform_impl<Expr, State, Data>
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::result_of::context<State, Data>::type
|
||||
context_type;
|
||||
typedef typename proto::result_of::child_c<Expr, 0>::type A0; typedef typename proto::result_of::child_c<Expr, 1>::type A1; typedef typename proto::result_of::child_c<Expr, 2>::type A2; typedef typename proto::result_of::child_c<Expr, 3>::type A3; typedef typename proto::result_of::child_c<Expr, 4>::type A4; typedef typename proto::result_of::child_c<Expr, 5>::type A5; typedef typename proto::result_of::child_c<Expr, 6>::type A6; typedef typename proto::result_of::child_c<Expr, 7>::type A7; typedef typename proto::result_of::child_c<Expr, 8>::type A8; typedef typename proto::result_of::child_c<Expr, 9>::type A9; typedef typename proto::result_of::child_c<Expr, 10>::type A10; typedef typename proto::result_of::child_c<Expr, 11>::type A11; typedef typename proto::result_of::child_c<Expr, 12>::type A12; typedef typename proto::result_of::child_c<Expr, 13>::type A13; typedef typename proto::result_of::child_c<Expr, 14>::type A14; typedef typename proto::result_of::child_c<Expr, 15>::type A15; typedef typename proto::result_of::child_c<Expr, 16>::type A16; typedef typename proto::result_of::child_c<Expr, 17>::type A17; typedef typename proto::result_of::child_c<Expr, 18>::type A18; typedef typename proto::result_of::child_c<Expr, 19>::type A19;
|
||||
typedef
|
||||
typename boost::result_of<
|
||||
Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19, context_type)
|
||||
>::type
|
||||
result_type;
|
||||
result_type operator()(
|
||||
typename call_impl::expr_param e
|
||||
, typename call_impl::state_param s
|
||||
, typename call_impl::data_param d
|
||||
) const
|
||||
{
|
||||
return
|
||||
Fun()(
|
||||
proto::child_c< 0>(e) , proto::child_c< 1>(e) , proto::child_c< 2>(e) , proto::child_c< 3>(e) , proto::child_c< 4>(e) , proto::child_c< 5>(e) , proto::child_c< 6>(e) , proto::child_c< 7>(e) , proto::child_c< 8>(e) , proto::child_c< 9>(e) , proto::child_c< 10>(e) , proto::child_c< 11>(e) , proto::child_c< 12>(e) , proto::child_c< 13>(e) , proto::child_c< 14>(e) , proto::child_c< 15>(e) , proto::child_c< 16>(e) , proto::child_c< 17>(e) , proto::child_c< 18>(e) , proto::child_c< 19>(e)
|
||||
, boost::phoenix::context(s, d)
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,147 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
// Copyright Jaap Suter 2003
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "bitxor.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename Tag1
|
||||
, typename Tag2
|
||||
>
|
||||
struct bitxor_impl
|
||||
: if_c<
|
||||
( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
|
||||
> BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
|
||||
)
|
||||
|
||||
, aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 >
|
||||
, aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 >
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
/// for Digital Mars C++/compilers with no CTPS/TTP support
|
||||
template<> struct bitxor_impl< na,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag > struct bitxor_impl< na,Tag >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag > struct bitxor_impl< Tag,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T > struct bitxor_tag
|
||||
{
|
||||
typedef typename T::tag type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(N1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(N2)
|
||||
, typename N3 = na, typename N4 = na, typename N5 = na
|
||||
>
|
||||
struct bitxor_
|
||||
: bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(
|
||||
5
|
||||
, bitxor_
|
||||
, ( N1, N2, N3, N4, N5 )
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename N1, typename N2, typename N3, typename N4
|
||||
>
|
||||
struct bitxor_< N1,N2,N3,N4,na >
|
||||
|
||||
: bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
|
||||
5
|
||||
, bitxor_
|
||||
, ( N1, N2, N3, N4, na )
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename N1, typename N2, typename N3
|
||||
>
|
||||
struct bitxor_< N1,N2,N3,na,na >
|
||||
|
||||
: bitxor_< bitxor_< N1,N2 >, N3>
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
|
||||
5
|
||||
, bitxor_
|
||||
, ( N1, N2, N3, na, na )
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename N1, typename N2
|
||||
>
|
||||
struct bitxor_< N1,N2,na,na,na >
|
||||
: bitxor_impl<
|
||||
typename bitxor_tag<N1>::type
|
||||
, typename bitxor_tag<N2>::type
|
||||
>::template apply< N1,N2 >::type
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
|
||||
5
|
||||
, bitxor_
|
||||
, ( N1, N2, na, na, na )
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_)
|
||||
|
||||
}}
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
template<>
|
||||
struct bitxor_impl< integral_c_tag,integral_c_tag >
|
||||
{
|
||||
template< typename N1, typename N2 > struct apply
|
||||
|
||||
: integral_c<
|
||||
typename aux::largest_int<
|
||||
typename N1::value_type
|
||||
, typename N2::value_type
|
||||
>::type
|
||||
, ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
|
||||
^ BOOST_MPL_AUX_VALUE_WKND(N2)::value
|
||||
)
|
||||
>
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,47 @@
|
||||
|
||||
#ifndef BOOST_MPL_ITER_APPLY_HPP_INCLUDED
|
||||
#define BOOST_MPL_ITER_APPLY_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/apply.hpp>
|
||||
#include <boost/mpl/deref.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
template<
|
||||
typename F
|
||||
, typename Iterator
|
||||
>
|
||||
struct iter_apply1
|
||||
: apply1< F,typename deref<Iterator>::type >
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
typename F
|
||||
, typename Iterator1
|
||||
, typename Iterator2
|
||||
>
|
||||
struct iter_apply2
|
||||
: apply2<
|
||||
F
|
||||
, typename deref<Iterator1>::type
|
||||
, typename deref<Iterator2>::type
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_ITER_APPLY_HPP_INCLUDED
|
||||
@@ -0,0 +1,100 @@
|
||||
#ifndef BOOST_SERIALIZATION_BASE_OBJECT_HPP
|
||||
#define BOOST_SERIALIZATION_BASE_OBJECT_HPP
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// base_object.hpp:
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// 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)
|
||||
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
|
||||
// if no archive headers have been included this is a no op
|
||||
// this is to permit BOOST_EXPORT etc to be included in a
|
||||
// file declaration header
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
|
||||
#include <boost/type_traits/is_base_and_derived.hpp>
|
||||
#include <boost/type_traits/is_pointer.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/is_polymorphic.hpp>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/serialization/access.hpp>
|
||||
#include <boost/serialization/force_include.hpp>
|
||||
#include <boost/serialization/void_cast_fwd.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
namespace detail
|
||||
{
|
||||
// get the base type for a given derived type
|
||||
// preserving the const-ness
|
||||
template<class B, class D>
|
||||
struct base_cast
|
||||
{
|
||||
typedef typename
|
||||
mpl::if_<
|
||||
is_const<D>,
|
||||
const B,
|
||||
B
|
||||
>::type type;
|
||||
BOOST_STATIC_ASSERT(is_const<type>::value == is_const<D>::value);
|
||||
};
|
||||
|
||||
// only register void casts if the types are polymorphic
|
||||
template<class Base, class Derived>
|
||||
struct base_register
|
||||
{
|
||||
struct polymorphic {
|
||||
static void const * invoke(){
|
||||
Base const * const b = 0;
|
||||
Derived const * const d = 0;
|
||||
return & void_cast_register(d, b);
|
||||
}
|
||||
};
|
||||
struct non_polymorphic {
|
||||
static void const * invoke(){
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
static void const * invoke(){
|
||||
typedef typename mpl::eval_if<
|
||||
is_polymorphic<Base>,
|
||||
mpl::identity<polymorphic>,
|
||||
mpl::identity<non_polymorphic>
|
||||
>::type type;
|
||||
return type::invoke();
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
template<class Base, class Derived>
|
||||
typename detail::base_cast<Base, Derived>::type &
|
||||
base_object(Derived &d)
|
||||
{
|
||||
BOOST_STATIC_ASSERT(( is_base_and_derived<Base,Derived>::value));
|
||||
BOOST_STATIC_ASSERT(! is_pointer<Derived>::value);
|
||||
typedef typename detail::base_cast<Base, Derived>::type type;
|
||||
detail::base_register<type, Derived>::invoke();
|
||||
return access::cast_reference<type, Derived>(d);
|
||||
}
|
||||
|
||||
} // namespace serialization
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_SERIALIZATION_BASE_OBJECT_HPP
|
||||
@@ -0,0 +1,624 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright 2012 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_0.txt)
|
||||
|
||||
#ifndef BOOST_MP_NO_ET_OPS_HPP
|
||||
#define BOOST_MP_NO_ET_OPS_HPP
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4714)
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace multiprecision{
|
||||
|
||||
//
|
||||
// Operators for non-expression template enabled number.
|
||||
// NOTE: this is not a complete header - really just a suffix to default_ops.hpp.
|
||||
// NOTE: these operators have to be defined after the methods in default_ops.hpp.
|
||||
//
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE number<B, et_off> operator - (const number<B, et_off>& v)
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG(is_signed_number<B>::value, "Negating an unsigned type results in ill-defined behavior.");
|
||||
number<B, et_off> result(v);
|
||||
result.backend().negate();
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE number<B, et_off> operator ~ (const number<B, et_off>& v)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
eval_complement(result.backend(), v.backend());
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
//
|
||||
// Addition:
|
||||
//
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE number<B, et_off> operator + (const number<B, et_off>& a, const number<B, et_off>& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_add;
|
||||
eval_add(result.backend(), a.backend(), b.backend());
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
template <class B, class V>
|
||||
BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
|
||||
operator + (const number<B, et_off>& a, const V& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_add;
|
||||
eval_add(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
template <class V, class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
|
||||
operator + (const V& a, const number<B, et_off>& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_add;
|
||||
eval_add(result.backend(), b.backend(), number<B, et_off>::canonical_value(a));
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
//
|
||||
// Subtraction:
|
||||
//
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE number<B, et_off> operator - (const number<B, et_off>& a, const number<B, et_off>& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_subtract;
|
||||
eval_subtract(result.backend(), a.backend(), b.backend());
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
template <class B, class V>
|
||||
BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
|
||||
operator - (const number<B, et_off>& a, const V& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_subtract;
|
||||
eval_subtract(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
template <class V, class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
|
||||
operator - (const V& a, const number<B, et_off>& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_subtract;
|
||||
eval_subtract(result.backend(), number<B, et_off>::canonical_value(a), b.backend());
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
//
|
||||
// Multiply:
|
||||
//
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE number<B, et_off> operator * (const number<B, et_off>& a, const number<B, et_off>& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_multiply;
|
||||
eval_multiply(result.backend(), a.backend(), b.backend());
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
template <class B, class V>
|
||||
BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
|
||||
operator * (const number<B, et_off>& a, const V& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_multiply;
|
||||
eval_multiply(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
template <class V, class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
|
||||
operator * (const V& a, const number<B, et_off>& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_multiply;
|
||||
eval_multiply(result.backend(), b.backend(), number<B, et_off>::canonical_value(a));
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
//
|
||||
// divide:
|
||||
//
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE number<B, et_off> operator / (const number<B, et_off>& a, const number<B, et_off>& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_divide;
|
||||
eval_divide(result.backend(), a.backend(), b.backend());
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
template <class B, class V>
|
||||
BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
|
||||
operator / (const number<B, et_off>& a, const V& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_divide;
|
||||
eval_divide(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
template <class V, class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
|
||||
operator / (const V& a, const number<B, et_off>& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_divide;
|
||||
eval_divide(result.backend(), number<B, et_off>::canonical_value(a), b.backend());
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
//
|
||||
// modulus:
|
||||
//
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator % (const number<B, et_off>& a, const number<B, et_off>& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_modulus;
|
||||
eval_modulus(result.backend(), a.backend(), b.backend());
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
template <class B, class V>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator % (const number<B, et_off>& a, const V& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_modulus;
|
||||
eval_modulus(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
template <class V, class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator % (const V& a, const number<B, et_off>& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_modulus;
|
||||
eval_modulus(result.backend(), number<B, et_off>::canonical_value(a), b.backend());
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
//
|
||||
// Bitwise or:
|
||||
//
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator | (const number<B, et_off>& a, const number<B, et_off>& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_bitwise_or;
|
||||
eval_bitwise_or(result.backend(), a.backend(), b.backend());
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
template <class B, class V>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator | (const number<B, et_off>& a, const V& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_bitwise_or;
|
||||
eval_bitwise_or(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
template <class V, class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator | (const V& a, const number<B, et_off>& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_bitwise_or;
|
||||
eval_bitwise_or(result.backend(), b.backend(), number<B, et_off>::canonical_value(a));
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
//
|
||||
// Bitwise xor:
|
||||
//
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ^ (const number<B, et_off>& a, const number<B, et_off>& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_bitwise_xor;
|
||||
eval_bitwise_xor(result.backend(), a.backend(), b.backend());
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
template <class B, class V>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator ^ (const number<B, et_off>& a, const V& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_bitwise_xor;
|
||||
eval_bitwise_xor(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
template <class V, class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator ^ (const V& a, const number<B, et_off>& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_bitwise_xor;
|
||||
eval_bitwise_xor(result.backend(), b.backend(), number<B, et_off>::canonical_value(a));
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
//
|
||||
// Bitwise and:
|
||||
//
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator & (const number<B, et_off>& a, const number<B, et_off>& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_bitwise_and;
|
||||
eval_bitwise_and(result.backend(), a.backend(), b.backend());
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
template <class B, class V>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator & (const number<B, et_off>& a, const V& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_bitwise_and;
|
||||
eval_bitwise_and(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
template <class V, class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator & (const V& a, const number<B, et_off>& b)
|
||||
{
|
||||
number<B, et_off> result;
|
||||
using default_ops::eval_bitwise_and;
|
||||
eval_bitwise_and(result.backend(), b.backend(), number<B, et_off>::canonical_value(a));
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
//
|
||||
// shifts:
|
||||
//
|
||||
template <class B, class I>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator << (const number<B, et_off>& a, const I& b)
|
||||
{
|
||||
number<B, et_off> result(a);
|
||||
using default_ops::eval_left_shift;
|
||||
detail::check_shift_range(b, mpl::bool_<(sizeof(I) > sizeof(std::size_t))>(), is_signed<I>());
|
||||
eval_left_shift(result.backend(), b);
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
template <class B, class I>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator >> (const number<B, et_off>& a, const I& b)
|
||||
{
|
||||
number<B, et_off> result(a);
|
||||
using default_ops::eval_right_shift;
|
||||
detail::check_shift_range(b, mpl::bool_<(sizeof(I) > sizeof(std::size_t))>(), is_signed<I>());
|
||||
eval_right_shift(result.backend(), b);
|
||||
return BOOST_MP_MOVE(result);
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !(defined(__GNUC__) && ((__GNUC__ == 4) && (__GNUC_MINOR__ < 5)))
|
||||
//
|
||||
// If we have rvalue references go all over again with rvalue ref overloads and move semantics.
|
||||
// Note that while it would be tempting to implement these so they return an rvalue reference
|
||||
// (and indeed this would be optimally efficient), this is unsafe due to users propensity to
|
||||
// write:
|
||||
//
|
||||
// const T& t = a * b;
|
||||
//
|
||||
// which would lead to a dangling reference if we didn't return by value. Of course move
|
||||
// semantics help a great deal in return by value, so performance is still pretty good...
|
||||
//
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE number<B, et_off> operator - (number<B, et_off>&& v)
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG(is_signed_number<B>::value, "Negating an unsigned type results in ill-defined behavior.");
|
||||
v.backend().negate();
|
||||
return static_cast<number<B, et_off>&&>(v);
|
||||
}
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ~ (number<B, et_off>&& v)
|
||||
{
|
||||
eval_complement(v.backend(), v.backend());
|
||||
return static_cast<number<B, et_off>&&>(v);
|
||||
}
|
||||
//
|
||||
// Addition:
|
||||
//
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE number<B, et_off> operator + (number<B, et_off>&& a, const number<B, et_off>& b)
|
||||
{
|
||||
using default_ops::eval_add;
|
||||
eval_add(a.backend(), b.backend());
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE number<B, et_off> operator + (const number<B, et_off>& a, number<B, et_off>&& b)
|
||||
{
|
||||
using default_ops::eval_add;
|
||||
eval_add(b.backend(), a.backend());
|
||||
return static_cast<number<B, et_off>&&>(b);
|
||||
}
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE number<B, et_off> operator + (number<B, et_off>&& a, number<B, et_off>&& b)
|
||||
{
|
||||
using default_ops::eval_add;
|
||||
eval_add(a.backend(), b.backend());
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class B, class V>
|
||||
BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
|
||||
operator + (number<B, et_off>&& a, const V& b)
|
||||
{
|
||||
using default_ops::eval_add;
|
||||
eval_add(a.backend(), number<B, et_off>::canonical_value(b));
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class V, class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
|
||||
operator + (const V& a, number<B, et_off>&& b)
|
||||
{
|
||||
using default_ops::eval_add;
|
||||
eval_add(b.backend(), number<B, et_off>::canonical_value(a));
|
||||
return static_cast<number<B, et_off>&&>(b);
|
||||
}
|
||||
//
|
||||
// Subtraction:
|
||||
//
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE number<B, et_off> operator - (number<B, et_off>&& a, const number<B, et_off>& b)
|
||||
{
|
||||
using default_ops::eval_subtract;
|
||||
eval_subtract(a.backend(), b.backend());
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if<is_signed_number<B>, number<B, et_off> >::type operator - (const number<B, et_off>& a, number<B, et_off>&& b)
|
||||
{
|
||||
using default_ops::eval_subtract;
|
||||
eval_subtract(b.backend(), a.backend());
|
||||
b.backend().negate();
|
||||
return static_cast<number<B, et_off>&&>(b);
|
||||
}
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE number<B, et_off> operator - (number<B, et_off>&& a, number<B, et_off>&& b)
|
||||
{
|
||||
using default_ops::eval_subtract;
|
||||
eval_subtract(a.backend(), b.backend());
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class B, class V>
|
||||
BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
|
||||
operator - (number<B, et_off>&& a, const V& b)
|
||||
{
|
||||
using default_ops::eval_subtract;
|
||||
eval_subtract(a.backend(), number<B, et_off>::canonical_value(b));
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class V, class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<(is_compatible_arithmetic_type<V, number<B, et_off> >::value && is_signed_number<B>::value), number<B, et_off> >::type
|
||||
operator - (const V& a, number<B, et_off>&& b)
|
||||
{
|
||||
using default_ops::eval_subtract;
|
||||
eval_subtract(b.backend(), number<B, et_off>::canonical_value(a));
|
||||
b.backend().negate();
|
||||
return static_cast<number<B, et_off>&&>(b);
|
||||
}
|
||||
//
|
||||
// Multiply:
|
||||
//
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE number<B, et_off> operator * (number<B, et_off>&& a, const number<B, et_off>& b)
|
||||
{
|
||||
using default_ops::eval_multiply;
|
||||
eval_multiply(a.backend(), b.backend());
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE number<B, et_off> operator * (const number<B, et_off>& a, number<B, et_off>&& b)
|
||||
{
|
||||
using default_ops::eval_multiply;
|
||||
eval_multiply(b.backend(), a.backend());
|
||||
return static_cast<number<B, et_off>&&>(b);
|
||||
}
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE number<B, et_off> operator * (number<B, et_off>&& a, number<B, et_off>&& b)
|
||||
{
|
||||
using default_ops::eval_multiply;
|
||||
eval_multiply(a.backend(), b.backend());
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class B, class V>
|
||||
BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
|
||||
operator * (number<B, et_off>&& a, const V& b)
|
||||
{
|
||||
using default_ops::eval_multiply;
|
||||
eval_multiply(a.backend(), number<B, et_off>::canonical_value(b));
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class V, class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
|
||||
operator * (const V& a, number<B, et_off>&& b)
|
||||
{
|
||||
using default_ops::eval_multiply;
|
||||
eval_multiply(b.backend(), number<B, et_off>::canonical_value(a));
|
||||
return static_cast<number<B, et_off>&&>(b);
|
||||
}
|
||||
//
|
||||
// divide:
|
||||
//
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE number<B, et_off> operator / (number<B, et_off>&& a, const number<B, et_off>& b)
|
||||
{
|
||||
using default_ops::eval_divide;
|
||||
eval_divide(a.backend(), b.backend());
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class B, class V>
|
||||
BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
|
||||
operator / (number<B, et_off>&& a, const V& b)
|
||||
{
|
||||
using default_ops::eval_divide;
|
||||
eval_divide(a.backend(), number<B, et_off>::canonical_value(b));
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
//
|
||||
// modulus:
|
||||
//
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator % (number<B, et_off>&& a, const number<B, et_off>& b)
|
||||
{
|
||||
using default_ops::eval_modulus;
|
||||
eval_modulus(a.backend(), b.backend());
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class B, class V>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator % (number<B, et_off>&& a, const V& b)
|
||||
{
|
||||
using default_ops::eval_modulus;
|
||||
eval_modulus(a.backend(), number<B, et_off>::canonical_value(b));
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
//
|
||||
// Bitwise or:
|
||||
//
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator | (number<B, et_off>&& a, const number<B, et_off>& b)
|
||||
{
|
||||
using default_ops::eval_bitwise_or;
|
||||
eval_bitwise_or(a.backend(), b.backend());
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator | (const number<B, et_off>& a, number<B, et_off>&& b)
|
||||
{
|
||||
using default_ops::eval_bitwise_or;
|
||||
eval_bitwise_or(b.backend(), a.backend());
|
||||
return static_cast<number<B, et_off>&&>(b);
|
||||
}
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator | (number<B, et_off>&& a, number<B, et_off>&& b)
|
||||
{
|
||||
using default_ops::eval_bitwise_or;
|
||||
eval_bitwise_or(a.backend(), b.backend());
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class B, class V>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator | (number<B, et_off>&& a, const V& b)
|
||||
{
|
||||
using default_ops::eval_bitwise_or;
|
||||
eval_bitwise_or(a.backend(), number<B, et_off>::canonical_value(b));
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class V, class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator | (const V& a, number<B, et_off>&& b)
|
||||
{
|
||||
using default_ops::eval_bitwise_or;
|
||||
eval_bitwise_or(b.backend(), number<B, et_off>::canonical_value(a));
|
||||
return static_cast<number<B, et_off>&&>(b);
|
||||
}
|
||||
//
|
||||
// Bitwise xor:
|
||||
//
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ^ (number<B, et_off>&& a, const number<B, et_off>& b)
|
||||
{
|
||||
using default_ops::eval_bitwise_xor;
|
||||
eval_bitwise_xor(a.backend(), b.backend());
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ^ (const number<B, et_off>& a, number<B, et_off>&& b)
|
||||
{
|
||||
using default_ops::eval_bitwise_xor;
|
||||
eval_bitwise_xor(b.backend(), a.backend());
|
||||
return static_cast<number<B, et_off>&&>(b);
|
||||
}
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ^ (number<B, et_off>&& a, number<B, et_off>&& b)
|
||||
{
|
||||
using default_ops::eval_bitwise_xor;
|
||||
eval_bitwise_xor(a.backend(), b.backend());
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class B, class V>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator ^ (number<B, et_off>&& a, const V& b)
|
||||
{
|
||||
using default_ops::eval_bitwise_xor;
|
||||
eval_bitwise_xor(a.backend(), number<B, et_off>::canonical_value(b));
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class V, class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator ^ (const V& a, number<B, et_off>&& b)
|
||||
{
|
||||
using default_ops::eval_bitwise_xor;
|
||||
eval_bitwise_xor(b.backend(), number<B, et_off>::canonical_value(a));
|
||||
return static_cast<number<B, et_off>&&>(b);
|
||||
}
|
||||
//
|
||||
// Bitwise and:
|
||||
//
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator & (number<B, et_off>&& a, const number<B, et_off>& b)
|
||||
{
|
||||
using default_ops::eval_bitwise_and;
|
||||
eval_bitwise_and(a.backend(), b.backend());
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator & (const number<B, et_off>& a, number<B, et_off>&& b)
|
||||
{
|
||||
using default_ops::eval_bitwise_and;
|
||||
eval_bitwise_and(b.backend(), a.backend());
|
||||
return static_cast<number<B, et_off>&&>(b);
|
||||
}
|
||||
template <class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator & (number<B, et_off>&& a, number<B, et_off>&& b)
|
||||
{
|
||||
using default_ops::eval_bitwise_and;
|
||||
eval_bitwise_and(a.backend(), b.backend());
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class B, class V>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator & (number<B, et_off>&& a, const V& b)
|
||||
{
|
||||
using default_ops::eval_bitwise_and;
|
||||
eval_bitwise_and(a.backend(), number<B, et_off>::canonical_value(b));
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class V, class B>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator & (const V& a, number<B, et_off>&& b)
|
||||
{
|
||||
using default_ops::eval_bitwise_and;
|
||||
eval_bitwise_and(b.backend(), number<B, et_off>::canonical_value(a));
|
||||
return static_cast<number<B, et_off>&&>(b);
|
||||
}
|
||||
//
|
||||
// shifts:
|
||||
//
|
||||
template <class B, class I>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator << (number<B, et_off>&& a, const I& b)
|
||||
{
|
||||
using default_ops::eval_left_shift;
|
||||
eval_left_shift(a.backend(), b);
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
template <class B, class I>
|
||||
BOOST_MP_FORCEINLINE typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
|
||||
operator >> (number<B, et_off>&& a, const I& b)
|
||||
{
|
||||
using default_ops::eval_right_shift;
|
||||
eval_right_shift(a.backend(), b);
|
||||
return static_cast<number<B, et_off>&&>(a);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
}} // namespaces
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MP_NO_ET_OPS_HPP
|
||||
@@ -0,0 +1,29 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2014-2015 Kohei Takahashi
|
||||
|
||||
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 FUSION_IS_SAME_SIZE_10082015_1156
|
||||
#define FUSION_IS_SAME_SIZE_10082015_1156
|
||||
|
||||
#include <boost/fusion/support/is_sequence.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/equal_to.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template <typename Sequence1, typename Sequence2, typename = void, typename = void>
|
||||
struct is_same_size : mpl::false_ {};
|
||||
|
||||
template <typename Sequence1, typename Sequence2>
|
||||
struct is_same_size<Sequence1, Sequence2,
|
||||
typename enable_if<traits::is_sequence<Sequence1> >::type,
|
||||
typename enable_if<traits::is_sequence<Sequence2> >::type>
|
||||
: mpl::equal_to<result_of::size<Sequence1>, result_of::size<Sequence2> >
|
||||
{};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,96 @@
|
||||
subroutine sync9(ss,nzhsym,lag1,lag2,ia,ib,ccfred,red2,ipkbest)
|
||||
|
||||
include 'constants.f90'
|
||||
real ss(184,NSMAX)
|
||||
real ss1(184)
|
||||
real ccfred(NSMAX)
|
||||
real savg(NSMAX)
|
||||
real savg2(NSMAX)
|
||||
real smo(-5:25)
|
||||
real sq(NSMAX)
|
||||
real red2(NSMAX)
|
||||
character*27 cr
|
||||
data cr/'(C) 2016, Joe Taylor - K1JT'/
|
||||
include 'jt9sync.f90'
|
||||
|
||||
ipk=0
|
||||
ipkbest=0
|
||||
sbest=0.
|
||||
ccfred=0.
|
||||
|
||||
do i=ia,ib !Loop over freq range
|
||||
ss1=ss(1:184,i)
|
||||
call pctile(ss1,nzhsym,40,xmed)
|
||||
|
||||
ss1=ss1/xmed - 1.0
|
||||
do j=1,nzhsym
|
||||
if(ss1(j).gt.3.0) ss1(j)=3.0
|
||||
enddo
|
||||
|
||||
call pctile(ss1,nzhsym,45,sbase)
|
||||
ss1=ss1-sbase
|
||||
sq0=dot_product(ss1(1:nzhsym),ss1(1:nzhsym))
|
||||
rms=sqrt(sq0/(nzhsym-1))
|
||||
|
||||
smax=0.
|
||||
do lag=lag1,lag2 !DT = 2.5 to 5.0 s
|
||||
sum1=0.
|
||||
sq2=sq0
|
||||
nsum=nzhsym
|
||||
do j=1,16 !Sum over 16 sync symbols
|
||||
k=ii2(j) + lag
|
||||
if(k.ge.1 .and. k.le.nzhsym) then
|
||||
sum1=sum1 + ss1(k)
|
||||
sq2=sq2 - ss1(k)*ss1(k)
|
||||
nsum=nsum-1
|
||||
endif
|
||||
enddo
|
||||
if(sum1.gt.smax) then
|
||||
smax=sum1
|
||||
ipk=i
|
||||
endif
|
||||
rms=sqrt(sq2/(nsum-1))
|
||||
enddo
|
||||
ccfred(i)=smax !Best at this freq, over all lags
|
||||
if(smax.gt.sbest) then
|
||||
sbest=smax
|
||||
ipkbest=ipk
|
||||
endif
|
||||
enddo
|
||||
|
||||
call pctile(ccfred(ia),ib-ia+1,50,xmed)
|
||||
if(xmed.le.0.0) xmed=1.0
|
||||
ccfred=2.0*ccfred/xmed
|
||||
|
||||
savg=0.
|
||||
do j=1,nzhsym
|
||||
savg(ia:ib)=savg(ia:ib) + ss(j,ia:ib)
|
||||
enddo
|
||||
savg(ia:ib)=savg(ia:ib)/nzhsym
|
||||
smo(0:20)=1.0/21.0
|
||||
smo(-5:-1)=-(1.0/21.0)*(21.0/10.0)
|
||||
smo(21:25)=smo(-5)
|
||||
|
||||
do i=ia,ib
|
||||
sm=0.
|
||||
do j=-5,25
|
||||
if(i+j.ge.1 .and. i+j.lt.NSMAX) sm=sm + smo(j)*savg(i+j)
|
||||
enddo
|
||||
savg2(i)=sm
|
||||
sq(i)=sm*sm
|
||||
enddo
|
||||
|
||||
call pctile(sq(ia:ib),ib-ia+1,20,sq0)
|
||||
rms=sqrt(sq0)
|
||||
savg2(ia:ib)=savg2(ia:ib)/(5.0*rms)
|
||||
|
||||
red2=0.
|
||||
do i=ia+11,ib-10
|
||||
ref=max(savg2(i-10),savg2(i+10))
|
||||
red2(i)=savg2(i)-ref
|
||||
if(red2(i).lt.-99.0) red2(i)=-99.0
|
||||
if(red2(i).gt.99.0) red2(i)=99.0
|
||||
enddo
|
||||
|
||||
return
|
||||
end subroutine sync9
|
||||
@@ -0,0 +1,77 @@
|
||||
#ifndef DATE_CLOCK_DEVICE_HPP___
|
||||
#define DATE_CLOCK_DEVICE_HPP___
|
||||
|
||||
/* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc.
|
||||
* Use, modification and distribution is subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
* Author: Jeff Garland, Bart Garst
|
||||
* $Date$
|
||||
*/
|
||||
|
||||
#include "boost/date_time/c_time.hpp"
|
||||
|
||||
|
||||
namespace boost {
|
||||
namespace date_time {
|
||||
|
||||
//! A clock providing day level services based on C time_t capabilities
|
||||
/*! This clock uses Posix interfaces as its implementation and hence
|
||||
* uses the timezone settings of the operating system. Incorrect
|
||||
* user settings will result in incorrect results for the calls
|
||||
* to local_day.
|
||||
*/
|
||||
template<class date_type>
|
||||
class day_clock
|
||||
{
|
||||
public:
|
||||
typedef typename date_type::ymd_type ymd_type;
|
||||
//! Get the local day as a date type
|
||||
static date_type local_day()
|
||||
{
|
||||
return date_type(local_day_ymd());
|
||||
}
|
||||
//! Get the local day as a ymd_type
|
||||
static typename date_type::ymd_type local_day_ymd()
|
||||
{
|
||||
::std::tm result;
|
||||
::std::tm* curr = get_local_time(result);
|
||||
return ymd_type(static_cast<unsigned short>(curr->tm_year + 1900),
|
||||
static_cast<unsigned short>(curr->tm_mon + 1),
|
||||
static_cast<unsigned short>(curr->tm_mday));
|
||||
}
|
||||
//! Get the current day in universal date as a ymd_type
|
||||
static typename date_type::ymd_type universal_day_ymd()
|
||||
{
|
||||
::std::tm result;
|
||||
::std::tm* curr = get_universal_time(result);
|
||||
return ymd_type(static_cast<unsigned short>(curr->tm_year + 1900),
|
||||
static_cast<unsigned short>(curr->tm_mon + 1),
|
||||
static_cast<unsigned short>(curr->tm_mday));
|
||||
}
|
||||
//! Get the UTC day as a date type
|
||||
static date_type universal_day()
|
||||
{
|
||||
return date_type(universal_day_ymd());
|
||||
}
|
||||
|
||||
private:
|
||||
static ::std::tm* get_local_time(std::tm& result)
|
||||
{
|
||||
::std::time_t t;
|
||||
::std::time(&t);
|
||||
return c_time::localtime(&t, &result);
|
||||
}
|
||||
static ::std::tm* get_universal_time(std::tm& result)
|
||||
{
|
||||
::std::time_t t;
|
||||
::std::time(&t);
|
||||
return c_time::gmtime(&t, &result);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
} } //namespace date_time
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,147 @@
|
||||
subroutine genmsk144(msg0,mygrid,ichk,bcontest,msgsent,i4tone,itype)
|
||||
! s8 + 48bits + s8 + 80 bits = 144 bits (72ms message duration)
|
||||
!
|
||||
! Encode an MSK144 message
|
||||
! Input:
|
||||
! - msg0 requested message to be transmitted
|
||||
! - ichk if ichk=1, return only msgsent
|
||||
! if ichk.ge.10000, set imsg=ichk-10000 for short msg
|
||||
! - msgsent message as it will be decoded
|
||||
! - i4tone array of audio tone values, 0 or 1
|
||||
! - itype message type
|
||||
! 1 = standard message "Call_1 Call_2 Grid/Rpt"
|
||||
! 2 = type 1 prefix
|
||||
! 3 = type 1 suffix
|
||||
! 4 = type 2 prefix
|
||||
! 5 = type 2 suffix
|
||||
! 6 = free text (up to 13 characters)
|
||||
! 7 = short message "<Call_1 Call2> Rpt"
|
||||
|
||||
use iso_c_binding, only: c_loc,c_size_t
|
||||
use packjt
|
||||
use hashing
|
||||
character*22 msg0
|
||||
character*22 message !Message to be generated
|
||||
character*22 msgsent !Message as it will be received
|
||||
character*6 mygrid
|
||||
integer*4 i4Msg6BitWords(13) !72-bit message as 6-bit words
|
||||
integer*4 i4tone(144) !
|
||||
integer*1, target:: i1Msg8BitBytes(10) !80 bits represented in 10 bytes
|
||||
integer*1 codeword(128) !Encoded bits before re-ordering
|
||||
integer*1 msgbits(80) !72-bit message + 8-bit hash
|
||||
integer*1 bitseq(144) !Tone #s, data and sync (values 0-1)
|
||||
integer*1 i1hash(4)
|
||||
integer*1 s8(8)
|
||||
logical bcontest
|
||||
real*8 pp(12)
|
||||
real*8 xi(864),xq(864),pi,twopi
|
||||
data s8/0,1,1,1,0,0,1,0/
|
||||
equivalence (ihash,i1hash)
|
||||
logical first
|
||||
data first/.true./
|
||||
save
|
||||
|
||||
if(first) then
|
||||
first=.false.
|
||||
nsym=128
|
||||
pi=4.0*atan(1.0)
|
||||
twopi=8.*atan(1.0)
|
||||
do i=1,12
|
||||
pp(i)=sin((i-1)*pi/12)
|
||||
enddo
|
||||
endif
|
||||
|
||||
if(msg0(1:1).eq.'@') then !Generate a fixed tone
|
||||
read(msg0(2:5),*,end=1,err=1) nfreq !at specified frequency
|
||||
go to 2
|
||||
1 nfreq=1000
|
||||
2 i4tone(1)=nfreq
|
||||
else
|
||||
message=msg0
|
||||
do i=1,22
|
||||
if(ichar(message(i:i)).eq.0) then
|
||||
message(i:)=' '
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
|
||||
do i=1,22 !Strip leading blanks
|
||||
if(message(1:1).ne.' ') exit
|
||||
message=message(i+1:)
|
||||
enddo
|
||||
|
||||
if(message(1:1).eq.'<') then
|
||||
call genmsk40(message,msgsent,ichk,i4tone,itype)
|
||||
if(itype.lt.0) go to 999
|
||||
i4tone(41)=-40
|
||||
go to 999
|
||||
endif
|
||||
|
||||
call packmsg(message,i4Msg6BitWords,itype,bcontest) !Pack into 12 6-bit bytes
|
||||
call unpackmsg(i4Msg6BitWords,msgsent,bcontest,mygrid) !Unpack to get msgsent
|
||||
|
||||
if(ichk.eq.1) go to 999
|
||||
i4=0
|
||||
ik=0
|
||||
im=0
|
||||
do i=1,12
|
||||
nn=i4Msg6BitWords(i)
|
||||
do j=1, 6
|
||||
ik=ik+1
|
||||
i4=i4+i4+iand(1,ishft(nn,j-6))
|
||||
i4=iand(i4,255)
|
||||
if(ik.eq.8) then
|
||||
im=im+1
|
||||
i1Msg8BitBytes(im)=i4
|
||||
ik=0
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
|
||||
ihash=nhash(c_loc(i1Msg8BitBytes),int(9,c_size_t),146)
|
||||
ihash=2*iand(ihash,32767) !Generate the 8-bit hash
|
||||
i1Msg8BitBytes(10)=i1hash(1) !CRC to byte 10
|
||||
|
||||
mbit=0
|
||||
do i=1, 10
|
||||
i1=i1Msg8BitBytes(i)
|
||||
do ibit=1,8
|
||||
mbit=mbit+1
|
||||
msgbits(mbit)=iand(1,ishft(i1,ibit-8))
|
||||
enddo
|
||||
enddo
|
||||
|
||||
call encode_msk144(msgbits,codeword)
|
||||
|
||||
!Create 144-bit channel vector:
|
||||
!8-bit sync word + 48 bits + 8-bit sync word + 80 bits
|
||||
bitseq=0
|
||||
bitseq(1:8)=s8
|
||||
bitseq(9:56)=codeword(1:48)
|
||||
bitseq(57:64)=s8
|
||||
bitseq(65:144)=codeword(49:128)
|
||||
bitseq=2*bitseq-1
|
||||
|
||||
xq(1:6)=bitseq(1)*pp(7:12) !first bit is mapped to 1st half-symbol on q
|
||||
do i=1,71
|
||||
is=(i-1)*12+7
|
||||
xq(is:is+11)=bitseq(2*i+1)*pp
|
||||
enddo
|
||||
xq(864-5:864)=bitseq(1)*pp(1:6) !last half symbol
|
||||
do i=1,72
|
||||
is=(i-1)*12+1
|
||||
xi(is:is+11)=bitseq(2*i)*pp
|
||||
enddo
|
||||
! Map I and Q to tones.
|
||||
i4tone=0
|
||||
do i=1,72
|
||||
i4tone(2*i-1)=(bitseq(2*i)*bitseq(2*i-1)+1)/2;
|
||||
i4tone(2*i)=-(bitseq(2*i)*bitseq(mod(2*i,144)+1)-1)/2;
|
||||
enddo
|
||||
endif
|
||||
|
||||
! Flip polarity
|
||||
i4tone=-i4tone+1
|
||||
|
||||
999 return
|
||||
end subroutine genmsk144
|
||||
@@ -0,0 +1,809 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// \file basic_expr.hpp
|
||||
/// Contains definition of basic_expr\<\> class template.
|
||||
//
|
||||
// Copyright 2008 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)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename Tag, typename Arg0>
|
||||
struct basic_expr<Tag, term<Arg0>, 0>
|
||||
{
|
||||
typedef Tag proto_tag;
|
||||
static const long proto_arity_c = 0;
|
||||
typedef mpl::long_<0 > proto_arity;
|
||||
typedef basic_expr proto_base_expr;
|
||||
typedef term<Arg0> proto_args;
|
||||
typedef basic_expr proto_grammar;
|
||||
typedef basic_default_domain proto_domain;
|
||||
typedef default_generator proto_generator;
|
||||
typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
|
||||
typedef basic_expr proto_derived_expr;
|
||||
typedef void proto_is_expr_;
|
||||
typedef Arg0 proto_child0; proto_child0 child0;
|
||||
typedef void proto_child1; typedef void proto_child2; typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr const &proto_base() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr &proto_base()
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename A0>
|
||||
BOOST_FORCEINLINE
|
||||
static basic_expr const make(A0 &a0)
|
||||
{
|
||||
return detail::make_terminal(a0, static_cast<basic_expr *>(0), static_cast<proto_args *>(0));
|
||||
}
|
||||
|
||||
|
||||
template<typename A0>
|
||||
BOOST_FORCEINLINE
|
||||
static basic_expr const make(A0 const &a0)
|
||||
{
|
||||
return detail::make_terminal(a0, static_cast<basic_expr *>(0), static_cast<proto_args *>(0));
|
||||
}
|
||||
|
||||
|
||||
typedef detail::not_a_valid_type address_of_hack_type_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename Tag , typename Arg0>
|
||||
struct basic_expr<Tag, list1<Arg0>, 1 >
|
||||
{
|
||||
typedef Tag proto_tag;
|
||||
static const long proto_arity_c = 1;
|
||||
typedef mpl::long_<1 > proto_arity;
|
||||
typedef basic_expr proto_base_expr;
|
||||
typedef list1<Arg0> proto_args;
|
||||
typedef basic_expr proto_grammar;
|
||||
typedef basic_default_domain proto_domain;
|
||||
typedef default_generator proto_generator;
|
||||
typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
|
||||
typedef basic_expr proto_derived_expr;
|
||||
typedef void proto_is_expr_;
|
||||
typedef Arg0 proto_child0; proto_child0 child0;
|
||||
typedef void proto_child1; typedef void proto_child2; typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr const &proto_base() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr &proto_base()
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename A0>
|
||||
BOOST_FORCEINLINE
|
||||
static basic_expr const make(A0 const &a0)
|
||||
{
|
||||
basic_expr that = {a0};
|
||||
return that;
|
||||
}
|
||||
|
||||
|
||||
|
||||
typedef typename detail::address_of_hack<Tag, proto_child0>::type address_of_hack_type_;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
operator address_of_hack_type_() const
|
||||
{
|
||||
return boost::addressof(this->child0);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename Tag , typename Arg0 , typename Arg1>
|
||||
struct basic_expr<Tag, list2<Arg0 , Arg1>, 2 >
|
||||
{
|
||||
typedef Tag proto_tag;
|
||||
static const long proto_arity_c = 2;
|
||||
typedef mpl::long_<2 > proto_arity;
|
||||
typedef basic_expr proto_base_expr;
|
||||
typedef list2<Arg0 , Arg1> proto_args;
|
||||
typedef basic_expr proto_grammar;
|
||||
typedef basic_default_domain proto_domain;
|
||||
typedef default_generator proto_generator;
|
||||
typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
|
||||
typedef basic_expr proto_derived_expr;
|
||||
typedef void proto_is_expr_;
|
||||
typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1;
|
||||
typedef void proto_child2; typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr const &proto_base() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr &proto_base()
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename A0 , typename A1>
|
||||
BOOST_FORCEINLINE
|
||||
static basic_expr const make(A0 const &a0 , A1 const &a1)
|
||||
{
|
||||
basic_expr that = {a0 , a1};
|
||||
return that;
|
||||
}
|
||||
|
||||
|
||||
typedef detail::not_a_valid_type address_of_hack_type_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2>
|
||||
struct basic_expr<Tag, list3<Arg0 , Arg1 , Arg2>, 3 >
|
||||
{
|
||||
typedef Tag proto_tag;
|
||||
static const long proto_arity_c = 3;
|
||||
typedef mpl::long_<3 > proto_arity;
|
||||
typedef basic_expr proto_base_expr;
|
||||
typedef list3<Arg0 , Arg1 , Arg2> proto_args;
|
||||
typedef basic_expr proto_grammar;
|
||||
typedef basic_default_domain proto_domain;
|
||||
typedef default_generator proto_generator;
|
||||
typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
|
||||
typedef basic_expr proto_derived_expr;
|
||||
typedef void proto_is_expr_;
|
||||
typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2;
|
||||
typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr const &proto_base() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr &proto_base()
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename A0 , typename A1 , typename A2>
|
||||
BOOST_FORCEINLINE
|
||||
static basic_expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2)
|
||||
{
|
||||
basic_expr that = {a0 , a1 , a2};
|
||||
return that;
|
||||
}
|
||||
|
||||
|
||||
typedef detail::not_a_valid_type address_of_hack_type_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3>
|
||||
struct basic_expr<Tag, list4<Arg0 , Arg1 , Arg2 , Arg3>, 4 >
|
||||
{
|
||||
typedef Tag proto_tag;
|
||||
static const long proto_arity_c = 4;
|
||||
typedef mpl::long_<4 > proto_arity;
|
||||
typedef basic_expr proto_base_expr;
|
||||
typedef list4<Arg0 , Arg1 , Arg2 , Arg3> proto_args;
|
||||
typedef basic_expr proto_grammar;
|
||||
typedef basic_default_domain proto_domain;
|
||||
typedef default_generator proto_generator;
|
||||
typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
|
||||
typedef basic_expr proto_derived_expr;
|
||||
typedef void proto_is_expr_;
|
||||
typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3;
|
||||
typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr const &proto_base() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr &proto_base()
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename A0 , typename A1 , typename A2 , typename A3>
|
||||
BOOST_FORCEINLINE
|
||||
static basic_expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3)
|
||||
{
|
||||
basic_expr that = {a0 , a1 , a2 , a3};
|
||||
return that;
|
||||
}
|
||||
|
||||
|
||||
typedef detail::not_a_valid_type address_of_hack_type_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4>
|
||||
struct basic_expr<Tag, list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4>, 5 >
|
||||
{
|
||||
typedef Tag proto_tag;
|
||||
static const long proto_arity_c = 5;
|
||||
typedef mpl::long_<5 > proto_arity;
|
||||
typedef basic_expr proto_base_expr;
|
||||
typedef list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4> proto_args;
|
||||
typedef basic_expr proto_grammar;
|
||||
typedef basic_default_domain proto_domain;
|
||||
typedef default_generator proto_generator;
|
||||
typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
|
||||
typedef basic_expr proto_derived_expr;
|
||||
typedef void proto_is_expr_;
|
||||
typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4;
|
||||
typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr const &proto_base() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr &proto_base()
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
|
||||
BOOST_FORCEINLINE
|
||||
static basic_expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4)
|
||||
{
|
||||
basic_expr that = {a0 , a1 , a2 , a3 , a4};
|
||||
return that;
|
||||
}
|
||||
|
||||
|
||||
typedef detail::not_a_valid_type address_of_hack_type_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5>
|
||||
struct basic_expr<Tag, list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5>, 6 >
|
||||
{
|
||||
typedef Tag proto_tag;
|
||||
static const long proto_arity_c = 6;
|
||||
typedef mpl::long_<6 > proto_arity;
|
||||
typedef basic_expr proto_base_expr;
|
||||
typedef list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5> proto_args;
|
||||
typedef basic_expr proto_grammar;
|
||||
typedef basic_default_domain proto_domain;
|
||||
typedef default_generator proto_generator;
|
||||
typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
|
||||
typedef basic_expr proto_derived_expr;
|
||||
typedef void proto_is_expr_;
|
||||
typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5;
|
||||
typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr const &proto_base() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr &proto_base()
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
|
||||
BOOST_FORCEINLINE
|
||||
static basic_expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5)
|
||||
{
|
||||
basic_expr that = {a0 , a1 , a2 , a3 , a4 , a5};
|
||||
return that;
|
||||
}
|
||||
|
||||
|
||||
typedef detail::not_a_valid_type address_of_hack_type_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6>
|
||||
struct basic_expr<Tag, list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6>, 7 >
|
||||
{
|
||||
typedef Tag proto_tag;
|
||||
static const long proto_arity_c = 7;
|
||||
typedef mpl::long_<7 > proto_arity;
|
||||
typedef basic_expr proto_base_expr;
|
||||
typedef list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6> proto_args;
|
||||
typedef basic_expr proto_grammar;
|
||||
typedef basic_default_domain proto_domain;
|
||||
typedef default_generator proto_generator;
|
||||
typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
|
||||
typedef basic_expr proto_derived_expr;
|
||||
typedef void proto_is_expr_;
|
||||
typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6;
|
||||
typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr const &proto_base() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr &proto_base()
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
|
||||
BOOST_FORCEINLINE
|
||||
static basic_expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6)
|
||||
{
|
||||
basic_expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6};
|
||||
return that;
|
||||
}
|
||||
|
||||
|
||||
typedef detail::not_a_valid_type address_of_hack_type_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7>
|
||||
struct basic_expr<Tag, list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7>, 8 >
|
||||
{
|
||||
typedef Tag proto_tag;
|
||||
static const long proto_arity_c = 8;
|
||||
typedef mpl::long_<8 > proto_arity;
|
||||
typedef basic_expr proto_base_expr;
|
||||
typedef list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7> proto_args;
|
||||
typedef basic_expr proto_grammar;
|
||||
typedef basic_default_domain proto_domain;
|
||||
typedef default_generator proto_generator;
|
||||
typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
|
||||
typedef basic_expr proto_derived_expr;
|
||||
typedef void proto_is_expr_;
|
||||
typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6; typedef Arg7 proto_child7; proto_child7 child7;
|
||||
typedef void proto_child8; typedef void proto_child9;
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr const &proto_base() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr &proto_base()
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
|
||||
BOOST_FORCEINLINE
|
||||
static basic_expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7)
|
||||
{
|
||||
basic_expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7};
|
||||
return that;
|
||||
}
|
||||
|
||||
|
||||
typedef detail::not_a_valid_type address_of_hack_type_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8>
|
||||
struct basic_expr<Tag, list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8>, 9 >
|
||||
{
|
||||
typedef Tag proto_tag;
|
||||
static const long proto_arity_c = 9;
|
||||
typedef mpl::long_<9 > proto_arity;
|
||||
typedef basic_expr proto_base_expr;
|
||||
typedef list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8> proto_args;
|
||||
typedef basic_expr proto_grammar;
|
||||
typedef basic_default_domain proto_domain;
|
||||
typedef default_generator proto_generator;
|
||||
typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
|
||||
typedef basic_expr proto_derived_expr;
|
||||
typedef void proto_is_expr_;
|
||||
typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6; typedef Arg7 proto_child7; proto_child7 child7; typedef Arg8 proto_child8; proto_child8 child8;
|
||||
typedef void proto_child9;
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr const &proto_base() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr &proto_base()
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
|
||||
BOOST_FORCEINLINE
|
||||
static basic_expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8)
|
||||
{
|
||||
basic_expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8};
|
||||
return that;
|
||||
}
|
||||
|
||||
|
||||
typedef detail::not_a_valid_type address_of_hack_type_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9>
|
||||
struct basic_expr<Tag, list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9>, 10 >
|
||||
{
|
||||
typedef Tag proto_tag;
|
||||
static const long proto_arity_c = 10;
|
||||
typedef mpl::long_<10 > proto_arity;
|
||||
typedef basic_expr proto_base_expr;
|
||||
typedef list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9> proto_args;
|
||||
typedef basic_expr proto_grammar;
|
||||
typedef basic_default_domain proto_domain;
|
||||
typedef default_generator proto_generator;
|
||||
typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
|
||||
typedef basic_expr proto_derived_expr;
|
||||
typedef void proto_is_expr_;
|
||||
typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6; typedef Arg7 proto_child7; proto_child7 child7; typedef Arg8 proto_child8; proto_child8 child8; typedef Arg9 proto_child9; proto_child9 child9;
|
||||
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr const &proto_base() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
BOOST_FORCEINLINE
|
||||
basic_expr &proto_base()
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
|
||||
BOOST_FORCEINLINE
|
||||
static basic_expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8 , A9 const &a9)
|
||||
{
|
||||
basic_expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9};
|
||||
return that;
|
||||
}
|
||||
|
||||
|
||||
typedef detail::not_a_valid_type address_of_hack_type_;
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
// (C) Copyright 2008-10 Anthony Williams
|
||||
// (C) Copyright 2011-2015 Vicente J. Botet Escriba
|
||||
//
|
||||
// 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_THREAD_FUTURES_LAUNCH_HPP
|
||||
#define BOOST_THREAD_FUTURES_LAUNCH_HPP
|
||||
|
||||
#include <boost/thread/detail/config.hpp>
|
||||
#include <boost/core/scoped_enum.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
//enum class launch
|
||||
BOOST_SCOPED_ENUM_DECLARE_BEGIN(launch)
|
||||
{
|
||||
none = 0,
|
||||
async = 1,
|
||||
deferred = 2,
|
||||
#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
|
||||
executor = 4,
|
||||
#endif
|
||||
inherit = 8,
|
||||
sync = 16,
|
||||
any = async | deferred
|
||||
}
|
||||
BOOST_SCOPED_ENUM_DECLARE_END(launch)
|
||||
}
|
||||
|
||||
#endif // header
|
||||
@@ -0,0 +1,267 @@
|
||||
// Boost.Function library
|
||||
|
||||
// Copyright Douglas Gregor 2003. 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
|
||||
|
||||
#if BOOST_FUNCTION_NUM_ARGS == 0
|
||||
# ifndef BOOST_FUNCTION_0
|
||||
# define BOOST_FUNCTION_0
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 1
|
||||
# ifndef BOOST_FUNCTION_1
|
||||
# define BOOST_FUNCTION_1
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 2
|
||||
# ifndef BOOST_FUNCTION_2
|
||||
# define BOOST_FUNCTION_2
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 3
|
||||
# ifndef BOOST_FUNCTION_3
|
||||
# define BOOST_FUNCTION_3
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 4
|
||||
# ifndef BOOST_FUNCTION_4
|
||||
# define BOOST_FUNCTION_4
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 5
|
||||
# ifndef BOOST_FUNCTION_5
|
||||
# define BOOST_FUNCTION_5
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 6
|
||||
# ifndef BOOST_FUNCTION_6
|
||||
# define BOOST_FUNCTION_6
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 7
|
||||
# ifndef BOOST_FUNCTION_7
|
||||
# define BOOST_FUNCTION_7
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 8
|
||||
# ifndef BOOST_FUNCTION_8
|
||||
# define BOOST_FUNCTION_8
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 9
|
||||
# ifndef BOOST_FUNCTION_9
|
||||
# define BOOST_FUNCTION_9
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 10
|
||||
# ifndef BOOST_FUNCTION_10
|
||||
# define BOOST_FUNCTION_10
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 11
|
||||
# ifndef BOOST_FUNCTION_11
|
||||
# define BOOST_FUNCTION_11
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 12
|
||||
# ifndef BOOST_FUNCTION_12
|
||||
# define BOOST_FUNCTION_12
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 13
|
||||
# ifndef BOOST_FUNCTION_13
|
||||
# define BOOST_FUNCTION_13
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 14
|
||||
# ifndef BOOST_FUNCTION_14
|
||||
# define BOOST_FUNCTION_14
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 15
|
||||
# ifndef BOOST_FUNCTION_15
|
||||
# define BOOST_FUNCTION_15
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 16
|
||||
# ifndef BOOST_FUNCTION_16
|
||||
# define BOOST_FUNCTION_16
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 17
|
||||
# ifndef BOOST_FUNCTION_17
|
||||
# define BOOST_FUNCTION_17
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 18
|
||||
# ifndef BOOST_FUNCTION_18
|
||||
# define BOOST_FUNCTION_18
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 19
|
||||
# ifndef BOOST_FUNCTION_19
|
||||
# define BOOST_FUNCTION_19
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 20
|
||||
# ifndef BOOST_FUNCTION_20
|
||||
# define BOOST_FUNCTION_20
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 21
|
||||
# ifndef BOOST_FUNCTION_21
|
||||
# define BOOST_FUNCTION_21
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 22
|
||||
# ifndef BOOST_FUNCTION_22
|
||||
# define BOOST_FUNCTION_22
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 23
|
||||
# ifndef BOOST_FUNCTION_23
|
||||
# define BOOST_FUNCTION_23
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 24
|
||||
# ifndef BOOST_FUNCTION_24
|
||||
# define BOOST_FUNCTION_24
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 25
|
||||
# ifndef BOOST_FUNCTION_25
|
||||
# define BOOST_FUNCTION_25
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 26
|
||||
# ifndef BOOST_FUNCTION_26
|
||||
# define BOOST_FUNCTION_26
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 27
|
||||
# ifndef BOOST_FUNCTION_27
|
||||
# define BOOST_FUNCTION_27
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 28
|
||||
# ifndef BOOST_FUNCTION_28
|
||||
# define BOOST_FUNCTION_28
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 29
|
||||
# ifndef BOOST_FUNCTION_29
|
||||
# define BOOST_FUNCTION_29
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 30
|
||||
# ifndef BOOST_FUNCTION_30
|
||||
# define BOOST_FUNCTION_30
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 31
|
||||
# ifndef BOOST_FUNCTION_31
|
||||
# define BOOST_FUNCTION_31
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 32
|
||||
# ifndef BOOST_FUNCTION_32
|
||||
# define BOOST_FUNCTION_32
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 33
|
||||
# ifndef BOOST_FUNCTION_33
|
||||
# define BOOST_FUNCTION_33
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 34
|
||||
# ifndef BOOST_FUNCTION_34
|
||||
# define BOOST_FUNCTION_34
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 35
|
||||
# ifndef BOOST_FUNCTION_35
|
||||
# define BOOST_FUNCTION_35
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 36
|
||||
# ifndef BOOST_FUNCTION_36
|
||||
# define BOOST_FUNCTION_36
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 37
|
||||
# ifndef BOOST_FUNCTION_37
|
||||
# define BOOST_FUNCTION_37
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 38
|
||||
# ifndef BOOST_FUNCTION_38
|
||||
# define BOOST_FUNCTION_38
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 39
|
||||
# ifndef BOOST_FUNCTION_39
|
||||
# define BOOST_FUNCTION_39
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 40
|
||||
# ifndef BOOST_FUNCTION_40
|
||||
# define BOOST_FUNCTION_40
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 41
|
||||
# ifndef BOOST_FUNCTION_41
|
||||
# define BOOST_FUNCTION_41
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 42
|
||||
# ifndef BOOST_FUNCTION_42
|
||||
# define BOOST_FUNCTION_42
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 43
|
||||
# ifndef BOOST_FUNCTION_43
|
||||
# define BOOST_FUNCTION_43
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 44
|
||||
# ifndef BOOST_FUNCTION_44
|
||||
# define BOOST_FUNCTION_44
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 45
|
||||
# ifndef BOOST_FUNCTION_45
|
||||
# define BOOST_FUNCTION_45
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 46
|
||||
# ifndef BOOST_FUNCTION_46
|
||||
# define BOOST_FUNCTION_46
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 47
|
||||
# ifndef BOOST_FUNCTION_47
|
||||
# define BOOST_FUNCTION_47
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 48
|
||||
# ifndef BOOST_FUNCTION_48
|
||||
# define BOOST_FUNCTION_48
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 49
|
||||
# ifndef BOOST_FUNCTION_49
|
||||
# define BOOST_FUNCTION_49
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#elif BOOST_FUNCTION_NUM_ARGS == 50
|
||||
# ifndef BOOST_FUNCTION_50
|
||||
# define BOOST_FUNCTION_50
|
||||
# include <boost/function/function_template.hpp>
|
||||
# endif
|
||||
#else
|
||||
# error Cannot handle Boost.Function objects that accept more than 50 arguments!
|
||||
#endif
|
||||
@@ -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_RESISTIVITY_DERIVED_DIMENSION_HPP
|
||||
#define BOOST_UNITS_RESISTIVITY_DERIVED_DIMENSION_HPP
|
||||
|
||||
#include <boost/units/derived_dimension.hpp>
|
||||
#include <boost/units/physical_dimensions/length.hpp>
|
||||
#include <boost/units/physical_dimensions/mass.hpp>
|
||||
#include <boost/units/physical_dimensions/time.hpp>
|
||||
#include <boost/units/physical_dimensions/current.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace units {
|
||||
|
||||
/// derived dimension for resistivity : L^3 M T^-3 I^-2
|
||||
typedef derived_dimension<length_base_dimension,3,
|
||||
mass_base_dimension,1,
|
||||
time_base_dimension,-3,
|
||||
current_base_dimension,-2>::type resistivity_dimension;
|
||||
|
||||
} // namespace units
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_UNITS_RESISTIVITY_DERIVED_DIMENSION_HPP
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/gcc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
// GCC and EDG-based compilers incorrectly reject the following code:
|
||||
// template< typename T, T n > struct a;
|
||||
// template< typename T > struct b;
|
||||
// template< typename T, T n > struct b< a<T,n> > {};
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& ( BOOST_WORKAROUND(__EDG_VERSION__, BOOST_TESTED_AT(300)) \
|
||||
|| BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \
|
||||
)
|
||||
|
||||
# define BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,50 @@
|
||||
#ifndef FASTGRAPH_H
|
||||
#define FASTGRAPH_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace Ui {
|
||||
class FastGraph;
|
||||
}
|
||||
|
||||
class QSettings;
|
||||
|
||||
class FastGraph : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FastGraph(QSettings *, QWidget *parent = 0);
|
||||
~FastGraph ();
|
||||
|
||||
void plotSpec(bool diskData, int UTCdisk);
|
||||
void saveSettings();
|
||||
void setTRperiod(int n);
|
||||
void setMode(QString mode);
|
||||
|
||||
signals:
|
||||
void fastPick(int x0, int x1, int y);
|
||||
|
||||
private slots:
|
||||
void on_gainSlider_valueChanged(int value);
|
||||
void on_zeroSlider_valueChanged(int value);
|
||||
void on_greenZeroSlider_valueChanged(int value);
|
||||
void on_pbAutoLevel_clicked();
|
||||
|
||||
protected:
|
||||
void closeEvent (QCloseEvent *) override;
|
||||
void keyPressEvent( QKeyEvent *e ) override;
|
||||
|
||||
private:
|
||||
QSettings * m_settings;
|
||||
float m_ave;
|
||||
qint32 m_TRperiod;
|
||||
|
||||
QScopedPointer<Ui::FastGraph> ui;
|
||||
};
|
||||
|
||||
extern float fast_green[703];
|
||||
extern int fast_jh;
|
||||
|
||||
#endif // FASTGRAPH_H
|
||||
@@ -0,0 +1,56 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// \file at.hpp
|
||||
/// Proto callables Fusion at
|
||||
//
|
||||
// Copyright 2010 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)
|
||||
|
||||
#ifndef BOOST_PROTO_FUNCTIONAL_FUSION_AT_HPP_EAN_11_27_2010
|
||||
#define BOOST_PROTO_FUNCTIONAL_FUSION_AT_HPP_EAN_11_27_2010
|
||||
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <boost/fusion/include/at.hpp>
|
||||
#include <boost/proto/proto_fwd.hpp>
|
||||
|
||||
namespace boost { namespace proto { namespace functional
|
||||
{
|
||||
/// \brief A PolymorphicFunctionObject type that invokes the
|
||||
/// \c fusion::at() accessor on its argument.
|
||||
///
|
||||
/// A PolymorphicFunctionObject type that invokes the
|
||||
/// \c fusion::at() accessor on its argument.
|
||||
struct at
|
||||
{
|
||||
BOOST_PROTO_CALLABLE()
|
||||
|
||||
template<typename Sig>
|
||||
struct result;
|
||||
|
||||
template<typename This, typename Seq, typename N>
|
||||
struct result<This(Seq, N)>
|
||||
: fusion::result_of::at<
|
||||
typename boost::remove_reference<Seq>::type
|
||||
, typename boost::remove_const<typename boost::remove_reference<N>::type>::type
|
||||
>
|
||||
{};
|
||||
|
||||
template<typename Seq, typename N>
|
||||
typename fusion::result_of::at<Seq, N>::type
|
||||
operator ()(Seq &seq, N const & BOOST_PROTO_DISABLE_IF_IS_CONST(Seq)) const
|
||||
{
|
||||
return fusion::at<N>(seq);
|
||||
}
|
||||
|
||||
template<typename Seq, typename N>
|
||||
typename fusion::result_of::at<Seq const, N>::type
|
||||
operator ()(Seq const &seq, N const &) const
|
||||
{
|
||||
return fusion::at<N>(seq);
|
||||
}
|
||||
};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
// Copyright Eric Friedman 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
#include <boost/mpl/aux_/iter_apply.hpp>
|
||||
#include <boost/mpl/not.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
template< typename Predicate >
|
||||
struct find_if_pred
|
||||
{
|
||||
template< typename Iterator >
|
||||
struct apply
|
||||
{
|
||||
typedef not_< aux::iter_apply1<Predicate,Iterator> > type;
|
||||
};
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED
|
||||
@@ -0,0 +1,297 @@
|
||||
// Copyright 2011 John Maddock. Distributed under the Boost
|
||||
// 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 file has no include guards or namespaces - it's expanded inline inside default_ops.hpp
|
||||
//
|
||||
|
||||
template <class T>
|
||||
void calc_log2(T& num, unsigned digits)
|
||||
{
|
||||
typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type;
|
||||
typedef typename mpl::front<typename T::signed_types>::type si_type;
|
||||
|
||||
//
|
||||
// String value with 1100 digits:
|
||||
//
|
||||
static const char* string_val = "0."
|
||||
"6931471805599453094172321214581765680755001343602552541206800094933936219696947156058633269964186875"
|
||||
"4200148102057068573368552023575813055703267075163507596193072757082837143519030703862389167347112335"
|
||||
"0115364497955239120475172681574932065155524734139525882950453007095326366642654104239157814952043740"
|
||||
"4303855008019441706416715186447128399681717845469570262716310645461502572074024816377733896385506952"
|
||||
"6066834113727387372292895649354702576265209885969320196505855476470330679365443254763274495125040606"
|
||||
"9438147104689946506220167720424524529612687946546193165174681392672504103802546259656869144192871608"
|
||||
"2938031727143677826548775664850856740776484514644399404614226031930967354025744460703080960850474866"
|
||||
"3852313818167675143866747664789088143714198549423151997354880375165861275352916610007105355824987941"
|
||||
"4729509293113897155998205654392871700072180857610252368892132449713893203784393530887748259701715591"
|
||||
"0708823683627589842589185353024363421436706118923678919237231467232172053401649256872747782344535347"
|
||||
"6481149418642386776774406069562657379600867076257199184734022651462837904883062033061144630073719489";
|
||||
//
|
||||
// Check if we can just construct from string:
|
||||
//
|
||||
if(digits < 3640) // 3640 binary digits ~ 1100 decimal digits
|
||||
{
|
||||
num = string_val;
|
||||
return;
|
||||
}
|
||||
//
|
||||
// We calculate log2 from using the formula:
|
||||
//
|
||||
// ln(2) = 3/4 SUM[n>=0] ((-1)^n * N!^2 / (2^n(2n+1)!))
|
||||
//
|
||||
// Numerator and denominator are calculated separately and then
|
||||
// divided at the end, we also precalculate the terms up to n = 5
|
||||
// since these fit in a 32-bit integer anyway.
|
||||
//
|
||||
// See Gourdon, X., and Sebah, P. The logarithmic constant: log 2, Jan. 2004.
|
||||
// Also http://www.mpfr.org/algorithms.pdf.
|
||||
//
|
||||
num = static_cast<ui_type>(1180509120uL);
|
||||
T denom, next_term, temp;
|
||||
denom = static_cast<ui_type>(1277337600uL);
|
||||
next_term = static_cast<ui_type>(120uL);
|
||||
si_type sign = -1;
|
||||
|
||||
ui_type limit = digits / 3 + 1;
|
||||
|
||||
for(ui_type n = 6; n < limit; ++n)
|
||||
{
|
||||
temp = static_cast<ui_type>(2);
|
||||
eval_multiply(temp, ui_type(2 * n));
|
||||
eval_multiply(temp, ui_type(2 * n + 1));
|
||||
eval_multiply(num, temp);
|
||||
eval_multiply(denom, temp);
|
||||
sign = -sign;
|
||||
eval_multiply(next_term, n);
|
||||
eval_multiply(temp, next_term, next_term);
|
||||
if(sign < 0)
|
||||
temp.negate();
|
||||
eval_add(num, temp);
|
||||
}
|
||||
eval_multiply(denom, ui_type(4));
|
||||
eval_multiply(num, ui_type(3));
|
||||
INSTRUMENT_BACKEND(denom);
|
||||
INSTRUMENT_BACKEND(num);
|
||||
eval_divide(num, denom);
|
||||
INSTRUMENT_BACKEND(num);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void calc_e(T& result, unsigned digits)
|
||||
{
|
||||
typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
|
||||
//
|
||||
// 1100 digits in string form:
|
||||
//
|
||||
const char* string_val = "2."
|
||||
"7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274"
|
||||
"2746639193200305992181741359662904357290033429526059563073813232862794349076323382988075319525101901"
|
||||
"1573834187930702154089149934884167509244761460668082264800168477411853742345442437107539077744992069"
|
||||
"5517027618386062613313845830007520449338265602976067371132007093287091274437470472306969772093101416"
|
||||
"9283681902551510865746377211125238978442505695369677078544996996794686445490598793163688923009879312"
|
||||
"7736178215424999229576351482208269895193668033182528869398496465105820939239829488793320362509443117"
|
||||
"3012381970684161403970198376793206832823764648042953118023287825098194558153017567173613320698112509"
|
||||
"9618188159304169035159888851934580727386673858942287922849989208680582574927961048419844436346324496"
|
||||
"8487560233624827041978623209002160990235304369941849146314093431738143640546253152096183690888707016"
|
||||
"7683964243781405927145635490613031072085103837505101157477041718986106873969655212671546889570350354"
|
||||
"0212340784981933432106817012100562788023519303322474501585390473041995777709350366041699732972508869";
|
||||
//
|
||||
// Check if we can just construct from string:
|
||||
//
|
||||
if(digits < 3640) // 3640 binary digits ~ 1100 decimal digits
|
||||
{
|
||||
result = string_val;
|
||||
return;
|
||||
}
|
||||
|
||||
T lim;
|
||||
lim = ui_type(1);
|
||||
eval_ldexp(lim, lim, digits);
|
||||
|
||||
//
|
||||
// Standard evaluation from the definition of e: http://functions.wolfram.com/Constants/E/02/
|
||||
//
|
||||
result = ui_type(2);
|
||||
T denom;
|
||||
denom = ui_type(1);
|
||||
ui_type i = 2;
|
||||
do{
|
||||
eval_multiply(denom, i);
|
||||
eval_multiply(result, i);
|
||||
eval_add(result, ui_type(1));
|
||||
++i;
|
||||
}while(denom.compare(lim) <= 0);
|
||||
eval_divide(result, denom);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void calc_pi(T& result, unsigned digits)
|
||||
{
|
||||
typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
|
||||
typedef typename mpl::front<typename T::float_types>::type real_type;
|
||||
//
|
||||
// 1100 digits in string form:
|
||||
//
|
||||
const char* string_val = "3."
|
||||
"1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679"
|
||||
"8214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196"
|
||||
"4428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273"
|
||||
"7245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094"
|
||||
"3305727036575959195309218611738193261179310511854807446237996274956735188575272489122793818301194912"
|
||||
"9833673362440656643086021394946395224737190702179860943702770539217176293176752384674818467669405132"
|
||||
"0005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235"
|
||||
"4201995611212902196086403441815981362977477130996051870721134999999837297804995105973173281609631859"
|
||||
"5024459455346908302642522308253344685035261931188171010003137838752886587533208381420617177669147303"
|
||||
"5982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989"
|
||||
"3809525720106548586327886593615338182796823030195203530185296899577362259941389124972177528347913152";
|
||||
//
|
||||
// Check if we can just construct from string:
|
||||
//
|
||||
if(digits < 3640) // 3640 binary digits ~ 1100 decimal digits
|
||||
{
|
||||
result = string_val;
|
||||
return;
|
||||
}
|
||||
|
||||
T a;
|
||||
a = ui_type(1);
|
||||
T b;
|
||||
T A(a);
|
||||
T B;
|
||||
B = real_type(0.5f);
|
||||
T D;
|
||||
D = real_type(0.25f);
|
||||
|
||||
T lim;
|
||||
lim = ui_type(1);
|
||||
eval_ldexp(lim, lim, -(int)digits);
|
||||
|
||||
//
|
||||
// This algorithm is from:
|
||||
// Schonhage, A., Grotefeld, A. F. W., and Vetter, E. Fast Algorithms: A Multitape Turing
|
||||
// Machine Implementation. BI Wissenschaftverlag, 1994.
|
||||
// Also described in MPFR's algorithm guide: http://www.mpfr.org/algorithms.pdf.
|
||||
//
|
||||
// Let:
|
||||
// a[0] = A[0] = 1
|
||||
// B[0] = 1/2
|
||||
// D[0] = 1/4
|
||||
// Then:
|
||||
// S[k+1] = (A[k]+B[k]) / 4
|
||||
// b[k] = sqrt(B[k])
|
||||
// a[k+1] = a[k]^2
|
||||
// B[k+1] = 2(A[k+1]-S[k+1])
|
||||
// D[k+1] = D[k] - 2^k(A[k+1]-B[k+1])
|
||||
// Stop when |A[k]-B[k]| <= 2^(k-p)
|
||||
// and PI = B[k]/D[k]
|
||||
|
||||
unsigned k = 1;
|
||||
|
||||
do
|
||||
{
|
||||
eval_add(result, A, B);
|
||||
eval_ldexp(result, result, -2);
|
||||
eval_sqrt(b, B);
|
||||
eval_add(a, b);
|
||||
eval_ldexp(a, a, -1);
|
||||
eval_multiply(A, a, a);
|
||||
eval_subtract(B, A, result);
|
||||
eval_ldexp(B, B, 1);
|
||||
eval_subtract(result, A, B);
|
||||
bool neg = eval_get_sign(result) < 0;
|
||||
if(neg)
|
||||
result.negate();
|
||||
if(result.compare(lim) <= 0)
|
||||
break;
|
||||
if(neg)
|
||||
result.negate();
|
||||
eval_ldexp(result, result, k - 1);
|
||||
eval_subtract(D, result);
|
||||
++k;
|
||||
eval_ldexp(lim, lim, 1);
|
||||
}
|
||||
while(true);
|
||||
|
||||
eval_divide(result, B, D);
|
||||
}
|
||||
|
||||
template <class T, const T& (*F)(void)>
|
||||
struct constant_initializer
|
||||
{
|
||||
static void do_nothing()
|
||||
{
|
||||
init.do_nothing();
|
||||
}
|
||||
private:
|
||||
struct initializer
|
||||
{
|
||||
initializer()
|
||||
{
|
||||
F();
|
||||
}
|
||||
void do_nothing()const{}
|
||||
};
|
||||
static const initializer init;
|
||||
};
|
||||
|
||||
template <class T, const T& (*F)(void)>
|
||||
typename constant_initializer<T, F>::initializer const constant_initializer<T, F>::init;
|
||||
|
||||
template <class T>
|
||||
const T& get_constant_ln2()
|
||||
{
|
||||
static BOOST_MP_THREAD_LOCAL T result;
|
||||
static BOOST_MP_THREAD_LOCAL bool b = false;
|
||||
static BOOST_MP_THREAD_LOCAL long digits = boost::multiprecision::detail::digits2<number<T> >::value();
|
||||
if(!b || (digits != boost::multiprecision::detail::digits2<number<T> >::value()))
|
||||
{
|
||||
calc_log2(result, boost::multiprecision::detail::digits2<number<T, et_on> >::value());
|
||||
b = true;
|
||||
digits = boost::multiprecision::detail::digits2<number<T> >::value();
|
||||
}
|
||||
|
||||
constant_initializer<T, &get_constant_ln2<T> >::do_nothing();
|
||||
|
||||
return result;
|
||||
}
|
||||
#ifndef BOOST_MP_THREAD_LOCAL
|
||||
#error 1
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
const T& get_constant_e()
|
||||
{
|
||||
static BOOST_MP_THREAD_LOCAL T result;
|
||||
static BOOST_MP_THREAD_LOCAL bool b = false;
|
||||
static BOOST_MP_THREAD_LOCAL long digits = boost::multiprecision::detail::digits2<number<T> >::value();
|
||||
if(!b || (digits != boost::multiprecision::detail::digits2<number<T> >::value()))
|
||||
{
|
||||
calc_e(result, boost::multiprecision::detail::digits2<number<T, et_on> >::value());
|
||||
b = true;
|
||||
digits = boost::multiprecision::detail::digits2<number<T> >::value();
|
||||
}
|
||||
|
||||
constant_initializer<T, &get_constant_e<T> >::do_nothing();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
const T& get_constant_pi()
|
||||
{
|
||||
static BOOST_MP_THREAD_LOCAL T result;
|
||||
static BOOST_MP_THREAD_LOCAL bool b = false;
|
||||
static BOOST_MP_THREAD_LOCAL long digits = boost::multiprecision::detail::digits2<number<T> >::value();
|
||||
if(!b || (digits != boost::multiprecision::detail::digits2<number<T> >::value()))
|
||||
{
|
||||
calc_pi(result, boost::multiprecision::detail::digits2<number<T, et_on> >::value());
|
||||
b = true;
|
||||
digits = boost::multiprecision::detail::digits2<number<T> >::value();
|
||||
}
|
||||
|
||||
constant_initializer<T, &get_constant_pi<T> >::do_nothing();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,342 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Olaf Krzikalla 2004-2006.
|
||||
// (C) Copyright Ion Gaztanaga 2006-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/intrusive for documentation.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_LINEAR_SLIST_ALGORITHMS_HPP
|
||||
#define BOOST_INTRUSIVE_LINEAR_SLIST_ALGORITHMS_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/detail/common_slist_algorithms.hpp>
|
||||
#include <boost/intrusive/detail/algo_type.hpp>
|
||||
#include <cstddef>
|
||||
#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
|
||||
//! linear_slist_algorithms provides basic algorithms to manipulate nodes
|
||||
//! forming a linear singly linked list.
|
||||
//!
|
||||
//! linear_slist_algorithms is configured with a NodeTraits class, which encapsulates the
|
||||
//! information about the node to be manipulated. NodeTraits must support the
|
||||
//! following interface:
|
||||
//!
|
||||
//! <b>Typedefs</b>:
|
||||
//!
|
||||
//! <tt>node</tt>: The type of the node that forms the linear list
|
||||
//!
|
||||
//! <tt>node_ptr</tt>: A pointer to a node
|
||||
//!
|
||||
//! <tt>const_node_ptr</tt>: A pointer to a const node
|
||||
//!
|
||||
//! <b>Static functions</b>:
|
||||
//!
|
||||
//! <tt>static node_ptr get_next(const_node_ptr n);</tt>
|
||||
//!
|
||||
//! <tt>static void set_next(node_ptr n, node_ptr next);</tt>
|
||||
template<class NodeTraits>
|
||||
class linear_slist_algorithms
|
||||
/// @cond
|
||||
: public detail::common_slist_algorithms<NodeTraits>
|
||||
/// @endcond
|
||||
{
|
||||
/// @cond
|
||||
typedef detail::common_slist_algorithms<NodeTraits> base_t;
|
||||
/// @endcond
|
||||
public:
|
||||
typedef typename NodeTraits::node node;
|
||||
typedef typename NodeTraits::node_ptr node_ptr;
|
||||
typedef typename NodeTraits::const_node_ptr const_node_ptr;
|
||||
typedef NodeTraits node_traits;
|
||||
|
||||
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
|
||||
//! <b>Effects</b>: Constructs an non-used list element, putting the next
|
||||
//! pointer to null:
|
||||
//! <tt>NodeTraits::get_next(this_node) == node_ptr()</tt>
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void init(const node_ptr & this_node);
|
||||
|
||||
//! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns true is "this_node" is the only node of a circular list:
|
||||
//! or it's a not inserted node:
|
||||
//! <tt>return node_ptr() == NodeTraits::get_next(this_node) || NodeTraits::get_next(this_node) == this_node</tt>
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static bool unique(const_node_ptr this_node);
|
||||
|
||||
//! <b>Effects</b>: Returns true is "this_node" has the same state as if
|
||||
//! it was inited using "init(node_ptr)"
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static bool inited(const_node_ptr this_node);
|
||||
|
||||
//! <b>Requires</b>: prev_node must be in a circular list or be an empty circular list.
|
||||
//!
|
||||
//! <b>Effects</b>: Unlinks the next node of prev_node from the circular list.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void unlink_after(const node_ptr & prev_node);
|
||||
|
||||
//! <b>Requires</b>: prev_node and last_node must be in a circular list
|
||||
//! or be an empty circular list.
|
||||
//!
|
||||
//! <b>Effects</b>: Unlinks the range (prev_node, last_node) from the linear list.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void unlink_after(const node_ptr & prev_node, const node_ptr & last_node);
|
||||
|
||||
//! <b>Requires</b>: prev_node must be a node of a linear list.
|
||||
//!
|
||||
//! <b>Effects</b>: Links this_node after prev_node in the linear list.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void link_after(const node_ptr & prev_node, const node_ptr & this_node);
|
||||
|
||||
//! <b>Requires</b>: b and e must be nodes of the same linear list or an empty range.
|
||||
//! and p must be a node of a different linear list.
|
||||
//!
|
||||
//! <b>Effects</b>: Removes the nodes from (b, e] range from their linear list and inserts
|
||||
//! them after p in p's linear list.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void transfer_after(const node_ptr & p, const node_ptr & b, const node_ptr & e);
|
||||
|
||||
#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
|
||||
//! <b>Effects</b>: Constructs an empty list, making this_node the only
|
||||
//! node of the circular list:
|
||||
//! <tt>NodeTraits::get_next(this_node) == this_node</tt>.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init_header(const node_ptr & this_node)
|
||||
{ NodeTraits::set_next(this_node, node_ptr ()); }
|
||||
|
||||
//! <b>Requires</b>: this_node and prev_init_node must be in the same linear list.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns the previous node of this_node in the linear list starting.
|
||||
//! the search from prev_init_node. The first node checked for equality
|
||||
//! is NodeTraits::get_next(prev_init_node).
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the number of elements between prev_init_node and this_node.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_node(const node_ptr & prev_init_node, const node_ptr & this_node)
|
||||
{ return base_t::get_previous_node(prev_init_node, this_node); }
|
||||
|
||||
//! <b>Requires</b>: this_node must be in a linear list or be an empty linear list.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns the number of nodes in a linear list. If the linear list
|
||||
//! is empty, returns 1.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static std::size_t count(const const_node_ptr & this_node)
|
||||
{
|
||||
std::size_t result = 0;
|
||||
const_node_ptr p = this_node;
|
||||
do{
|
||||
p = NodeTraits::get_next(p);
|
||||
++result;
|
||||
} while (p);
|
||||
return result;
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: this_node and other_node must be nodes inserted
|
||||
//! in linear lists or be empty linear lists.
|
||||
//!
|
||||
//! <b>Effects</b>: Moves all the nodes previously chained after this_node after other_node
|
||||
//! and vice-versa.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void swap_trailing_nodes(const node_ptr & this_node, const node_ptr & other_node)
|
||||
{
|
||||
node_ptr this_nxt = NodeTraits::get_next(this_node);
|
||||
node_ptr other_nxt = NodeTraits::get_next(other_node);
|
||||
NodeTraits::set_next(this_node, other_nxt);
|
||||
NodeTraits::set_next(other_node, this_nxt);
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: Reverses the order of elements in the list.
|
||||
//!
|
||||
//! <b>Returns</b>: The new first node of the list.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: This function is linear to the contained elements.
|
||||
static node_ptr reverse(const node_ptr & p)
|
||||
{
|
||||
if(!p) return node_ptr();
|
||||
node_ptr i = NodeTraits::get_next(p);
|
||||
node_ptr first(p);
|
||||
while(i){
|
||||
node_ptr nxti(NodeTraits::get_next(i));
|
||||
base_t::unlink_after(p);
|
||||
NodeTraits::set_next(i, first);
|
||||
first = i;
|
||||
i = nxti;
|
||||
}
|
||||
return first;
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: Moves the first n nodes starting at p to the end of the list.
|
||||
//!
|
||||
//! <b>Returns</b>: A pair containing the new first and last node of the list or
|
||||
//! if there has been any movement, a null pair if n leads to no movement.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
|
||||
static std::pair<node_ptr, node_ptr> move_first_n_backwards(const node_ptr & p, std::size_t n)
|
||||
{
|
||||
std::pair<node_ptr, node_ptr> ret;
|
||||
//Null shift, or count() == 0 or 1, nothing to do
|
||||
if(!n || !p || !NodeTraits::get_next(p)){
|
||||
return ret;
|
||||
}
|
||||
|
||||
node_ptr first = p;
|
||||
bool end_found = false;
|
||||
node_ptr new_last = node_ptr();
|
||||
node_ptr old_last = node_ptr();
|
||||
|
||||
//Now find the new last node according to the shift count.
|
||||
//If we find 0 before finding the new last node
|
||||
//unlink p, shortcut the search now that we know the size of the list
|
||||
//and continue.
|
||||
for(std::size_t i = 1; i <= n; ++i){
|
||||
new_last = first;
|
||||
first = NodeTraits::get_next(first);
|
||||
if(first == node_ptr()){
|
||||
//Shortcut the shift with the modulo of the size of the list
|
||||
n %= i;
|
||||
if(!n) return ret;
|
||||
old_last = new_last;
|
||||
i = 0;
|
||||
//Unlink p and continue the new first node search
|
||||
first = p;
|
||||
//unlink_after(new_last);
|
||||
end_found = true;
|
||||
}
|
||||
}
|
||||
|
||||
//If the p has not been found in the previous loop, find it
|
||||
//starting in the new first node and unlink it
|
||||
if(!end_found){
|
||||
old_last = base_t::get_previous_node(first, node_ptr());
|
||||
}
|
||||
|
||||
//Now link p after the new last node
|
||||
NodeTraits::set_next(old_last, p);
|
||||
NodeTraits::set_next(new_last, node_ptr());
|
||||
ret.first = first;
|
||||
ret.second = new_last;
|
||||
return ret;
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: Moves the first n nodes starting at p to the beginning of the list.
|
||||
//!
|
||||
//! <b>Returns</b>: A pair containing the new first and last node of the list or
|
||||
//! if there has been any movement, a null pair if n leads to no movement.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
|
||||
static std::pair<node_ptr, node_ptr> move_first_n_forward(const node_ptr & p, std::size_t n)
|
||||
{
|
||||
std::pair<node_ptr, node_ptr> ret;
|
||||
//Null shift, or count() == 0 or 1, nothing to do
|
||||
if(!n || !p || !NodeTraits::get_next(p))
|
||||
return ret;
|
||||
|
||||
node_ptr first = p;
|
||||
|
||||
//Iterate until p is found to know where the current last node is.
|
||||
//If the shift count is less than the size of the list, we can also obtain
|
||||
//the position of the new last node after the shift.
|
||||
node_ptr old_last(first), next_to_it, new_last(p);
|
||||
std::size_t distance = 1;
|
||||
while(!!(next_to_it = node_traits::get_next(old_last))){
|
||||
if(distance++ > n)
|
||||
new_last = node_traits::get_next(new_last);
|
||||
old_last = next_to_it;
|
||||
}
|
||||
//If the shift was bigger or equal than the size, obtain the equivalent
|
||||
//forward shifts and find the new last node.
|
||||
if(distance <= n){
|
||||
//Now find the equivalent forward shifts.
|
||||
//Shortcut the shift with the modulo of the size of the list
|
||||
std::size_t new_before_last_pos = (distance - (n % distance))% distance;
|
||||
//If the shift is a multiple of the size there is nothing to do
|
||||
if(!new_before_last_pos)
|
||||
return ret;
|
||||
|
||||
for( new_last = p
|
||||
; --new_before_last_pos
|
||||
; new_last = node_traits::get_next(new_last)){
|
||||
//empty
|
||||
}
|
||||
}
|
||||
|
||||
//Get the first new node
|
||||
node_ptr new_first(node_traits::get_next(new_last));
|
||||
//Now put the old beginning after the old end
|
||||
NodeTraits::set_next(old_last, p);
|
||||
NodeTraits::set_next(new_last, node_ptr());
|
||||
ret.first = new_first;
|
||||
ret.second = new_last;
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
|
||||
/// @cond
|
||||
|
||||
template<class NodeTraits>
|
||||
struct get_algo<LinearSListAlgorithms, NodeTraits>
|
||||
{
|
||||
typedef linear_slist_algorithms<NodeTraits> type;
|
||||
};
|
||||
|
||||
/// @endcond
|
||||
|
||||
} //namespace intrusive
|
||||
} //namespace boost
|
||||
|
||||
#include <boost/intrusive/detail/config_end.hpp>
|
||||
|
||||
#endif //BOOST_INTRUSIVE_LINEAR_SLIST_ALGORITHMS_HPP
|
||||
@@ -0,0 +1,67 @@
|
||||
#ifndef FILE_NODE_HPP__
|
||||
#define FILE_NODE_HPP__
|
||||
|
||||
#include <QTreeWidgetItem>
|
||||
|
||||
#include "RemoteFile.hpp"
|
||||
|
||||
class QNetworkAccessManager;
|
||||
class QString;
|
||||
class QUrl;
|
||||
|
||||
//
|
||||
// A holder for a RemoteFile object linked to a QTreeWidget row.
|
||||
//
|
||||
// It renders the file name in first column and holds download
|
||||
// progress data in the second column. The progress information is a
|
||||
// 64 bit integer number of bytes in the DisplayRole and a total bytes
|
||||
// expected in the UserRole. The first column also renders a check box
|
||||
// that downloads the file when checked and removes the downloaded
|
||||
// file when unchecked. The URL and local absolute file path are
|
||||
// stored in the UserData and UserData+1 roles of the first column.
|
||||
//
|
||||
class FileNode final
|
||||
: public QTreeWidgetItem
|
||||
, protected RemoteFile::ListenerInterface
|
||||
{
|
||||
public:
|
||||
explicit FileNode (QTreeWidgetItem * parent
|
||||
, QNetworkAccessManager * network_manager
|
||||
, QString const& local_path
|
||||
, QUrl const& url
|
||||
, bool http_only);
|
||||
|
||||
bool local () const {return remote_file_.local ();}
|
||||
bool sync (bool local);
|
||||
void abort ();
|
||||
|
||||
static int constexpr Type {UserType + 1};
|
||||
|
||||
//
|
||||
// Clients may use this RAII class to block nested calls to sync
|
||||
// which may be troublesome, e.g. when UI updates cause recursion.
|
||||
//
|
||||
struct sync_blocker
|
||||
{
|
||||
sync_blocker (FileNode * node) : node_ {node} {node_->block_sync_ = true;}
|
||||
sync_blocker (sync_blocker const&) = delete;
|
||||
sync_blocker& operator = (sync_blocker const&) = delete;
|
||||
~sync_blocker () {node_->block_sync_ = false;}
|
||||
private:
|
||||
FileNode * node_;
|
||||
};
|
||||
|
||||
protected:
|
||||
void error (QString const& title, QString const& message) override;
|
||||
bool redirect_request (QUrl const&) override {return true;} // allow
|
||||
void download_progress (qint64 bytes_received, qint64 total_bytes) override;
|
||||
void download_finished (bool success) override;
|
||||
|
||||
private:
|
||||
RemoteFile remote_file_; // active download
|
||||
bool block_sync_;
|
||||
|
||||
friend struct sync_blocker;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,253 @@
|
||||
|
||||
#if !defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
///// header body
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/substitute.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// 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_VARIANT_DETAIL_SUBSTITUTE_HPP
|
||||
#define BOOST_VARIANT_DETAIL_SUBSTITUTE_HPP
|
||||
|
||||
#include <boost/mpl/aux_/config/ctps.hpp>
|
||||
|
||||
#include <boost/variant/detail/substitute_fwd.hpp>
|
||||
#include <boost/variant/variant_fwd.hpp> // for BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
|
||||
#include <boost/mpl/aux_/lambda_arity_param.hpp>
|
||||
#include <boost/mpl/aux_/preprocessor/params.hpp>
|
||||
#include <boost/mpl/aux_/preprocessor/repeat.hpp>
|
||||
#include <boost/mpl/int_fwd.hpp>
|
||||
#include <boost/mpl/limits/arity.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/empty.hpp>
|
||||
#include <boost/preprocessor/arithmetic/inc.hpp>
|
||||
#include <boost/preprocessor/iterate.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace detail { namespace variant {
|
||||
|
||||
#if !defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) metafunction substitute
|
||||
//
|
||||
// Substitutes one type for another in the given type expression.
|
||||
//
|
||||
|
||||
//
|
||||
// primary template
|
||||
//
|
||||
template <
|
||||
typename T, typename Dest, typename Source
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(
|
||||
typename Arity /* = ... (see substitute_fwd.hpp) */
|
||||
)
|
||||
>
|
||||
struct substitute
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
//
|
||||
// tag substitution specializations
|
||||
//
|
||||
|
||||
#define BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_SUBSTITUTE_TAG(CV_) \
|
||||
template <typename Dest, typename Source> \
|
||||
struct substitute< \
|
||||
CV_ Source \
|
||||
, Dest \
|
||||
, Source \
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(mpl::int_<-1>) \
|
||||
> \
|
||||
{ \
|
||||
typedef CV_ Dest type; \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_SUBSTITUTE_TAG( BOOST_PP_EMPTY() )
|
||||
BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_SUBSTITUTE_TAG(const)
|
||||
BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_SUBSTITUTE_TAG(volatile)
|
||||
BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_SUBSTITUTE_TAG(const volatile)
|
||||
|
||||
#undef BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_SUBSTITUTE_TAG
|
||||
|
||||
//
|
||||
// pointer specializations
|
||||
//
|
||||
#define BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_HANDLE_POINTER(CV_) \
|
||||
template <typename T, typename Dest, typename Source> \
|
||||
struct substitute< \
|
||||
T * CV_ \
|
||||
, Dest \
|
||||
, Source \
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(mpl::int_<-1>) \
|
||||
> \
|
||||
{ \
|
||||
typedef typename substitute< \
|
||||
T, Dest, Source \
|
||||
>::type * CV_ type; \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_HANDLE_POINTER( BOOST_PP_EMPTY() )
|
||||
BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_HANDLE_POINTER(const)
|
||||
BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_HANDLE_POINTER(volatile)
|
||||
BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_HANDLE_POINTER(const volatile)
|
||||
|
||||
#undef BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_HANDLE_POINTER
|
||||
|
||||
//
|
||||
// reference specializations
|
||||
//
|
||||
template <typename T, typename Dest, typename Source>
|
||||
struct substitute<
|
||||
T&
|
||||
, Dest
|
||||
, Source
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(mpl::int_<-1>)
|
||||
>
|
||||
{
|
||||
typedef typename substitute<
|
||||
T, Dest, Source
|
||||
>::type & type;
|
||||
};
|
||||
|
||||
//
|
||||
// template expression (i.e., F<...>) specializations
|
||||
//
|
||||
|
||||
#if !defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES)
|
||||
template <
|
||||
template <typename...> class F
|
||||
, typename... Ts
|
||||
, typename Dest
|
||||
, typename Source
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(typename Arity)
|
||||
>
|
||||
struct substitute<
|
||||
F<Ts...>
|
||||
, Dest
|
||||
, Source
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(Arity)
|
||||
>
|
||||
{
|
||||
typedef F<typename substitute<
|
||||
Ts, Dest, Source
|
||||
>::type...> type;
|
||||
};
|
||||
#endif // !defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES)
|
||||
|
||||
#define BOOST_VARIANT_AUX_SUBSTITUTE_TYPEDEF_IMPL(N) \
|
||||
typedef typename substitute< \
|
||||
BOOST_PP_CAT(U,N), Dest, Source \
|
||||
>::type BOOST_PP_CAT(u,N); \
|
||||
/**/
|
||||
|
||||
#define BOOST_VARIANT_AUX_SUBSTITUTE_TYPEDEF(z, N, _) \
|
||||
BOOST_VARIANT_AUX_SUBSTITUTE_TYPEDEF_IMPL( BOOST_PP_INC(N) ) \
|
||||
/**/
|
||||
|
||||
#define BOOST_PP_ITERATION_LIMITS (0,BOOST_MPL_LIMIT_METAFUNCTION_ARITY)
|
||||
#define BOOST_PP_FILENAME_1 <boost/variant/detail/substitute.hpp>
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#undef BOOST_VARIANT_AUX_SUBSTITUTE_TYPEDEF_IMPL
|
||||
#undef BOOST_VARIANT_AUX_SUBSTITUTE_TYPEDEF
|
||||
|
||||
#endif // !defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
|
||||
|
||||
}} // namespace detail::variant
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_SUBSTITUTE_HPP
|
||||
|
||||
///// iteration, depth == 1
|
||||
|
||||
#elif BOOST_PP_ITERATION_DEPTH() == 1
|
||||
#define i BOOST_PP_FRAME_ITERATION(1)
|
||||
|
||||
#if i > 0
|
||||
|
||||
//
|
||||
// template specializations
|
||||
//
|
||||
template <
|
||||
template < BOOST_MPL_PP_PARAMS(i,typename P) > class T
|
||||
, BOOST_MPL_PP_PARAMS(i,typename U)
|
||||
, typename Dest
|
||||
, typename Source
|
||||
>
|
||||
struct substitute<
|
||||
T< BOOST_MPL_PP_PARAMS(i,U) >
|
||||
, Dest
|
||||
, Source
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(mpl::int_<( i )>)
|
||||
>
|
||||
{
|
||||
private:
|
||||
BOOST_MPL_PP_REPEAT(i, BOOST_VARIANT_AUX_SUBSTITUTE_TYPEDEF, _)
|
||||
|
||||
public:
|
||||
typedef T< BOOST_MPL_PP_PARAMS(i,u) > type;
|
||||
};
|
||||
|
||||
//
|
||||
// function specializations
|
||||
//
|
||||
template <
|
||||
typename R
|
||||
, BOOST_MPL_PP_PARAMS(i,typename U)
|
||||
, typename Dest
|
||||
, typename Source
|
||||
>
|
||||
struct substitute<
|
||||
R (*)( BOOST_MPL_PP_PARAMS(i,U) )
|
||||
, Dest
|
||||
, Source
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(mpl::int_<-1>)
|
||||
>
|
||||
{
|
||||
private:
|
||||
typedef typename substitute< R, Dest, Source >::type r;
|
||||
BOOST_MPL_PP_REPEAT(i, BOOST_VARIANT_AUX_SUBSTITUTE_TYPEDEF, _)
|
||||
|
||||
public:
|
||||
typedef r (*type)( BOOST_MPL_PP_PARAMS(i,u) );
|
||||
};
|
||||
|
||||
#elif i == 0
|
||||
|
||||
//
|
||||
// zero-arg function specialization
|
||||
//
|
||||
template <
|
||||
typename R, typename Dest, typename Source
|
||||
>
|
||||
struct substitute<
|
||||
R (*)( void )
|
||||
, Dest
|
||||
, Source
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(mpl::int_<-1>)
|
||||
>
|
||||
{
|
||||
private:
|
||||
typedef typename substitute< R, Dest, Source >::type r;
|
||||
|
||||
public:
|
||||
typedef r (*type)( void );
|
||||
};
|
||||
|
||||
#endif // i
|
||||
|
||||
#undef i
|
||||
#endif // BOOST_PP_IS_ITERATING
|
||||
Reference in New Issue
Block a user