Initial Commit
This commit is contained in:
@@ -0,0 +1,989 @@
|
||||
// tuple_basic.hpp -----------------------------------------------------
|
||||
|
||||
// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
|
||||
//
|
||||
// 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)
|
||||
|
||||
// For more information, see http://www.boost.org
|
||||
|
||||
// Outside help:
|
||||
// This and that, Gary Powell.
|
||||
// Fixed return types for get_head/get_tail
|
||||
// ( and other bugs ) per suggestion of Jens Maurer
|
||||
// simplified element type accessors + bug fix (Jeremy Siek)
|
||||
// Several changes/additions according to suggestions by Douglas Gregor,
|
||||
// William Kempf, Vesa Karvonen, John Max Skaller, Ed Brey, Beman Dawes,
|
||||
// David Abrahams.
|
||||
|
||||
// Revision history:
|
||||
// 2002 05 01 Hugo Duncan: Fix for Borland after Jaakko's previous changes
|
||||
// 2002 04 18 Jaakko: tuple element types can be void or plain function
|
||||
// types, as long as no object is created.
|
||||
// Tuple objects can no hold even noncopyable types
|
||||
// such as arrays.
|
||||
// 2001 10 22 John Maddock
|
||||
// Fixes for Borland C++
|
||||
// 2001 08 30 David Abrahams
|
||||
// Added default constructor for cons<>.
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
#ifndef BOOST_TUPLE_BASIC_HPP
|
||||
#define BOOST_TUPLE_BASIC_HPP
|
||||
|
||||
|
||||
#include <utility> // needed for the assignment from pair to tuple
|
||||
|
||||
#include "boost/type_traits/cv_traits.hpp"
|
||||
#include "boost/type_traits/function_traits.hpp"
|
||||
#include "boost/utility/swap.hpp"
|
||||
|
||||
#include "boost/detail/workaround.hpp" // needed for BOOST_WORKAROUND
|
||||
|
||||
#if BOOST_GCC >= 40700
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace tuples {
|
||||
|
||||
// -- null_type --------------------------------------------------------
|
||||
struct null_type {};
|
||||
|
||||
// a helper function to provide a const null_type type temporary
|
||||
namespace detail {
|
||||
inline const null_type cnull() { return null_type(); }
|
||||
|
||||
|
||||
// -- if construct ------------------------------------------------
|
||||
// Proposed by Krzysztof Czarnecki and Ulrich Eisenecker
|
||||
|
||||
template <bool If, class Then, class Else> struct IF { typedef Then RET; };
|
||||
|
||||
template <class Then, class Else> struct IF<false, Then, Else> {
|
||||
typedef Else RET;
|
||||
};
|
||||
|
||||
} // end detail
|
||||
|
||||
// - cons forward declaration -----------------------------------------------
|
||||
template <class HT, class TT> struct cons;
|
||||
|
||||
|
||||
// - tuple forward declaration -----------------------------------------------
|
||||
template <
|
||||
class T0 = null_type, class T1 = null_type, class T2 = null_type,
|
||||
class T3 = null_type, class T4 = null_type, class T5 = null_type,
|
||||
class T6 = null_type, class T7 = null_type, class T8 = null_type,
|
||||
class T9 = null_type>
|
||||
class tuple;
|
||||
|
||||
// tuple_length forward declaration
|
||||
template<class T> struct length;
|
||||
|
||||
|
||||
|
||||
namespace detail {
|
||||
|
||||
// -- generate error template, referencing to non-existing members of this
|
||||
// template is used to produce compilation errors intentionally
|
||||
template<class T>
|
||||
class generate_error;
|
||||
|
||||
template<int N>
|
||||
struct drop_front {
|
||||
template<class Tuple>
|
||||
struct apply {
|
||||
typedef BOOST_DEDUCED_TYPENAME drop_front<N-1>::BOOST_NESTED_TEMPLATE
|
||||
apply<Tuple> next;
|
||||
typedef BOOST_DEDUCED_TYPENAME next::type::tail_type type;
|
||||
static const type& call(const Tuple& tup) {
|
||||
return next::call(tup).tail;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct drop_front<0> {
|
||||
template<class Tuple>
|
||||
struct apply {
|
||||
typedef Tuple type;
|
||||
static const type& call(const Tuple& tup) {
|
||||
return tup;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
} // end of namespace detail
|
||||
|
||||
|
||||
// -cons type accessors ----------------------------------------
|
||||
// typename tuples::element<N,T>::type gets the type of the
|
||||
// Nth element ot T, first element is at index 0
|
||||
// -------------------------------------------------------
|
||||
|
||||
#ifndef BOOST_NO_CV_SPECIALIZATIONS
|
||||
|
||||
template<int N, class T>
|
||||
struct element
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME detail::drop_front<N>::BOOST_NESTED_TEMPLATE
|
||||
apply<T>::type::head_type type;
|
||||
};
|
||||
|
||||
template<int N, class T>
|
||||
struct element<N, const T>
|
||||
{
|
||||
private:
|
||||
typedef BOOST_DEDUCED_TYPENAME detail::drop_front<N>::BOOST_NESTED_TEMPLATE
|
||||
apply<T>::type::head_type unqualified_type;
|
||||
public:
|
||||
#if BOOST_WORKAROUND(__BORLANDC__,<0x600)
|
||||
typedef const unqualified_type type;
|
||||
#else
|
||||
typedef BOOST_DEDUCED_TYPENAME boost::add_const<unqualified_type>::type type;
|
||||
#endif
|
||||
};
|
||||
#else // def BOOST_NO_CV_SPECIALIZATIONS
|
||||
|
||||
namespace detail {
|
||||
|
||||
template<int N, class T, bool IsConst>
|
||||
struct element_impl
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME detail::drop_front<N>::BOOST_NESTED_TEMPLATE
|
||||
apply<T>::type::head_type type;
|
||||
};
|
||||
|
||||
template<int N, class T>
|
||||
struct element_impl<N, T, true /* IsConst */>
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME detail::drop_front<N>::BOOST_NESTED_TEMPLATE
|
||||
apply<T>::type::head_type unqualified_type;
|
||||
typedef const unqualified_type type;
|
||||
};
|
||||
|
||||
} // end of namespace detail
|
||||
|
||||
|
||||
template<int N, class T>
|
||||
struct element:
|
||||
public detail::element_impl<N, T, ::boost::is_const<T>::value>
|
||||
{
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// -get function templates -----------------------------------------------
|
||||
// Usage: get<N>(aTuple)
|
||||
|
||||
// -- some traits classes for get functions
|
||||
|
||||
// access traits lifted from detail namespace to be part of the interface,
|
||||
// (Joel de Guzman's suggestion). Rationale: get functions are part of the
|
||||
// interface, so should the way to express their return types be.
|
||||
|
||||
template <class T> struct access_traits {
|
||||
typedef const T& const_type;
|
||||
typedef T& non_const_type;
|
||||
|
||||
typedef const typename boost::remove_cv<T>::type& parameter_type;
|
||||
|
||||
// used as the tuple constructors parameter types
|
||||
// Rationale: non-reference tuple element types can be cv-qualified.
|
||||
// It should be possible to initialize such types with temporaries,
|
||||
// and when binding temporaries to references, the reference must
|
||||
// be non-volatile and const. 8.5.3. (5)
|
||||
};
|
||||
|
||||
template <class T> struct access_traits<T&> {
|
||||
|
||||
typedef T& const_type;
|
||||
typedef T& non_const_type;
|
||||
|
||||
typedef T& parameter_type;
|
||||
};
|
||||
|
||||
// get function for non-const cons-lists, returns a reference to the element
|
||||
|
||||
template<int N, class HT, class TT>
|
||||
inline typename access_traits<
|
||||
typename element<N, cons<HT, TT> >::type
|
||||
>::non_const_type
|
||||
get(cons<HT, TT>& c) {
|
||||
typedef BOOST_DEDUCED_TYPENAME detail::drop_front<N>::BOOST_NESTED_TEMPLATE
|
||||
apply<cons<HT, TT> > impl;
|
||||
typedef BOOST_DEDUCED_TYPENAME impl::type cons_element;
|
||||
return const_cast<cons_element&>(impl::call(c)).head;
|
||||
}
|
||||
|
||||
// get function for const cons-lists, returns a const reference to
|
||||
// the element. If the element is a reference, returns the reference
|
||||
// as such (that is, can return a non-const reference)
|
||||
template<int N, class HT, class TT>
|
||||
inline typename access_traits<
|
||||
typename element<N, cons<HT, TT> >::type
|
||||
>::const_type
|
||||
get(const cons<HT, TT>& c) {
|
||||
typedef BOOST_DEDUCED_TYPENAME detail::drop_front<N>::BOOST_NESTED_TEMPLATE
|
||||
apply<cons<HT, TT> > impl;
|
||||
return impl::call(c).head;
|
||||
}
|
||||
|
||||
// -- the cons template --------------------------------------------------
|
||||
namespace detail {
|
||||
|
||||
// These helper templates wrap void types and plain function types.
|
||||
// The reationale is to allow one to write tuple types with those types
|
||||
// as elements, even though it is not possible to instantiate such object.
|
||||
// E.g: typedef tuple<void> some_type; // ok
|
||||
// but: some_type x; // fails
|
||||
|
||||
template <class T> class non_storeable_type {
|
||||
non_storeable_type();
|
||||
};
|
||||
|
||||
template <class T> struct wrap_non_storeable_type {
|
||||
typedef typename IF<
|
||||
::boost::is_function<T>::value, non_storeable_type<T>, T
|
||||
>::RET type;
|
||||
};
|
||||
template <> struct wrap_non_storeable_type<void> {
|
||||
typedef non_storeable_type<void> type;
|
||||
};
|
||||
|
||||
} // detail
|
||||
|
||||
template <class HT, class TT>
|
||||
struct cons {
|
||||
|
||||
typedef HT head_type;
|
||||
typedef TT tail_type;
|
||||
|
||||
typedef typename
|
||||
detail::wrap_non_storeable_type<head_type>::type stored_head_type;
|
||||
|
||||
stored_head_type head;
|
||||
tail_type tail;
|
||||
|
||||
typename access_traits<stored_head_type>::non_const_type
|
||||
get_head() { return head; }
|
||||
|
||||
typename access_traits<tail_type>::non_const_type
|
||||
get_tail() { return tail; }
|
||||
|
||||
typename access_traits<stored_head_type>::const_type
|
||||
get_head() const { return head; }
|
||||
|
||||
typename access_traits<tail_type>::const_type
|
||||
get_tail() const { return tail; }
|
||||
|
||||
cons() : head(), tail() {}
|
||||
// cons() : head(detail::default_arg<HT>::f()), tail() {}
|
||||
|
||||
// the argument for head is not strictly needed, but it prevents
|
||||
// array type elements. This is good, since array type elements
|
||||
// cannot be supported properly in any case (no assignment,
|
||||
// copy works only if the tails are exactly the same type, ...)
|
||||
|
||||
cons(typename access_traits<stored_head_type>::parameter_type h,
|
||||
const tail_type& t)
|
||||
: head (h), tail(t) {}
|
||||
|
||||
template <class T1, class T2, class T3, class T4, class T5,
|
||||
class T6, class T7, class T8, class T9, class T10>
|
||||
cons( T1& t1, T2& t2, T3& t3, T4& t4, T5& t5,
|
||||
T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 )
|
||||
: head (t1),
|
||||
tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull())
|
||||
{}
|
||||
|
||||
template <class T2, class T3, class T4, class T5,
|
||||
class T6, class T7, class T8, class T9, class T10>
|
||||
cons( const null_type& /*t1*/, T2& t2, T3& t3, T4& t4, T5& t5,
|
||||
T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 )
|
||||
: head (),
|
||||
tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull())
|
||||
{}
|
||||
|
||||
|
||||
template <class HT2, class TT2>
|
||||
cons( const cons<HT2, TT2>& u ) : head(u.head), tail(u.tail) {}
|
||||
|
||||
template <class HT2, class TT2>
|
||||
cons& operator=( const cons<HT2, TT2>& u ) {
|
||||
head=u.head; tail=u.tail; return *this;
|
||||
}
|
||||
|
||||
// must define assignment operator explicitly, implicit version is
|
||||
// illformed if HT is a reference (12.8. (12))
|
||||
cons& operator=(const cons& u) {
|
||||
head = u.head; tail = u.tail; return *this;
|
||||
}
|
||||
|
||||
template <class T1, class T2>
|
||||
cons& operator=( const std::pair<T1, T2>& u ) {
|
||||
BOOST_STATIC_ASSERT(length<cons>::value == 2); // check length = 2
|
||||
head = u.first; tail.head = u.second; return *this;
|
||||
}
|
||||
|
||||
// get member functions (non-const and const)
|
||||
template <int N>
|
||||
typename access_traits<
|
||||
typename element<N, cons<HT, TT> >::type
|
||||
>::non_const_type
|
||||
get() {
|
||||
return boost::tuples::get<N>(*this); // delegate to non-member get
|
||||
}
|
||||
|
||||
template <int N>
|
||||
typename access_traits<
|
||||
typename element<N, cons<HT, TT> >::type
|
||||
>::const_type
|
||||
get() const {
|
||||
return boost::tuples::get<N>(*this); // delegate to non-member get
|
||||
}
|
||||
};
|
||||
|
||||
template <class HT>
|
||||
struct cons<HT, null_type> {
|
||||
|
||||
typedef HT head_type;
|
||||
typedef null_type tail_type;
|
||||
typedef cons<HT, null_type> self_type;
|
||||
|
||||
typedef typename
|
||||
detail::wrap_non_storeable_type<head_type>::type stored_head_type;
|
||||
stored_head_type head;
|
||||
|
||||
typename access_traits<stored_head_type>::non_const_type
|
||||
get_head() { return head; }
|
||||
|
||||
null_type get_tail() { return null_type(); }
|
||||
|
||||
typename access_traits<stored_head_type>::const_type
|
||||
get_head() const { return head; }
|
||||
|
||||
const null_type get_tail() const { return null_type(); }
|
||||
|
||||
// cons() : head(detail::default_arg<HT>::f()) {}
|
||||
cons() : head() {}
|
||||
|
||||
cons(typename access_traits<stored_head_type>::parameter_type h,
|
||||
const null_type& = null_type())
|
||||
: head (h) {}
|
||||
|
||||
template<class T1>
|
||||
cons(T1& t1, const null_type&, const null_type&, const null_type&,
|
||||
const null_type&, const null_type&, const null_type&,
|
||||
const null_type&, const null_type&, const null_type&)
|
||||
: head (t1) {}
|
||||
|
||||
cons(const null_type&,
|
||||
const null_type&, const null_type&, const null_type&,
|
||||
const null_type&, const null_type&, const null_type&,
|
||||
const null_type&, const null_type&, const null_type&)
|
||||
: head () {}
|
||||
|
||||
template <class HT2>
|
||||
cons( const cons<HT2, null_type>& u ) : head(u.head) {}
|
||||
|
||||
template <class HT2>
|
||||
cons& operator=(const cons<HT2, null_type>& u )
|
||||
{ head = u.head; return *this; }
|
||||
|
||||
// must define assignment operator explicitely, implicit version
|
||||
// is illformed if HT is a reference
|
||||
cons& operator=(const cons& u) { head = u.head; return *this; }
|
||||
|
||||
template <int N>
|
||||
typename access_traits<
|
||||
typename element<N, self_type>::type
|
||||
>::non_const_type
|
||||
get() {
|
||||
return boost::tuples::get<N>(*this);
|
||||
}
|
||||
|
||||
template <int N>
|
||||
typename access_traits<
|
||||
typename element<N, self_type>::type
|
||||
>::const_type
|
||||
get() const {
|
||||
return boost::tuples::get<N>(*this);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// templates for finding out the length of the tuple -------------------
|
||||
|
||||
template<class T>
|
||||
struct length {
|
||||
BOOST_STATIC_CONSTANT(int, value = 1 + length<typename T::tail_type>::value);
|
||||
};
|
||||
|
||||
template<>
|
||||
struct length<tuple<> > {
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
|
||||
template<>
|
||||
struct length<tuple<> const> {
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
|
||||
template<>
|
||||
struct length<null_type> {
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
|
||||
template<>
|
||||
struct length<null_type const> {
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
|
||||
namespace detail {
|
||||
|
||||
// Tuple to cons mapper --------------------------------------------------
|
||||
template <class T0, class T1, class T2, class T3, class T4,
|
||||
class T5, class T6, class T7, class T8, class T9>
|
||||
struct map_tuple_to_cons
|
||||
{
|
||||
typedef cons<T0,
|
||||
typename map_tuple_to_cons<T1, T2, T3, T4, T5,
|
||||
T6, T7, T8, T9, null_type>::type
|
||||
> type;
|
||||
};
|
||||
|
||||
// The empty tuple is a null_type
|
||||
template <>
|
||||
struct map_tuple_to_cons<null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type>
|
||||
{
|
||||
typedef null_type type;
|
||||
};
|
||||
|
||||
} // end detail
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// -- tuple ------------------------------------------------------
|
||||
template <class T0, class T1, class T2, class T3, class T4,
|
||||
class T5, class T6, class T7, class T8, class T9>
|
||||
|
||||
class tuple :
|
||||
public detail::map_tuple_to_cons<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::type
|
||||
{
|
||||
public:
|
||||
typedef typename
|
||||
detail::map_tuple_to_cons<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::type inherited;
|
||||
typedef typename inherited::head_type head_type;
|
||||
typedef typename inherited::tail_type tail_type;
|
||||
|
||||
|
||||
// access_traits<T>::parameter_type takes non-reference types as const T&
|
||||
tuple() {}
|
||||
|
||||
tuple(typename access_traits<T0>::parameter_type t0)
|
||||
: inherited(t0, detail::cnull(), detail::cnull(), detail::cnull(),
|
||||
detail::cnull(), detail::cnull(), detail::cnull(),
|
||||
detail::cnull(), detail::cnull(), detail::cnull()) {}
|
||||
|
||||
tuple(typename access_traits<T0>::parameter_type t0,
|
||||
typename access_traits<T1>::parameter_type t1)
|
||||
: inherited(t0, t1, detail::cnull(), detail::cnull(),
|
||||
detail::cnull(), detail::cnull(), detail::cnull(),
|
||||
detail::cnull(), detail::cnull(), detail::cnull()) {}
|
||||
|
||||
tuple(typename access_traits<T0>::parameter_type t0,
|
||||
typename access_traits<T1>::parameter_type t1,
|
||||
typename access_traits<T2>::parameter_type t2)
|
||||
: inherited(t0, t1, t2, detail::cnull(), detail::cnull(),
|
||||
detail::cnull(), detail::cnull(), detail::cnull(),
|
||||
detail::cnull(), detail::cnull()) {}
|
||||
|
||||
tuple(typename access_traits<T0>::parameter_type t0,
|
||||
typename access_traits<T1>::parameter_type t1,
|
||||
typename access_traits<T2>::parameter_type t2,
|
||||
typename access_traits<T3>::parameter_type t3)
|
||||
: inherited(t0, t1, t2, t3, detail::cnull(), detail::cnull(),
|
||||
detail::cnull(), detail::cnull(), detail::cnull(),
|
||||
detail::cnull()) {}
|
||||
|
||||
tuple(typename access_traits<T0>::parameter_type t0,
|
||||
typename access_traits<T1>::parameter_type t1,
|
||||
typename access_traits<T2>::parameter_type t2,
|
||||
typename access_traits<T3>::parameter_type t3,
|
||||
typename access_traits<T4>::parameter_type t4)
|
||||
: inherited(t0, t1, t2, t3, t4, detail::cnull(), detail::cnull(),
|
||||
detail::cnull(), detail::cnull(), detail::cnull()) {}
|
||||
|
||||
tuple(typename access_traits<T0>::parameter_type t0,
|
||||
typename access_traits<T1>::parameter_type t1,
|
||||
typename access_traits<T2>::parameter_type t2,
|
||||
typename access_traits<T3>::parameter_type t3,
|
||||
typename access_traits<T4>::parameter_type t4,
|
||||
typename access_traits<T5>::parameter_type t5)
|
||||
: inherited(t0, t1, t2, t3, t4, t5, detail::cnull(), detail::cnull(),
|
||||
detail::cnull(), detail::cnull()) {}
|
||||
|
||||
tuple(typename access_traits<T0>::parameter_type t0,
|
||||
typename access_traits<T1>::parameter_type t1,
|
||||
typename access_traits<T2>::parameter_type t2,
|
||||
typename access_traits<T3>::parameter_type t3,
|
||||
typename access_traits<T4>::parameter_type t4,
|
||||
typename access_traits<T5>::parameter_type t5,
|
||||
typename access_traits<T6>::parameter_type t6)
|
||||
: inherited(t0, t1, t2, t3, t4, t5, t6, detail::cnull(),
|
||||
detail::cnull(), detail::cnull()) {}
|
||||
|
||||
tuple(typename access_traits<T0>::parameter_type t0,
|
||||
typename access_traits<T1>::parameter_type t1,
|
||||
typename access_traits<T2>::parameter_type t2,
|
||||
typename access_traits<T3>::parameter_type t3,
|
||||
typename access_traits<T4>::parameter_type t4,
|
||||
typename access_traits<T5>::parameter_type t5,
|
||||
typename access_traits<T6>::parameter_type t6,
|
||||
typename access_traits<T7>::parameter_type t7)
|
||||
: inherited(t0, t1, t2, t3, t4, t5, t6, t7, detail::cnull(),
|
||||
detail::cnull()) {}
|
||||
|
||||
tuple(typename access_traits<T0>::parameter_type t0,
|
||||
typename access_traits<T1>::parameter_type t1,
|
||||
typename access_traits<T2>::parameter_type t2,
|
||||
typename access_traits<T3>::parameter_type t3,
|
||||
typename access_traits<T4>::parameter_type t4,
|
||||
typename access_traits<T5>::parameter_type t5,
|
||||
typename access_traits<T6>::parameter_type t6,
|
||||
typename access_traits<T7>::parameter_type t7,
|
||||
typename access_traits<T8>::parameter_type t8)
|
||||
: inherited(t0, t1, t2, t3, t4, t5, t6, t7, t8, detail::cnull()) {}
|
||||
|
||||
tuple(typename access_traits<T0>::parameter_type t0,
|
||||
typename access_traits<T1>::parameter_type t1,
|
||||
typename access_traits<T2>::parameter_type t2,
|
||||
typename access_traits<T3>::parameter_type t3,
|
||||
typename access_traits<T4>::parameter_type t4,
|
||||
typename access_traits<T5>::parameter_type t5,
|
||||
typename access_traits<T6>::parameter_type t6,
|
||||
typename access_traits<T7>::parameter_type t7,
|
||||
typename access_traits<T8>::parameter_type t8,
|
||||
typename access_traits<T9>::parameter_type t9)
|
||||
: inherited(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) {}
|
||||
|
||||
|
||||
template<class U1, class U2>
|
||||
tuple(const cons<U1, U2>& p) : inherited(p) {}
|
||||
|
||||
template <class U1, class U2>
|
||||
tuple& operator=(const cons<U1, U2>& k) {
|
||||
inherited::operator=(k);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class U1, class U2>
|
||||
tuple& operator=(const std::pair<U1, U2>& k) {
|
||||
BOOST_STATIC_ASSERT(length<tuple>::value == 2);// check_length = 2
|
||||
this->head = k.first;
|
||||
this->tail.head = k.second;
|
||||
return *this;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// The empty tuple
|
||||
template <>
|
||||
class tuple<null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type> :
|
||||
public null_type
|
||||
{
|
||||
public:
|
||||
typedef null_type inherited;
|
||||
};
|
||||
|
||||
|
||||
// Swallows any assignment (by Doug Gregor)
|
||||
namespace detail {
|
||||
|
||||
struct swallow_assign;
|
||||
typedef void (detail::swallow_assign::*ignore_t)();
|
||||
struct swallow_assign {
|
||||
swallow_assign(ignore_t(*)(ignore_t)) {}
|
||||
template<typename T>
|
||||
swallow_assign const& operator=(const T&) const {
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} // namespace detail
|
||||
|
||||
// "ignore" allows tuple positions to be ignored when using "tie".
|
||||
inline detail::ignore_t ignore(detail::ignore_t) { return 0; }
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// The call_traits for make_tuple
|
||||
// Honours the reference_wrapper class.
|
||||
|
||||
// Must be instantiated with plain or const plain types (not with references)
|
||||
|
||||
// from template<class T> foo(const T& t) : make_tuple_traits<const T>::type
|
||||
// from template<class T> foo(T& t) : make_tuple_traits<T>::type
|
||||
|
||||
// Conversions:
|
||||
// T -> T,
|
||||
// references -> compile_time_error
|
||||
// reference_wrapper<T> -> T&
|
||||
// const reference_wrapper<T> -> T&
|
||||
// array -> const ref array
|
||||
|
||||
|
||||
template<class T>
|
||||
struct make_tuple_traits {
|
||||
typedef T type;
|
||||
|
||||
// commented away, see below (JJ)
|
||||
// typedef typename IF<
|
||||
// boost::is_function<T>::value,
|
||||
// T&,
|
||||
// T>::RET type;
|
||||
|
||||
};
|
||||
|
||||
// The is_function test was there originally for plain function types,
|
||||
// which can't be stored as such (we must either store them as references or
|
||||
// pointers). Such a type could be formed if make_tuple was called with a
|
||||
// reference to a function.
|
||||
// But this would mean that a const qualified function type was formed in
|
||||
// the make_tuple function and hence make_tuple can't take a function
|
||||
// reference as a parameter, and thus T can't be a function type.
|
||||
// So is_function test was removed.
|
||||
// (14.8.3. says that type deduction fails if a cv-qualified function type
|
||||
// is created. (It only applies for the case of explicitly specifying template
|
||||
// args, though?)) (JJ)
|
||||
|
||||
template<class T>
|
||||
struct make_tuple_traits<T&> {
|
||||
typedef typename
|
||||
detail::generate_error<T&>::
|
||||
do_not_use_with_reference_type error;
|
||||
};
|
||||
|
||||
// Arrays can't be stored as plain types; convert them to references.
|
||||
// All arrays are converted to const. This is because make_tuple takes its
|
||||
// parameters as const T& and thus the knowledge of the potential
|
||||
// non-constness of actual argument is lost.
|
||||
template<class T, int n> struct make_tuple_traits <T[n]> {
|
||||
typedef const T (&type)[n];
|
||||
};
|
||||
|
||||
template<class T, int n>
|
||||
struct make_tuple_traits<const T[n]> {
|
||||
typedef const T (&type)[n];
|
||||
};
|
||||
|
||||
template<class T, int n> struct make_tuple_traits<volatile T[n]> {
|
||||
typedef const volatile T (&type)[n];
|
||||
};
|
||||
|
||||
template<class T, int n>
|
||||
struct make_tuple_traits<const volatile T[n]> {
|
||||
typedef const volatile T (&type)[n];
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct make_tuple_traits<reference_wrapper<T> >{
|
||||
typedef T& type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct make_tuple_traits<const reference_wrapper<T> >{
|
||||
typedef T& type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct make_tuple_traits<detail::ignore_t(detail::ignore_t)> {
|
||||
typedef detail::swallow_assign type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
namespace detail {
|
||||
|
||||
// a helper traits to make the make_tuple functions shorter (Vesa Karvonen's
|
||||
// suggestion)
|
||||
template <
|
||||
class T0 = null_type, class T1 = null_type, class T2 = null_type,
|
||||
class T3 = null_type, class T4 = null_type, class T5 = null_type,
|
||||
class T6 = null_type, class T7 = null_type, class T8 = null_type,
|
||||
class T9 = null_type
|
||||
>
|
||||
struct make_tuple_mapper {
|
||||
typedef
|
||||
tuple<typename make_tuple_traits<T0>::type,
|
||||
typename make_tuple_traits<T1>::type,
|
||||
typename make_tuple_traits<T2>::type,
|
||||
typename make_tuple_traits<T3>::type,
|
||||
typename make_tuple_traits<T4>::type,
|
||||
typename make_tuple_traits<T5>::type,
|
||||
typename make_tuple_traits<T6>::type,
|
||||
typename make_tuple_traits<T7>::type,
|
||||
typename make_tuple_traits<T8>::type,
|
||||
typename make_tuple_traits<T9>::type> type;
|
||||
};
|
||||
|
||||
} // end detail
|
||||
|
||||
// -make_tuple function templates -----------------------------------
|
||||
inline tuple<> make_tuple() {
|
||||
return tuple<>();
|
||||
}
|
||||
|
||||
template<class T0>
|
||||
inline typename detail::make_tuple_mapper<T0>::type
|
||||
make_tuple(const T0& t0) {
|
||||
typedef typename detail::make_tuple_mapper<T0>::type t;
|
||||
return t(t0);
|
||||
}
|
||||
|
||||
template<class T0, class T1>
|
||||
inline typename detail::make_tuple_mapper<T0, T1>::type
|
||||
make_tuple(const T0& t0, const T1& t1) {
|
||||
typedef typename detail::make_tuple_mapper<T0, T1>::type t;
|
||||
return t(t0, t1);
|
||||
}
|
||||
|
||||
template<class T0, class T1, class T2>
|
||||
inline typename detail::make_tuple_mapper<T0, T1, T2>::type
|
||||
make_tuple(const T0& t0, const T1& t1, const T2& t2) {
|
||||
typedef typename detail::make_tuple_mapper<T0, T1, T2>::type t;
|
||||
return t(t0, t1, t2);
|
||||
}
|
||||
|
||||
template<class T0, class T1, class T2, class T3>
|
||||
inline typename detail::make_tuple_mapper<T0, T1, T2, T3>::type
|
||||
make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3) {
|
||||
typedef typename detail::make_tuple_mapper<T0, T1, T2, T3>::type t;
|
||||
return t(t0, t1, t2, t3);
|
||||
}
|
||||
|
||||
template<class T0, class T1, class T2, class T3, class T4>
|
||||
inline typename detail::make_tuple_mapper<T0, T1, T2, T3, T4>::type
|
||||
make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
|
||||
const T4& t4) {
|
||||
typedef typename detail::make_tuple_mapper<T0, T1, T2, T3, T4>::type t;
|
||||
return t(t0, t1, t2, t3, t4);
|
||||
}
|
||||
|
||||
template<class T0, class T1, class T2, class T3, class T4, class T5>
|
||||
inline typename detail::make_tuple_mapper<T0, T1, T2, T3, T4, T5>::type
|
||||
make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
|
||||
const T4& t4, const T5& t5) {
|
||||
typedef typename detail::make_tuple_mapper<T0, T1, T2, T3, T4, T5>::type t;
|
||||
return t(t0, t1, t2, t3, t4, t5);
|
||||
}
|
||||
|
||||
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6>
|
||||
inline typename detail::make_tuple_mapper<T0, T1, T2, T3, T4, T5, T6>::type
|
||||
make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
|
||||
const T4& t4, const T5& t5, const T6& t6) {
|
||||
typedef typename detail::make_tuple_mapper
|
||||
<T0, T1, T2, T3, T4, T5, T6>::type t;
|
||||
return t(t0, t1, t2, t3, t4, t5, t6);
|
||||
}
|
||||
|
||||
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6,
|
||||
class T7>
|
||||
inline typename detail::make_tuple_mapper<T0, T1, T2, T3, T4, T5, T6, T7>::type
|
||||
make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
|
||||
const T4& t4, const T5& t5, const T6& t6, const T7& t7) {
|
||||
typedef typename detail::make_tuple_mapper
|
||||
<T0, T1, T2, T3, T4, T5, T6, T7>::type t;
|
||||
return t(t0, t1, t2, t3, t4, t5, t6, t7);
|
||||
}
|
||||
|
||||
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6,
|
||||
class T7, class T8>
|
||||
inline typename detail::make_tuple_mapper
|
||||
<T0, T1, T2, T3, T4, T5, T6, T7, T8>::type
|
||||
make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
|
||||
const T4& t4, const T5& t5, const T6& t6, const T7& t7,
|
||||
const T8& t8) {
|
||||
typedef typename detail::make_tuple_mapper
|
||||
<T0, T1, T2, T3, T4, T5, T6, T7, T8>::type t;
|
||||
return t(t0, t1, t2, t3, t4, t5, t6, t7, t8);
|
||||
}
|
||||
|
||||
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6,
|
||||
class T7, class T8, class T9>
|
||||
inline typename detail::make_tuple_mapper
|
||||
<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::type
|
||||
make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
|
||||
const T4& t4, const T5& t5, const T6& t6, const T7& t7,
|
||||
const T8& t8, const T9& t9) {
|
||||
typedef typename detail::make_tuple_mapper
|
||||
<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::type t;
|
||||
return t(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9);
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
|
||||
template<class T>
|
||||
struct tie_traits {
|
||||
typedef T& type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct tie_traits<ignore_t(ignore_t)> {
|
||||
typedef swallow_assign type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct tie_traits<void> {
|
||||
typedef null_type type;
|
||||
};
|
||||
|
||||
template <
|
||||
class T0 = void, class T1 = void, class T2 = void,
|
||||
class T3 = void, class T4 = void, class T5 = void,
|
||||
class T6 = void, class T7 = void, class T8 = void,
|
||||
class T9 = void
|
||||
>
|
||||
struct tie_mapper {
|
||||
typedef
|
||||
tuple<typename tie_traits<T0>::type,
|
||||
typename tie_traits<T1>::type,
|
||||
typename tie_traits<T2>::type,
|
||||
typename tie_traits<T3>::type,
|
||||
typename tie_traits<T4>::type,
|
||||
typename tie_traits<T5>::type,
|
||||
typename tie_traits<T6>::type,
|
||||
typename tie_traits<T7>::type,
|
||||
typename tie_traits<T8>::type,
|
||||
typename tie_traits<T9>::type> type;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
// Tie function templates -------------------------------------------------
|
||||
template<class T0>
|
||||
inline typename detail::tie_mapper<T0>::type
|
||||
tie(T0& t0) {
|
||||
typedef typename detail::tie_mapper<T0>::type t;
|
||||
return t(t0);
|
||||
}
|
||||
|
||||
template<class T0, class T1>
|
||||
inline typename detail::tie_mapper<T0, T1>::type
|
||||
tie(T0& t0, T1& t1) {
|
||||
typedef typename detail::tie_mapper<T0, T1>::type t;
|
||||
return t(t0, t1);
|
||||
}
|
||||
|
||||
template<class T0, class T1, class T2>
|
||||
inline typename detail::tie_mapper<T0, T1, T2>::type
|
||||
tie(T0& t0, T1& t1, T2& t2) {
|
||||
typedef typename detail::tie_mapper<T0, T1, T2>::type t;
|
||||
return t(t0, t1, t2);
|
||||
}
|
||||
|
||||
template<class T0, class T1, class T2, class T3>
|
||||
inline typename detail::tie_mapper<T0, T1, T2, T3>::type
|
||||
tie(T0& t0, T1& t1, T2& t2, T3& t3) {
|
||||
typedef typename detail::tie_mapper<T0, T1, T2, T3>::type t;
|
||||
return t(t0, t1, t2, t3);
|
||||
}
|
||||
|
||||
template<class T0, class T1, class T2, class T3, class T4>
|
||||
inline typename detail::tie_mapper<T0, T1, T2, T3, T4>::type
|
||||
tie(T0& t0, T1& t1, T2& t2, T3& t3,
|
||||
T4& t4) {
|
||||
typedef typename detail::tie_mapper<T0, T1, T2, T3, T4>::type t;
|
||||
return t(t0, t1, t2, t3, t4);
|
||||
}
|
||||
|
||||
template<class T0, class T1, class T2, class T3, class T4, class T5>
|
||||
inline typename detail::tie_mapper<T0, T1, T2, T3, T4, T5>::type
|
||||
tie(T0& t0, T1& t1, T2& t2, T3& t3,
|
||||
T4& t4, T5& t5) {
|
||||
typedef typename detail::tie_mapper<T0, T1, T2, T3, T4, T5>::type t;
|
||||
return t(t0, t1, t2, t3, t4, t5);
|
||||
}
|
||||
|
||||
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6>
|
||||
inline typename detail::tie_mapper<T0, T1, T2, T3, T4, T5, T6>::type
|
||||
tie(T0& t0, T1& t1, T2& t2, T3& t3,
|
||||
T4& t4, T5& t5, T6& t6) {
|
||||
typedef typename detail::tie_mapper
|
||||
<T0, T1, T2, T3, T4, T5, T6>::type t;
|
||||
return t(t0, t1, t2, t3, t4, t5, t6);
|
||||
}
|
||||
|
||||
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6,
|
||||
class T7>
|
||||
inline typename detail::tie_mapper<T0, T1, T2, T3, T4, T5, T6, T7>::type
|
||||
tie(T0& t0, T1& t1, T2& t2, T3& t3,
|
||||
T4& t4, T5& t5, T6& t6, T7& t7) {
|
||||
typedef typename detail::tie_mapper
|
||||
<T0, T1, T2, T3, T4, T5, T6, T7>::type t;
|
||||
return t(t0, t1, t2, t3, t4, t5, t6, t7);
|
||||
}
|
||||
|
||||
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6,
|
||||
class T7, class T8>
|
||||
inline typename detail::tie_mapper
|
||||
<T0, T1, T2, T3, T4, T5, T6, T7, T8>::type
|
||||
tie(T0& t0, T1& t1, T2& t2, T3& t3,
|
||||
T4& t4, T5& t5, T6& t6, T7& t7,
|
||||
T8& t8) {
|
||||
typedef typename detail::tie_mapper
|
||||
<T0, T1, T2, T3, T4, T5, T6, T7, T8>::type t;
|
||||
return t(t0, t1, t2, t3, t4, t5, t6, t7, t8);
|
||||
}
|
||||
|
||||
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6,
|
||||
class T7, class T8, class T9>
|
||||
inline typename detail::tie_mapper
|
||||
<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::type
|
||||
tie(T0& t0, T1& t1, T2& t2, T3& t3,
|
||||
T4& t4, T5& t5, T6& t6, T7& t7,
|
||||
T8& t8, T9& t9) {
|
||||
typedef typename detail::tie_mapper
|
||||
<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::type t;
|
||||
return t(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9);
|
||||
}
|
||||
|
||||
template <class T0, class T1, class T2, class T3, class T4,
|
||||
class T5, class T6, class T7, class T8, class T9>
|
||||
void swap(tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>& lhs,
|
||||
tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>& rhs);
|
||||
inline void swap(null_type&, null_type&) {}
|
||||
template<class HH>
|
||||
inline void swap(cons<HH, null_type>& lhs, cons<HH, null_type>& rhs) {
|
||||
::boost::swap(lhs.head, rhs.head);
|
||||
}
|
||||
template<class HH, class TT>
|
||||
inline void swap(cons<HH, TT>& lhs, cons<HH, TT>& rhs) {
|
||||
::boost::swap(lhs.head, rhs.head);
|
||||
::boost::tuples::swap(lhs.tail, rhs.tail);
|
||||
}
|
||||
template <class T0, class T1, class T2, class T3, class T4,
|
||||
class T5, class T6, class T7, class T8, class T9>
|
||||
inline void swap(tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>& lhs,
|
||||
tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>& rhs) {
|
||||
typedef tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> tuple_type;
|
||||
typedef typename tuple_type::inherited base;
|
||||
::boost::tuples::swap(static_cast<base&>(lhs), static_cast<base&>(rhs));
|
||||
}
|
||||
|
||||
} // end of namespace tuples
|
||||
} // end of namespace boost
|
||||
|
||||
|
||||
#if BOOST_GCC >= 40700
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
|
||||
#endif // BOOST_TUPLE_BASIC_HPP
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
#ifndef BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_AUX_TAG_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$
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
struct list_tag;
|
||||
struct l_iter_tag;
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED
|
||||
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
* 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/capabilities.hpp
|
||||
*
|
||||
* This header defines feature capabilities macros.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_ATOMIC_CAPABILITIES_HPP_INCLUDED_
|
||||
#define BOOST_ATOMIC_CAPABILITIES_HPP_INCLUDED_
|
||||
|
||||
#include <boost/atomic/detail/config.hpp>
|
||||
#include <boost/atomic/detail/platform.hpp>
|
||||
#include <boost/atomic/detail/int_sizes.hpp>
|
||||
|
||||
#if !defined(BOOST_ATOMIC_EMULATED)
|
||||
#include BOOST_ATOMIC_DETAIL_HEADER(boost/atomic/detail/caps_)
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_ATOMIC_INT8_LOCK_FREE
|
||||
#define BOOST_ATOMIC_INT8_LOCK_FREE 0
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_ATOMIC_INT16_LOCK_FREE
|
||||
#define BOOST_ATOMIC_INT16_LOCK_FREE 0
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_ATOMIC_INT32_LOCK_FREE
|
||||
#define BOOST_ATOMIC_INT32_LOCK_FREE 0
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_ATOMIC_INT64_LOCK_FREE
|
||||
#define BOOST_ATOMIC_INT64_LOCK_FREE 0
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_ATOMIC_INT128_LOCK_FREE
|
||||
#define BOOST_ATOMIC_INT128_LOCK_FREE 0
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef BOOST_ATOMIC_CHAR_LOCK_FREE
|
||||
#define BOOST_ATOMIC_CHAR_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_ATOMIC_CHAR16_T_LOCK_FREE
|
||||
#define BOOST_ATOMIC_CHAR16_T_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_ATOMIC_CHAR32_T_LOCK_FREE
|
||||
#define BOOST_ATOMIC_CHAR32_T_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_ATOMIC_WCHAR_T_LOCK_FREE
|
||||
#if BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 1
|
||||
#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE
|
||||
#elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 2
|
||||
#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE
|
||||
#elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 4
|
||||
#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE
|
||||
#elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 8
|
||||
#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE
|
||||
#else
|
||||
#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_ATOMIC_SHORT_LOCK_FREE
|
||||
#if BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 1
|
||||
#define BOOST_ATOMIC_SHORT_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE
|
||||
#elif BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 2
|
||||
#define BOOST_ATOMIC_SHORT_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE
|
||||
#elif BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 4
|
||||
#define BOOST_ATOMIC_SHORT_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE
|
||||
#elif BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 8
|
||||
#define BOOST_ATOMIC_SHORT_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE
|
||||
#else
|
||||
#define BOOST_ATOMIC_SHORT_LOCK_FREE 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_ATOMIC_INT_LOCK_FREE
|
||||
#if BOOST_ATOMIC_DETAIL_SIZEOF_INT == 1
|
||||
#define BOOST_ATOMIC_INT_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE
|
||||
#elif BOOST_ATOMIC_DETAIL_SIZEOF_INT == 2
|
||||
#define BOOST_ATOMIC_INT_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE
|
||||
#elif BOOST_ATOMIC_DETAIL_SIZEOF_INT == 4
|
||||
#define BOOST_ATOMIC_INT_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE
|
||||
#elif BOOST_ATOMIC_DETAIL_SIZEOF_INT == 8
|
||||
#define BOOST_ATOMIC_INT_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE
|
||||
#else
|
||||
#define BOOST_ATOMIC_INT_LOCK_FREE 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_ATOMIC_LONG_LOCK_FREE
|
||||
#if BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 1
|
||||
#define BOOST_ATOMIC_LONG_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE
|
||||
#elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 2
|
||||
#define BOOST_ATOMIC_LONG_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE
|
||||
#elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 4
|
||||
#define BOOST_ATOMIC_LONG_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE
|
||||
#elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 8
|
||||
#define BOOST_ATOMIC_LONG_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE
|
||||
#else
|
||||
#define BOOST_ATOMIC_LONG_LOCK_FREE 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_ATOMIC_LLONG_LOCK_FREE
|
||||
#if BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 1
|
||||
#define BOOST_ATOMIC_LLONG_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE
|
||||
#elif BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 2
|
||||
#define BOOST_ATOMIC_LLONG_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE
|
||||
#elif BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 4
|
||||
#define BOOST_ATOMIC_LLONG_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE
|
||||
#elif BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 8
|
||||
#define BOOST_ATOMIC_LLONG_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE
|
||||
#else
|
||||
#define BOOST_ATOMIC_LLONG_LOCK_FREE 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_ATOMIC_POINTER_LOCK_FREE
|
||||
#if (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER + 0) == 8
|
||||
#define BOOST_ATOMIC_POINTER_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE
|
||||
#elif (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER + 0) == 4
|
||||
#define BOOST_ATOMIC_POINTER_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE
|
||||
#else
|
||||
#define BOOST_ATOMIC_POINTER_LOCK_FREE 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define BOOST_ATOMIC_ADDRESS_LOCK_FREE BOOST_ATOMIC_POINTER_LOCK_FREE
|
||||
|
||||
#ifndef BOOST_ATOMIC_BOOL_LOCK_FREE
|
||||
// We store bools in 1-byte storage in all backends
|
||||
#define BOOST_ATOMIC_BOOL_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_ATOMIC_FLAG_LOCK_FREE
|
||||
#define BOOST_ATOMIC_FLAG_LOCK_FREE BOOST_ATOMIC_BOOL_LOCK_FREE
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_ATOMIC_THREAD_FENCE
|
||||
#define BOOST_ATOMIC_THREAD_FENCE 0
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_ATOMIC_SIGNAL_FENCE
|
||||
#define BOOST_ATOMIC_SIGNAL_FENCE 0
|
||||
#endif
|
||||
|
||||
#endif // BOOST_ATOMIC_CAPABILITIES_HPP_INCLUDED_
|
||||
@@ -0,0 +1,374 @@
|
||||
// Copyright David Abrahams 2002.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef OPERATORS_DWA2002530_HPP
|
||||
# define OPERATORS_DWA2002530_HPP
|
||||
|
||||
# include <boost/python/detail/prefix.hpp>
|
||||
|
||||
# include <boost/python/def_visitor.hpp>
|
||||
# include <boost/python/converter/arg_to_python.hpp>
|
||||
# include <boost/python/detail/operator_id.hpp>
|
||||
# include <boost/python/detail/not_specified.hpp>
|
||||
# include <boost/python/back_reference.hpp>
|
||||
# include <boost/mpl/if.hpp>
|
||||
# include <boost/mpl/eval_if.hpp>
|
||||
# include <boost/python/self.hpp>
|
||||
# include <boost/python/other.hpp>
|
||||
# include <boost/lexical_cast.hpp>
|
||||
# include <boost/python/refcount.hpp>
|
||||
# include <boost/python/detail/unwrap_wrapper.hpp>
|
||||
# include <string>
|
||||
# include <complex>
|
||||
|
||||
namespace boost { namespace python {
|
||||
|
||||
namespace detail
|
||||
{
|
||||
// This is essentially the old v1 to_python(). It will be eliminated
|
||||
// once the public interface for to_python is settled on.
|
||||
template <class T>
|
||||
PyObject* convert_result(T const& x)
|
||||
{
|
||||
return converter::arg_to_python<T>(x).release();
|
||||
}
|
||||
|
||||
// Operator implementation template declarations. The nested apply
|
||||
// declaration here keeps MSVC6 happy.
|
||||
template <operator_id> struct operator_l
|
||||
{
|
||||
template <class L, class R> struct apply;
|
||||
};
|
||||
|
||||
template <operator_id> struct operator_r
|
||||
{
|
||||
template <class L, class R> struct apply;
|
||||
};
|
||||
|
||||
template <operator_id> struct operator_1
|
||||
{
|
||||
template <class T> struct apply;
|
||||
};
|
||||
|
||||
// MSVC6 doesn't want us to do this sort of inheritance on a nested
|
||||
// class template, so we use this layer of indirection to avoid
|
||||
// ::template<...> on the nested apply functions below
|
||||
template <operator_id id, class L, class R>
|
||||
struct operator_l_inner
|
||||
: operator_l<id>::template apply<L,R>
|
||||
{};
|
||||
|
||||
template <operator_id id, class L, class R>
|
||||
struct operator_r_inner
|
||||
: operator_r<id>::template apply<L,R>
|
||||
{};
|
||||
|
||||
template <operator_id id, class T>
|
||||
struct operator_1_inner
|
||||
: operator_1<id>::template apply<T>
|
||||
{};
|
||||
|
||||
// Define three different binary_op templates which take care of
|
||||
// these cases:
|
||||
// self op self
|
||||
// self op R
|
||||
// L op self
|
||||
//
|
||||
// The inner apply metafunction is used to adjust the operator to
|
||||
// the class type being defined. Inheritance of the outer class is
|
||||
// simply used to provide convenient access to the operation's
|
||||
// name().
|
||||
|
||||
// self op self
|
||||
template <operator_id id>
|
||||
struct binary_op : operator_l<id>
|
||||
{
|
||||
template <class T>
|
||||
struct apply : operator_l_inner<id,T,T>
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
// self op R
|
||||
template <operator_id id, class R>
|
||||
struct binary_op_l : operator_l<id>
|
||||
{
|
||||
template <class T>
|
||||
struct apply : operator_l_inner<id,T,R>
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
// L op self
|
||||
template <operator_id id, class L>
|
||||
struct binary_op_r : operator_r<id>
|
||||
{
|
||||
template <class T>
|
||||
struct apply : operator_r_inner<id,L,T>
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
template <operator_id id>
|
||||
struct unary_op : operator_1<id>
|
||||
{
|
||||
template <class T>
|
||||
struct apply : operator_1_inner<id,T>
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
// This type is what actually gets returned from operators used on
|
||||
// self_t
|
||||
template <operator_id id, class L = not_specified, class R = not_specified>
|
||||
struct operator_
|
||||
: def_visitor<operator_<id,L,R> >
|
||||
{
|
||||
private:
|
||||
template <class ClassT>
|
||||
void visit(ClassT& cl) const
|
||||
{
|
||||
typedef typename mpl::eval_if<
|
||||
is_same<L,self_t>
|
||||
, mpl::if_<
|
||||
is_same<R,self_t>
|
||||
, binary_op<id>
|
||||
, binary_op_l<
|
||||
id
|
||||
, BOOST_DEDUCED_TYPENAME unwrap_other<R>::type
|
||||
>
|
||||
>
|
||||
, mpl::if_<
|
||||
is_same<L,not_specified>
|
||||
, unary_op<id>
|
||||
, binary_op_r<
|
||||
id
|
||||
, BOOST_DEDUCED_TYPENAME unwrap_other<L>::type
|
||||
>
|
||||
>
|
||||
>::type generator;
|
||||
|
||||
cl.def(
|
||||
generator::name()
|
||||
, &generator::template apply<
|
||||
BOOST_DEDUCED_TYPENAME ClassT::wrapped_type
|
||||
>::execute
|
||||
);
|
||||
}
|
||||
|
||||
friend class python::def_visitor_access;
|
||||
};
|
||||
}
|
||||
|
||||
# define BOOST_PYTHON_BINARY_OPERATION(id, rid, expr) \
|
||||
namespace detail \
|
||||
{ \
|
||||
template <> \
|
||||
struct operator_l<op_##id> \
|
||||
{ \
|
||||
template <class L, class R> \
|
||||
struct apply \
|
||||
{ \
|
||||
typedef typename unwrap_wrapper_<L>::type lhs; \
|
||||
typedef typename unwrap_wrapper_<R>::type rhs; \
|
||||
static PyObject* execute(lhs& l, rhs const& r) \
|
||||
{ \
|
||||
return detail::convert_result(expr); \
|
||||
} \
|
||||
}; \
|
||||
static char const* name() { return "__" #id "__"; } \
|
||||
}; \
|
||||
\
|
||||
template <> \
|
||||
struct operator_r<op_##id> \
|
||||
{ \
|
||||
template <class L, class R> \
|
||||
struct apply \
|
||||
{ \
|
||||
typedef typename unwrap_wrapper_<L>::type lhs; \
|
||||
typedef typename unwrap_wrapper_<R>::type rhs; \
|
||||
static PyObject* execute(rhs& r, lhs const& l) \
|
||||
{ \
|
||||
return detail::convert_result(expr); \
|
||||
} \
|
||||
}; \
|
||||
static char const* name() { return "__" #rid "__"; } \
|
||||
}; \
|
||||
}
|
||||
|
||||
# define BOOST_PYTHON_BINARY_OPERATOR(id, rid, op) \
|
||||
BOOST_PYTHON_BINARY_OPERATION(id, rid, l op r) \
|
||||
namespace self_ns \
|
||||
{ \
|
||||
template <class L, class R> \
|
||||
inline detail::operator_<detail::op_##id,L,R> \
|
||||
operator op(L const&, R const&) \
|
||||
{ \
|
||||
return detail::operator_<detail::op_##id,L,R>(); \
|
||||
} \
|
||||
}
|
||||
|
||||
BOOST_PYTHON_BINARY_OPERATOR(add, radd, +)
|
||||
BOOST_PYTHON_BINARY_OPERATOR(sub, rsub, -)
|
||||
BOOST_PYTHON_BINARY_OPERATOR(mul, rmul, *)
|
||||
#if PY_VERSION_HEX >= 0x03000000
|
||||
BOOST_PYTHON_BINARY_OPERATOR(truediv, rtruediv, /)
|
||||
#else
|
||||
BOOST_PYTHON_BINARY_OPERATOR(div, rdiv, /)
|
||||
#endif
|
||||
BOOST_PYTHON_BINARY_OPERATOR(mod, rmod, %)
|
||||
BOOST_PYTHON_BINARY_OPERATOR(lshift, rlshift, <<)
|
||||
BOOST_PYTHON_BINARY_OPERATOR(rshift, rrshift, >>)
|
||||
BOOST_PYTHON_BINARY_OPERATOR(and, rand, &)
|
||||
BOOST_PYTHON_BINARY_OPERATOR(xor, rxor, ^)
|
||||
BOOST_PYTHON_BINARY_OPERATOR(or, ror, |)
|
||||
BOOST_PYTHON_BINARY_OPERATOR(gt, lt, >)
|
||||
BOOST_PYTHON_BINARY_OPERATOR(ge, le, >=)
|
||||
BOOST_PYTHON_BINARY_OPERATOR(lt, gt, <)
|
||||
BOOST_PYTHON_BINARY_OPERATOR(le, ge, <=)
|
||||
BOOST_PYTHON_BINARY_OPERATOR(eq, eq, ==)
|
||||
BOOST_PYTHON_BINARY_OPERATOR(ne, ne, !=)
|
||||
# undef BOOST_PYTHON_BINARY_OPERATOR
|
||||
|
||||
// pow isn't an operator in C++; handle it specially.
|
||||
BOOST_PYTHON_BINARY_OPERATION(pow, rpow, pow(l,r))
|
||||
# undef BOOST_PYTHON_BINARY_OPERATION
|
||||
|
||||
namespace self_ns
|
||||
{
|
||||
# ifndef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
template <class L, class R>
|
||||
inline detail::operator_<detail::op_pow,L,R>
|
||||
pow(L const&, R const&)
|
||||
{
|
||||
return detail::operator_<detail::op_pow,L,R>();
|
||||
}
|
||||
# else
|
||||
// When there's no argument-dependent lookup, we need these
|
||||
// overloads to handle the case when everything is imported into the
|
||||
// global namespace. Note that the plain overload below does /not/
|
||||
// take const& arguments. This is needed by MSVC6 at least, or it
|
||||
// complains of ambiguities, since there's no partial ordering.
|
||||
inline detail::operator_<detail::op_pow,self_t,self_t>
|
||||
pow(self_t, self_t)
|
||||
{
|
||||
return detail::operator_<detail::op_pow,self_t,self_t>();
|
||||
}
|
||||
template <class R>
|
||||
inline detail::operator_<detail::op_pow,self_t,R>
|
||||
pow(self_t const&, R const&)
|
||||
{
|
||||
return detail::operator_<detail::op_pow,self_t,R>();
|
||||
}
|
||||
template <class L>
|
||||
inline detail::operator_<detail::op_pow,L,self_t>
|
||||
pow(L const&, self_t const&)
|
||||
{
|
||||
return detail::operator_<detail::op_pow,L,self_t>();
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
# define BOOST_PYTHON_INPLACE_OPERATOR(id, op) \
|
||||
namespace detail \
|
||||
{ \
|
||||
template <> \
|
||||
struct operator_l<op_##id> \
|
||||
{ \
|
||||
template <class L, class R> \
|
||||
struct apply \
|
||||
{ \
|
||||
typedef typename unwrap_wrapper_<L>::type lhs; \
|
||||
typedef typename unwrap_wrapper_<R>::type rhs; \
|
||||
static PyObject* \
|
||||
execute(back_reference<lhs&> l, rhs const& r) \
|
||||
{ \
|
||||
l.get() op r; \
|
||||
return python::incref(l.source().ptr()); \
|
||||
} \
|
||||
}; \
|
||||
static char const* name() { return "__" #id "__"; } \
|
||||
}; \
|
||||
} \
|
||||
namespace self_ns \
|
||||
{ \
|
||||
template <class R> \
|
||||
inline detail::operator_<detail::op_##id,self_t,R> \
|
||||
operator op(self_t const&, R const&) \
|
||||
{ \
|
||||
return detail::operator_<detail::op_##id,self_t,R>(); \
|
||||
} \
|
||||
}
|
||||
|
||||
BOOST_PYTHON_INPLACE_OPERATOR(iadd,+=)
|
||||
BOOST_PYTHON_INPLACE_OPERATOR(isub,-=)
|
||||
BOOST_PYTHON_INPLACE_OPERATOR(imul,*=)
|
||||
BOOST_PYTHON_INPLACE_OPERATOR(idiv,/=)
|
||||
BOOST_PYTHON_INPLACE_OPERATOR(imod,%=)
|
||||
BOOST_PYTHON_INPLACE_OPERATOR(ilshift,<<=)
|
||||
BOOST_PYTHON_INPLACE_OPERATOR(irshift,>>=)
|
||||
BOOST_PYTHON_INPLACE_OPERATOR(iand,&=)
|
||||
BOOST_PYTHON_INPLACE_OPERATOR(ixor,^=)
|
||||
BOOST_PYTHON_INPLACE_OPERATOR(ior,|=)
|
||||
|
||||
# define BOOST_PYTHON_UNARY_OPERATOR(id, op, func_name) \
|
||||
namespace detail \
|
||||
{ \
|
||||
template <> \
|
||||
struct operator_1<op_##id> \
|
||||
{ \
|
||||
template <class T> \
|
||||
struct apply \
|
||||
{ \
|
||||
typedef typename unwrap_wrapper_<T>::type self_t; \
|
||||
static PyObject* execute(self_t& x) \
|
||||
{ \
|
||||
return detail::convert_result(op(x)); \
|
||||
} \
|
||||
}; \
|
||||
static char const* name() { return "__" #id "__"; } \
|
||||
}; \
|
||||
} \
|
||||
namespace self_ns \
|
||||
{ \
|
||||
inline detail::operator_<detail::op_##id> \
|
||||
func_name(self_t const&) \
|
||||
{ \
|
||||
return detail::operator_<detail::op_##id>(); \
|
||||
} \
|
||||
}
|
||||
# undef BOOST_PYTHON_INPLACE_OPERATOR
|
||||
|
||||
BOOST_PYTHON_UNARY_OPERATOR(neg, -, operator-)
|
||||
BOOST_PYTHON_UNARY_OPERATOR(pos, +, operator+)
|
||||
BOOST_PYTHON_UNARY_OPERATOR(abs, abs, abs)
|
||||
BOOST_PYTHON_UNARY_OPERATOR(invert, ~, operator~)
|
||||
#if PY_VERSION_HEX >= 0x03000000
|
||||
BOOST_PYTHON_UNARY_OPERATOR(bool, !!, operator!)
|
||||
#else
|
||||
BOOST_PYTHON_UNARY_OPERATOR(nonzero, !!, operator!)
|
||||
#endif
|
||||
BOOST_PYTHON_UNARY_OPERATOR(int, long, int_)
|
||||
BOOST_PYTHON_UNARY_OPERATOR(long, PyLong_FromLong, long_)
|
||||
BOOST_PYTHON_UNARY_OPERATOR(float, double, float_)
|
||||
BOOST_PYTHON_UNARY_OPERATOR(complex, std::complex<double>, complex_)
|
||||
BOOST_PYTHON_UNARY_OPERATOR(str, lexical_cast<std::string>, str)
|
||||
BOOST_PYTHON_UNARY_OPERATOR(repr, lexical_cast<std::string>, repr)
|
||||
# undef BOOST_PYTHON_UNARY_OPERATOR
|
||||
|
||||
}} // namespace boost::python
|
||||
|
||||
# ifdef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
using boost::python::self_ns::abs;
|
||||
using boost::python::self_ns::int_;
|
||||
using boost::python::self_ns::long_;
|
||||
using boost::python::self_ns::float_;
|
||||
using boost::python::self_ns::complex_;
|
||||
using boost::python::self_ns::str;
|
||||
using boost::python::self_ns::repr;
|
||||
using boost::python::self_ns::pow;
|
||||
# endif
|
||||
|
||||
#endif // OPERATORS_DWA2002530_HPP
|
||||
@@ -0,0 +1,39 @@
|
||||
// qra12_63_64_irr_b.h
|
||||
// Code tables and defines for Q-ary RA code (12,63) over GF(64)
|
||||
// Code Name: qra12_63_64_irr_b
|
||||
// (12,63) RA Code over GF(64) - RF=333344455567
|
||||
|
||||
// (c) 2016 - Nico Palermo - IV3NWV - Microtelecom Srl, Italy
|
||||
|
||||
// This file is part of the qracodes project, a Forward Error Control
|
||||
// encoding/decoding package based on Q-ary RA (Repeat and Accumulate) LDPC codes.
|
||||
//
|
||||
// qracodes is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
// qracodes is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with qracodes source distribution.
|
||||
// If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef _qra12_63_64_irr_b_h
|
||||
#define _qra12_63_64_irr_b_h
|
||||
|
||||
#include "qracodes.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern const qracode qra_12_63_64_irr_b;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _qra12_63_64_irr_b_h
|
||||
@@ -0,0 +1,228 @@
|
||||
/*
|
||||
[auto_generated]
|
||||
boost/numeric/odeint/iterator/detail/const_step_iterator_impl.hpp
|
||||
|
||||
[begin_description]
|
||||
tba.
|
||||
[end_description]
|
||||
|
||||
Copyright 2013 Karsten Ahnert
|
||||
Copyright 2013 Mario Mulansky
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or
|
||||
copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_NUMERIC_ODEINT_ITERATOR_DETAIL_CONST_STEP_ITERATOR_IMPL_HPP_DEFINED
|
||||
#define BOOST_NUMERIC_ODEINT_ITERATOR_DETAIL_CONST_STEP_ITERATOR_IMPL_HPP_DEFINED
|
||||
|
||||
#include <boost/numeric/odeint/iterator/detail/ode_iterator_base.hpp>
|
||||
#include <boost/numeric/odeint/util/unit_helper.hpp>
|
||||
|
||||
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
|
||||
|
||||
template< class Iterator , class Stepper , class System , class State , typename Tag , class StepperTag >
|
||||
class const_step_iterator_impl;
|
||||
|
||||
|
||||
/*
|
||||
* Specilization for steppers and error steppers
|
||||
*/
|
||||
template< class Iterator , class Stepper , class System , class State , typename Tag >
|
||||
class const_step_iterator_impl< Iterator , Stepper , System , State , Tag , stepper_tag >
|
||||
: public detail::ode_iterator_base< Iterator , Stepper , System , State , Tag >
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Stepper stepper_type;
|
||||
typedef System system_type;
|
||||
typedef typename boost::numeric::odeint::unwrap_reference< stepper_type >::type unwrapped_stepper_type;
|
||||
typedef State state_type;
|
||||
typedef typename traits::time_type< stepper_type >::type time_type;
|
||||
typedef typename traits::value_type< stepper_type >::type ode_value_type;
|
||||
#ifndef DOXYGEN_SKIP
|
||||
typedef detail::ode_iterator_base< Iterator , Stepper , System , State , Tag > base_type;
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* \brief Constructs a const_step_iterator. This constructor should be used to construct the begin iterator.
|
||||
*
|
||||
* \param stepper The stepper to use during the iteration.
|
||||
* \param sys The system function (ODE) to solve.
|
||||
* \param s The initial state. const_step_iterator stores a reference of s and changes its value during the iteration.
|
||||
* \param t The initial time.
|
||||
* \param t_end The end time, at which the iteration should stop.
|
||||
* \param dt The initial time step.
|
||||
*/
|
||||
const_step_iterator_impl( stepper_type stepper , system_type sys , state_type &s , time_type t , time_type t_end , time_type dt )
|
||||
: base_type( stepper , sys , t , dt ) , m_t_start( t ) , m_t_end( t_end ) , m_state( &s ) , m_step( 0 )
|
||||
{
|
||||
if( detail::less_with_sign( this->m_t_end , this->m_t , this->m_dt ) )
|
||||
this->m_at_end = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Constructs a const_step_iterator. This constructor should be used to construct the end iterator.
|
||||
*
|
||||
* \param stepper The stepper to use during the iteration.
|
||||
* \param sys The system function (ODE) to solve.
|
||||
* \param s The initial state. const_step_iterator stores a reference of s and changes its value during the iteration.
|
||||
*/
|
||||
const_step_iterator_impl( stepper_type stepper , system_type sys , state_type& /* s */ )
|
||||
: base_type( stepper , sys ) { }
|
||||
|
||||
protected:
|
||||
|
||||
friend class boost::iterator_core_access;
|
||||
|
||||
void increment()
|
||||
{
|
||||
if( detail::less_eq_with_sign( static_cast<time_type>(this->m_t+this->m_dt) ,
|
||||
this->m_t_end , this->m_dt ) )
|
||||
{
|
||||
unwrapped_stepper_type &stepper = this->m_stepper;
|
||||
stepper.do_step( this->m_system , *this->m_state , this->m_t , this->m_dt );
|
||||
// use integer to compute current time to reduce roundoff errors
|
||||
this->m_step++;
|
||||
this->m_t = this->m_t_start + static_cast< typename unit_value_type<time_type>::type >(this->m_step)*this->m_dt;
|
||||
} else {
|
||||
this->m_at_end = true;
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
const state_type& get_state() const
|
||||
{
|
||||
return *m_state;
|
||||
}
|
||||
|
||||
private:
|
||||
time_type m_t_start;
|
||||
time_type m_t_end;
|
||||
state_type* m_state;
|
||||
size_t m_step;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Specilization for dense output stepper
|
||||
*/
|
||||
/**
|
||||
* \brief ODE Iterator with constant step size. The value type of this iterator is the state type of the stepper.
|
||||
*
|
||||
* Implements an ODE iterator solving the ODE with constant steps. Uses dense-output steppers.
|
||||
* const_step_iterator is a model of single-pass iterator.
|
||||
*
|
||||
* The value type of this iterator is the state type of the stepper. Hence one can only access the state and not the current time.
|
||||
*
|
||||
* \tparam Stepper The stepper type which should be used during the iteration.
|
||||
* \tparam System The type of the system function (ODE) which should be solved.
|
||||
*/
|
||||
template< class Iterator , class Stepper , class System , class State , typename Tag >
|
||||
class const_step_iterator_impl< Iterator , Stepper , System , State , Tag , dense_output_stepper_tag >
|
||||
: public detail::ode_iterator_base< Iterator , Stepper , System , State , Tag >
|
||||
{
|
||||
private:
|
||||
|
||||
typedef Stepper stepper_type;
|
||||
typedef System system_type;
|
||||
typedef typename boost::numeric::odeint::unwrap_reference< stepper_type >::type unwrapped_stepper_type;
|
||||
typedef State state_type;
|
||||
typedef typename traits::time_type< stepper_type >::type time_type;
|
||||
typedef typename traits::value_type< stepper_type >::type ode_value_type;
|
||||
#ifndef DOXYGEN_SKIP
|
||||
typedef detail::ode_iterator_base< Iterator , Stepper , System , State , Tag > base_type;
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* \brief Constructs a const_step_iterator. This constructor should be used to construct the begin iterator.
|
||||
*
|
||||
* \param stepper The stepper to use during the iteration.
|
||||
* \param sys The system function (ODE) to solve.
|
||||
* \param s The initial state. const_step_iterator stores a reference of s and changes its value during the iteration.
|
||||
* \param t The initial time.
|
||||
* \param t_end The end time, at which the iteration should stop.
|
||||
* \param dt The initial time step.
|
||||
*/
|
||||
const_step_iterator_impl( stepper_type stepper , system_type sys , state_type &s , time_type t , time_type t_end , time_type dt )
|
||||
: base_type( stepper , sys , t , dt ) , m_t_start( t ) , m_t_end( t_end ) , m_state( &s ) , m_step( 0 )
|
||||
{
|
||||
if( detail::less_eq_with_sign( this->m_t , this->m_t_end , this->m_dt ) )
|
||||
{
|
||||
unwrapped_stepper_type &st = this->m_stepper;
|
||||
st.initialize( * ( this->m_state ) , this->m_t , this->m_dt );
|
||||
} else {
|
||||
this->m_at_end = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Constructs a const_step_iterator. This constructor should be used to construct the end iterator.
|
||||
*
|
||||
* \param stepper The stepper to use during the iteration.
|
||||
* \param sys The system function (ODE) to solve.
|
||||
* \param s The initial state. const_step_iterator stores a reference of s and changes its value during the iteration.
|
||||
*/
|
||||
const_step_iterator_impl( stepper_type stepper , system_type sys , state_type &s )
|
||||
: base_type( stepper , sys ) , m_state( &s )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
friend class boost::iterator_core_access;
|
||||
|
||||
void increment( void )
|
||||
{
|
||||
if( detail::less_eq_with_sign( static_cast<time_type>(this->m_t+this->m_dt) ,
|
||||
this->m_t_end , this->m_dt ) )
|
||||
{
|
||||
unwrapped_stepper_type &stepper = this->m_stepper;
|
||||
// use integer to compute current time to reduce roundoff errors
|
||||
this->m_step++;
|
||||
this->m_t = this->m_t_start + static_cast< typename unit_value_type<time_type>::type >(this->m_step)*this->m_dt;
|
||||
while( detail::less_with_sign( stepper.current_time() , this->m_t ,
|
||||
stepper.current_time_step() ) )
|
||||
{
|
||||
stepper.do_step( this->m_system );
|
||||
}
|
||||
stepper.calc_state( this->m_t , *( this->m_state ) );
|
||||
} else {
|
||||
this->m_at_end = true;
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
const state_type& get_state() const
|
||||
{
|
||||
return *m_state;
|
||||
}
|
||||
|
||||
private:
|
||||
time_type m_t_start;
|
||||
time_type m_t_end;
|
||||
state_type* m_state;
|
||||
size_t m_step;
|
||||
};
|
||||
|
||||
} // namespace odeint
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif // BOOST_NUMERIC_ODEINT_ITERATOR_DETAIL_CONST_STEP_ITERATOR_IMPL_HPP_DEFINED
|
||||
@@ -0,0 +1,66 @@
|
||||
#ifndef GREG_WEEKDAY_HPP___
|
||||
#define GREG_WEEKDAY_HPP___
|
||||
|
||||
/* Copyright (c) 2002,2003 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/constrained_value.hpp"
|
||||
#include "boost/date_time/date_defs.hpp"
|
||||
#include "boost/date_time/compiler_config.hpp"
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
namespace boost {
|
||||
namespace gregorian {
|
||||
|
||||
//bring enum values into the namespace
|
||||
using date_time::Sunday;
|
||||
using date_time::Monday;
|
||||
using date_time::Tuesday;
|
||||
using date_time::Wednesday;
|
||||
using date_time::Thursday;
|
||||
using date_time::Friday;
|
||||
using date_time::Saturday;
|
||||
|
||||
|
||||
//! Exception that flags that a weekday number is incorrect
|
||||
struct bad_weekday : public std::out_of_range
|
||||
{
|
||||
bad_weekday() : std::out_of_range(std::string("Weekday is out of range 0..6")) {}
|
||||
};
|
||||
typedef CV::simple_exception_policy<unsigned short, 0, 6, bad_weekday> greg_weekday_policies;
|
||||
typedef CV::constrained_value<greg_weekday_policies> greg_weekday_rep;
|
||||
|
||||
|
||||
//! Represent a day within a week (range 0==Sun to 6==Sat)
|
||||
class BOOST_DATE_TIME_DECL greg_weekday : public greg_weekday_rep {
|
||||
public:
|
||||
typedef boost::date_time::weekdays weekday_enum;
|
||||
greg_weekday(unsigned short day_of_week_num) :
|
||||
greg_weekday_rep(day_of_week_num)
|
||||
{}
|
||||
|
||||
unsigned short as_number() const {return value_;}
|
||||
const char* as_short_string() const;
|
||||
const char* as_long_string() const;
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
const wchar_t* as_short_wstring() const;
|
||||
const wchar_t* as_long_wstring() const;
|
||||
#endif // BOOST_NO_STD_WSTRING
|
||||
weekday_enum as_enum() const {return static_cast<weekday_enum>(value_);}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
} } //namespace gregorian
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Run all the examples, and check the output against the corresponding -out
|
||||
# file. Note that slight differences are possible when the examples are
|
||||
# run on different machines, due to slightly different round-off errors.
|
||||
|
||||
for e in `ls ex-* | grep -v "\\." | grep -v .-out`
|
||||
do
|
||||
echo Running $e:
|
||||
$e 2>&1 | diff ${e}-out -
|
||||
echo " "
|
||||
done
|
||||
@@ -0,0 +1,19 @@
|
||||
/*==============================================================================
|
||||
Copyright (c) 2001-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)
|
||||
==============================================================================*/
|
||||
#ifndef BOOST_PHOENIX_OBJECT_HPP
|
||||
#define BOOST_PHOENIX_OBJECT_HPP
|
||||
|
||||
#include <boost/phoenix/object/const_cast.hpp>
|
||||
#include <boost/phoenix/object/construct.hpp>
|
||||
#include <boost/phoenix/object/delete.hpp>
|
||||
#include <boost/phoenix/object/dynamic_cast.hpp>
|
||||
#include <boost/phoenix/object/new.hpp>
|
||||
#include <boost/phoenix/object/reinterpret_cast.hpp>
|
||||
#include <boost/phoenix/object/static_cast.hpp>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
#ifndef BOOST_MPL_LONG_FWD_HPP_INCLUDED
|
||||
#define BOOST_MPL_LONG_FWD_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/aux_/adl_barrier.hpp>
|
||||
#include <boost/mpl/aux_/nttp_decl.hpp>
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
|
||||
|
||||
template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct long_;
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
|
||||
BOOST_MPL_AUX_ADL_BARRIER_DECL(long_)
|
||||
|
||||
#endif // BOOST_MPL_LONG_FWD_HPP_INCLUDED
|
||||
@@ -0,0 +1,421 @@
|
||||
// (C) Copyright Gennadiy Rozental 2001.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org/libs/test for the library home page.
|
||||
//
|
||||
// File : $RCSfile$
|
||||
//
|
||||
// Version : $Revision$
|
||||
//
|
||||
// Description : token iterator for string and range tokenization
|
||||
// ***************************************************************************
|
||||
|
||||
#ifndef BOOST_TEST_UTILS_TOKEN_ITERATOR_HPP
|
||||
#define BOOST_TEST_UTILS_TOKEN_ITERATOR_HPP
|
||||
|
||||
// Boost
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#include <boost/iterator/iterator_categories.hpp>
|
||||
#include <boost/iterator/iterator_traits.hpp>
|
||||
|
||||
#include <boost/test/utils/iterator/input_iterator_facade.hpp>
|
||||
#include <boost/test/utils/basic_cstring/basic_cstring.hpp>
|
||||
#include <boost/test/utils/named_params.hpp>
|
||||
#include <boost/test/utils/foreach.hpp>
|
||||
|
||||
// STL
|
||||
#include <iosfwd>
|
||||
#include <cctype>
|
||||
|
||||
#include <boost/test/detail/suppress_warnings.hpp>
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
#ifdef BOOST_NO_STDC_NAMESPACE
|
||||
namespace std{ using ::ispunct; using ::isspace; }
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace unit_test {
|
||||
namespace utils {
|
||||
|
||||
// ************************************************************************** //
|
||||
// ************** ti_delimeter_type ************** //
|
||||
// ************************************************************************** //
|
||||
|
||||
enum ti_delimeter_type {
|
||||
dt_char, // character is delimeter if it among explicit list of some characters
|
||||
dt_ispunct, // character is delimeter if it satisfies ispunct functor
|
||||
dt_isspace, // character is delimeter if it satisfies isspace functor
|
||||
dt_none // no character is delimeter
|
||||
};
|
||||
|
||||
namespace ut_detail {
|
||||
|
||||
// ************************************************************************** //
|
||||
// ************** default_char_compare ************** //
|
||||
// ************************************************************************** //
|
||||
|
||||
template<typename CharT>
|
||||
class default_char_compare {
|
||||
public:
|
||||
bool operator()( CharT c1, CharT c2 )
|
||||
{
|
||||
#ifdef BOOST_CLASSIC_IOSTREAMS
|
||||
return std::string_char_traits<CharT>::eq( c1, c2 );
|
||||
#else
|
||||
return std::char_traits<CharT>::eq( c1, c2 );
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
// ************************************************************************** //
|
||||
// ************** delim_policy ************** //
|
||||
// ************************************************************************** //
|
||||
|
||||
template<typename CharT,typename CharCompare>
|
||||
class delim_policy {
|
||||
typedef basic_cstring<CharT const> cstring;
|
||||
public:
|
||||
// Constructor
|
||||
explicit delim_policy( ti_delimeter_type type_ = dt_char, cstring delimeters_ = cstring() )
|
||||
: m_type( type_ )
|
||||
{
|
||||
set_delimeters( delimeters_ );
|
||||
}
|
||||
|
||||
void set_delimeters( ti_delimeter_type type_ ) { m_type = type_; }
|
||||
void set_delimeters( cstring delimeters_ )
|
||||
{
|
||||
m_delimeters = delimeters_;
|
||||
|
||||
if( !m_delimeters.is_empty() )
|
||||
m_type = dt_char;
|
||||
}
|
||||
void set_delimeters( nfp::nil ) {}
|
||||
bool operator()( CharT c )
|
||||
{
|
||||
switch( m_type ) {
|
||||
case dt_char: {
|
||||
BOOST_TEST_FOREACH( CharT, delim, m_delimeters )
|
||||
if( CharCompare()( delim, c ) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
case dt_ispunct:
|
||||
return (std::ispunct)( c ) != 0;
|
||||
case dt_isspace:
|
||||
return (std::isspace)( c ) != 0;
|
||||
case dt_none:
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
// Data members
|
||||
cstring m_delimeters;
|
||||
ti_delimeter_type m_type;
|
||||
};
|
||||
|
||||
// ************************************************************************** //
|
||||
// ************** token_assigner ************** //
|
||||
// ************************************************************************** //
|
||||
|
||||
template<typename TraversalTag>
|
||||
struct token_assigner {
|
||||
#if BOOST_WORKAROUND( BOOST_DINKUMWARE_STDLIB, < 306 )
|
||||
template<typename Iterator, typename C, typename T>
|
||||
static void assign( Iterator b, Iterator e, std::basic_string<C,T>& t )
|
||||
{ for( ; b != e; ++b ) t += *b; }
|
||||
|
||||
template<typename Iterator, typename C>
|
||||
static void assign( Iterator b, Iterator e, basic_cstring<C>& t ) { t.assign( b, e ); }
|
||||
#else
|
||||
template<typename Iterator, typename Token>
|
||||
static void assign( Iterator b, Iterator e, Token& t ) { t.assign( b, e ); }
|
||||
#endif
|
||||
template<typename Iterator, typename Token>
|
||||
static void append_move( Iterator& b, Token& ) { ++b; }
|
||||
};
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
template<>
|
||||
struct token_assigner<single_pass_traversal_tag> {
|
||||
template<typename Iterator, typename Token>
|
||||
static void assign( Iterator /*b*/, Iterator /*e*/, Token& /*t*/ ) {}
|
||||
|
||||
template<typename Iterator, typename Token>
|
||||
static void append_move( Iterator& b, Token& t ) { t += *b; ++b; }
|
||||
};
|
||||
|
||||
} // namespace ut_detail
|
||||
|
||||
// ************************************************************************** //
|
||||
// ************** modifiers ************** //
|
||||
// ************************************************************************** //
|
||||
|
||||
namespace {
|
||||
nfp::keyword<struct dropped_delimeters_t > dropped_delimeters;
|
||||
nfp::keyword<struct kept_delimeters_t > kept_delimeters;
|
||||
nfp::typed_keyword<bool,struct keep_empty_tokens_t > keep_empty_tokens;
|
||||
nfp::typed_keyword<std::size_t,struct max_tokens_t > max_tokens;
|
||||
}
|
||||
|
||||
// ************************************************************************** //
|
||||
// ************** token_iterator_base ************** //
|
||||
// ************************************************************************** //
|
||||
|
||||
template<typename Derived,
|
||||
typename CharT,
|
||||
typename CharCompare = ut_detail::default_char_compare<CharT>,
|
||||
typename ValueType = basic_cstring<CharT const>,
|
||||
typename Reference = basic_cstring<CharT const>,
|
||||
typename Traversal = forward_traversal_tag>
|
||||
class token_iterator_base
|
||||
: public input_iterator_facade<Derived,ValueType,Reference,Traversal> {
|
||||
typedef basic_cstring<CharT const> cstring;
|
||||
typedef ut_detail::delim_policy<CharT,CharCompare> delim_policy;
|
||||
typedef input_iterator_facade<Derived,ValueType,Reference,Traversal> base;
|
||||
|
||||
protected:
|
||||
// Constructor
|
||||
explicit token_iterator_base()
|
||||
: m_is_dropped( dt_isspace )
|
||||
, m_is_kept( dt_ispunct )
|
||||
, m_keep_empty_tokens( false )
|
||||
, m_tokens_left( static_cast<std::size_t>(-1) )
|
||||
, m_token_produced( false )
|
||||
{
|
||||
}
|
||||
|
||||
template<typename Modifier>
|
||||
void
|
||||
apply_modifier( Modifier const& m )
|
||||
{
|
||||
if( m.has( dropped_delimeters ) )
|
||||
m_is_dropped.set_delimeters( m[dropped_delimeters] );
|
||||
|
||||
if( m.has( kept_delimeters ) )
|
||||
m_is_kept.set_delimeters( m[kept_delimeters] );
|
||||
|
||||
if( m.has( keep_empty_tokens ) )
|
||||
m_keep_empty_tokens = true;
|
||||
|
||||
nfp::opt_assign( m_tokens_left, m, max_tokens );
|
||||
}
|
||||
|
||||
template<typename Iter>
|
||||
bool get( Iter& begin, Iter end )
|
||||
{
|
||||
typedef ut_detail::token_assigner<BOOST_DEDUCED_TYPENAME iterator_traversal<Iter>::type> Assigner;
|
||||
Iter check_point;
|
||||
|
||||
this->m_value.clear();
|
||||
|
||||
if( !m_keep_empty_tokens ) {
|
||||
while( begin != end && m_is_dropped( *begin ) )
|
||||
++begin;
|
||||
|
||||
if( begin == end )
|
||||
return false;
|
||||
|
||||
check_point = begin;
|
||||
|
||||
if( m_tokens_left == 1 )
|
||||
while( begin != end )
|
||||
Assigner::append_move( begin, this->m_value );
|
||||
else if( m_is_kept( *begin ) )
|
||||
Assigner::append_move( begin, this->m_value );
|
||||
else
|
||||
while( begin != end && !m_is_dropped( *begin ) && !m_is_kept( *begin ) )
|
||||
Assigner::append_move( begin, this->m_value );
|
||||
|
||||
--m_tokens_left;
|
||||
}
|
||||
else { // m_keep_empty_tokens is true
|
||||
check_point = begin;
|
||||
|
||||
if( begin == end ) {
|
||||
if( m_token_produced )
|
||||
return false;
|
||||
|
||||
m_token_produced = true;
|
||||
}
|
||||
if( m_is_kept( *begin ) ) {
|
||||
if( m_token_produced )
|
||||
Assigner::append_move( begin, this->m_value );
|
||||
|
||||
m_token_produced = !m_token_produced;
|
||||
}
|
||||
else if( !m_token_produced && m_is_dropped( *begin ) )
|
||||
m_token_produced = true;
|
||||
else {
|
||||
if( m_is_dropped( *begin ) )
|
||||
check_point = ++begin;
|
||||
|
||||
while( begin != end && !m_is_dropped( *begin ) && !m_is_kept( *begin ) )
|
||||
Assigner::append_move( begin, this->m_value );
|
||||
|
||||
m_token_produced = true;
|
||||
}
|
||||
}
|
||||
|
||||
Assigner::assign( check_point, begin, this->m_value );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
// Data members
|
||||
delim_policy m_is_dropped;
|
||||
delim_policy m_is_kept;
|
||||
bool m_keep_empty_tokens;
|
||||
std::size_t m_tokens_left;
|
||||
bool m_token_produced;
|
||||
};
|
||||
|
||||
// ************************************************************************** //
|
||||
// ************** basic_string_token_iterator ************** //
|
||||
// ************************************************************************** //
|
||||
|
||||
template<typename CharT,
|
||||
typename CharCompare = ut_detail::default_char_compare<CharT> >
|
||||
class basic_string_token_iterator
|
||||
: public token_iterator_base<basic_string_token_iterator<CharT,CharCompare>,CharT,CharCompare> {
|
||||
typedef basic_cstring<CharT const> cstring;
|
||||
typedef token_iterator_base<basic_string_token_iterator<CharT,CharCompare>,CharT,CharCompare> base;
|
||||
public:
|
||||
explicit basic_string_token_iterator() {}
|
||||
explicit basic_string_token_iterator( cstring src )
|
||||
: m_src( src )
|
||||
{
|
||||
this->init();
|
||||
}
|
||||
|
||||
// warning: making the constructor accept anything else than a cstring should
|
||||
// ensure that no temporary object is created during string creation (previous
|
||||
// definition was "template<typename Src, typename Modifier> basic_string_token_iterator( Src src ..."
|
||||
// which may create a temporary string copy when called with an std::string.
|
||||
template<typename Modifier>
|
||||
basic_string_token_iterator( cstring src, Modifier const& m )
|
||||
: m_src( src )
|
||||
{
|
||||
this->apply_modifier( m );
|
||||
|
||||
this->init();
|
||||
}
|
||||
|
||||
private:
|
||||
friend class input_iterator_core_access;
|
||||
|
||||
// input iterator implementation
|
||||
bool get()
|
||||
{
|
||||
typename cstring::iterator begin = m_src.begin();
|
||||
bool res = base::get( begin, m_src.end() );
|
||||
|
||||
m_src.assign( begin, m_src.end() );
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
// Data members
|
||||
cstring m_src;
|
||||
};
|
||||
|
||||
typedef basic_string_token_iterator<char> string_token_iterator;
|
||||
typedef basic_string_token_iterator<wchar_t> wstring_token_iterator;
|
||||
|
||||
// ************************************************************************** //
|
||||
// ************** range_token_iterator ************** //
|
||||
// ************************************************************************** //
|
||||
|
||||
template<typename Iter,
|
||||
typename CharCompare = ut_detail::default_char_compare<BOOST_DEDUCED_TYPENAME iterator_value<Iter>::type>,
|
||||
typename ValueType = std::basic_string<BOOST_DEDUCED_TYPENAME iterator_value<Iter>::type>,
|
||||
typename Reference = ValueType const&>
|
||||
class range_token_iterator
|
||||
: public token_iterator_base<range_token_iterator<Iter,CharCompare,ValueType,Reference>,
|
||||
typename iterator_value<Iter>::type,CharCompare,ValueType,Reference> {
|
||||
typedef basic_cstring<typename ValueType::value_type> cstring;
|
||||
typedef token_iterator_base<range_token_iterator<Iter,CharCompare,ValueType,Reference>,
|
||||
typename iterator_value<Iter>::type,CharCompare,ValueType,Reference> base;
|
||||
public:
|
||||
explicit range_token_iterator() {}
|
||||
explicit range_token_iterator( Iter begin, Iter end = Iter() )
|
||||
: m_begin( begin ), m_end( end )
|
||||
{
|
||||
this->init();
|
||||
}
|
||||
range_token_iterator( range_token_iterator const& rhs )
|
||||
: base( rhs )
|
||||
{
|
||||
if( this->m_valid ) {
|
||||
m_begin = rhs.m_begin;
|
||||
m_end = rhs.m_end;
|
||||
}
|
||||
}
|
||||
|
||||
template<typename Modifier>
|
||||
range_token_iterator( Iter begin, Iter end, Modifier const& m )
|
||||
: m_begin( begin ), m_end( end )
|
||||
{
|
||||
this->apply_modifier( m );
|
||||
|
||||
this->init();
|
||||
}
|
||||
|
||||
private:
|
||||
friend class input_iterator_core_access;
|
||||
|
||||
// input iterator implementation
|
||||
bool get()
|
||||
{
|
||||
return base::get( m_begin, m_end );
|
||||
}
|
||||
|
||||
// Data members
|
||||
Iter m_begin;
|
||||
Iter m_end;
|
||||
};
|
||||
|
||||
// ************************************************************************** //
|
||||
// ************** make_range_token_iterator ************** //
|
||||
// ************************************************************************** //
|
||||
|
||||
template<typename Iter>
|
||||
inline range_token_iterator<Iter>
|
||||
make_range_token_iterator( Iter begin, Iter end = Iter() )
|
||||
{
|
||||
return range_token_iterator<Iter>( begin, end );
|
||||
}
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
template<typename Iter,typename Modifier>
|
||||
inline range_token_iterator<Iter>
|
||||
make_range_token_iterator( Iter begin, Iter end, Modifier const& m )
|
||||
{
|
||||
return range_token_iterator<Iter>( begin, end, m );
|
||||
}
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
} // namespace utils
|
||||
} // namespace unit_test
|
||||
} // namespace boost
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
#include <boost/test/detail/enable_warnings.hpp>
|
||||
|
||||
#endif // BOOST_TEST_UTILS_TOKEN_ITERATOR_HPP
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
|
||||
// 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)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/or.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
namespace aux {
|
||||
|
||||
template< bool C_, typename T1, typename T2, typename T3, typename T4 >
|
||||
struct or_impl
|
||||
: true_
|
||||
{
|
||||
};
|
||||
|
||||
template< typename T1, typename T2, typename T3, typename T4 >
|
||||
struct or_impl< false,T1,T2,T3,T4 >
|
||||
: or_impl<
|
||||
BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
|
||||
, T2, T3, T4
|
||||
, false_
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct or_impl<
|
||||
false
|
||||
, false_, false_, false_, false_
|
||||
>
|
||||
: false_
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(T1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(T2)
|
||||
, typename T3 = false_, typename T4 = false_, typename T5 = false_
|
||||
>
|
||||
struct or_
|
||||
|
||||
: aux::or_impl<
|
||||
BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
|
||||
, T2, T3, T4, T5
|
||||
>
|
||||
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(
|
||||
5
|
||||
, or_
|
||||
, ( T1, T2, T3, T4, T5)
|
||||
)
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC2(
|
||||
2
|
||||
, 5
|
||||
, or_
|
||||
)
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
#Sov Mil Order of Malta: 15: 28: EU: 41.90: -12.43: -1.0: 1A:
|
||||
#1A;
|
||||
#Spratly Islands: 26: 50: AS: 9.88: -114.23: -8.0: 1S:
|
||||
#1S,9M0,BV9S;
|
||||
#Monaco: 14: 27: EU: 43.73: -7.40: -1.0: 3A:
|
||||
#3A;
|
||||
#Heard Island: 39: 68: AF: -53.08: -73.50: -5.0: VK0H:
|
||||
#=VK0IR;
|
||||
#Macquarie Island: 30: 60: OC: -54.60: -158.88: -10.0: VK0M:
|
||||
#=VK0KEV;
|
||||
#Cocos-Keeling: 29: 54: OC: -12.15: -96.82: -6.5: VK9C:
|
||||
#AX9C,AX9Y,VH9C,VH9Y,VI9C,VI9Y,VJ9C,VJ9Y,VK9C,VK9Y,VL9C,VL9Y,VM9C,VM9Y,
|
||||
#VN9C,VN9Y,VZ9C,VZ9Y,=VK9AA;
|
||||
*/
|
||||
|
||||
|
||||
#include "countrydat.h"
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
|
||||
|
||||
void CountryDat::init(const QString filename)
|
||||
{
|
||||
_filename = filename;
|
||||
_data.clear();
|
||||
}
|
||||
|
||||
QString CountryDat::_extractName(const QString line) const
|
||||
{
|
||||
int s1 = line.indexOf(':');
|
||||
if (s1>=0)
|
||||
{
|
||||
QString name = line.mid(0,s1);
|
||||
return name;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
void CountryDat::_removeBrackets(QString &line, const QString a, const QString b) const
|
||||
{
|
||||
int s1 = line.indexOf(a);
|
||||
while (s1 >= 0)
|
||||
{
|
||||
int s2 = line.indexOf(b);
|
||||
line = line.mid(0,s1) + line.mid(s2+1,-1);
|
||||
s1 = line.indexOf(a);
|
||||
}
|
||||
}
|
||||
|
||||
QStringList CountryDat::_extractPrefix(QString &line, bool &more) const
|
||||
{
|
||||
line = line.remove(" \n");
|
||||
line = line.replace(" ","");
|
||||
|
||||
_removeBrackets(line,"(",")");
|
||||
_removeBrackets(line,"[","]");
|
||||
_removeBrackets(line,"<",">");
|
||||
_removeBrackets(line,"~","~");
|
||||
|
||||
int s1 = line.indexOf(';');
|
||||
more = true;
|
||||
if (s1 >= 0)
|
||||
{
|
||||
line = line.mid(0,s1);
|
||||
more = false;
|
||||
}
|
||||
|
||||
QStringList r = line.split(',');
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
void CountryDat::load()
|
||||
{
|
||||
_data.clear();
|
||||
_countryNames.clear(); //used by countriesWorked
|
||||
|
||||
QFile inputFile(_filename);
|
||||
if (inputFile.open(QIODevice::ReadOnly))
|
||||
{
|
||||
QTextStream in(&inputFile);
|
||||
while ( !in.atEnd() )
|
||||
{
|
||||
QString line1 = in.readLine();
|
||||
if ( !in.atEnd() )
|
||||
{
|
||||
QString line2 = in.readLine();
|
||||
|
||||
QString name = _extractName(line1);
|
||||
if (name.length()>0)
|
||||
{
|
||||
_countryNames << name;
|
||||
bool more = true;
|
||||
QStringList prefixs;
|
||||
while (more)
|
||||
{
|
||||
QStringList p = _extractPrefix(line2,more);
|
||||
prefixs += p;
|
||||
if (more)
|
||||
line2 = in.readLine();
|
||||
}
|
||||
|
||||
QString p;
|
||||
foreach(p,prefixs)
|
||||
{
|
||||
if (p.length() > 0)
|
||||
_data.insert(p,name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
inputFile.close();
|
||||
}
|
||||
}
|
||||
|
||||
// return country name else ""
|
||||
QString CountryDat::find(QString call) const
|
||||
{
|
||||
call = call.toUpper ();
|
||||
|
||||
// check for exact match first
|
||||
if (_data.contains ("=" + call))
|
||||
{
|
||||
return fixup (_data.value ("=" + call), call);
|
||||
}
|
||||
|
||||
auto prefix = call;
|
||||
while (prefix.size () >= 1)
|
||||
{
|
||||
if (_data.contains (prefix))
|
||||
{
|
||||
return fixup (_data.value (prefix), call);
|
||||
}
|
||||
prefix = prefix.left (prefix.size () - 1);
|
||||
}
|
||||
return QString {};
|
||||
}
|
||||
|
||||
QString CountryDat::fixup (QString country, QString const& call) const
|
||||
{
|
||||
//
|
||||
// deal with special rules that cty.dat does not cope with
|
||||
//
|
||||
|
||||
// KG4 2x1 and 2x3 calls that map to Gitmo are mainland US not Gitmo
|
||||
if (call.startsWith ("KG4") && call.size () != 5)
|
||||
{
|
||||
country.replace ("Guantanamo Bay", "United States");
|
||||
}
|
||||
return country;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
-24.5 0.000
|
||||
-24.0 0.006
|
||||
-23.5 0.046 0.066
|
||||
-23.0 0.250 0.305
|
||||
-22.5 0.630 0.701
|
||||
-22.0 0.900 0.945
|
||||
-21.5 0.992 0.9974
|
||||
-21.0 0.99987
|
||||
@@ -0,0 +1,25 @@
|
||||
# /* Copyright (C) 2001
|
||||
# * Housemarque Oy
|
||||
# * http://www.housemarque.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)
|
||||
# */
|
||||
#
|
||||
# /* Revised by Paul Mensonides (2002) */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_ARITHMETIC_HPP
|
||||
# define BOOST_PREPROCESSOR_ARITHMETIC_HPP
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/add.hpp>
|
||||
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||
# include <boost/preprocessor/arithmetic/div.hpp>
|
||||
# include <boost/preprocessor/arithmetic/inc.hpp>
|
||||
# include <boost/preprocessor/arithmetic/mod.hpp>
|
||||
# include <boost/preprocessor/arithmetic/mul.hpp>
|
||||
# include <boost/preprocessor/arithmetic/sub.hpp>
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,66 @@
|
||||
// Boost.Function library
|
||||
|
||||
// Copyright Douglas Gregor 2001-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/libs/function
|
||||
|
||||
// William Kempf, Jesse Jones and Karl Nelson were all very helpful in the
|
||||
// design of this library.
|
||||
|
||||
#include <functional> // unary_function, binary_function
|
||||
|
||||
#include <boost/preprocessor/iterate.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#ifndef BOOST_FUNCTION_MAX_ARGS
|
||||
# define BOOST_FUNCTION_MAX_ARGS 10
|
||||
#endif // BOOST_FUNCTION_MAX_ARGS
|
||||
|
||||
// Include the prologue here so that the use of file-level iteration
|
||||
// in anything that may be included by function_template.hpp doesn't break
|
||||
#include <boost/function/detail/prologue.hpp>
|
||||
|
||||
// Older Visual Age C++ version do not handle the file iteration well
|
||||
#if BOOST_WORKAROUND(__IBMCPP__, >= 500) && BOOST_WORKAROUND(__IBMCPP__, < 800)
|
||||
# if BOOST_FUNCTION_MAX_ARGS >= 0
|
||||
# include <boost/function/function0.hpp>
|
||||
# endif
|
||||
# if BOOST_FUNCTION_MAX_ARGS >= 1
|
||||
# include <boost/function/function1.hpp>
|
||||
# endif
|
||||
# if BOOST_FUNCTION_MAX_ARGS >= 2
|
||||
# include <boost/function/function2.hpp>
|
||||
# endif
|
||||
# if BOOST_FUNCTION_MAX_ARGS >= 3
|
||||
# include <boost/function/function3.hpp>
|
||||
# endif
|
||||
# if BOOST_FUNCTION_MAX_ARGS >= 4
|
||||
# include <boost/function/function4.hpp>
|
||||
# endif
|
||||
# if BOOST_FUNCTION_MAX_ARGS >= 5
|
||||
# include <boost/function/function5.hpp>
|
||||
# endif
|
||||
# if BOOST_FUNCTION_MAX_ARGS >= 6
|
||||
# include <boost/function/function6.hpp>
|
||||
# endif
|
||||
# if BOOST_FUNCTION_MAX_ARGS >= 7
|
||||
# include <boost/function/function7.hpp>
|
||||
# endif
|
||||
# if BOOST_FUNCTION_MAX_ARGS >= 8
|
||||
# include <boost/function/function8.hpp>
|
||||
# endif
|
||||
# if BOOST_FUNCTION_MAX_ARGS >= 9
|
||||
# include <boost/function/function9.hpp>
|
||||
# endif
|
||||
# if BOOST_FUNCTION_MAX_ARGS >= 10
|
||||
# include <boost/function/function10.hpp>
|
||||
# endif
|
||||
#else
|
||||
// What is the '3' for?
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 (3,(0,BOOST_FUNCTION_MAX_ARGS,<boost/function/detail/function_iterate.hpp>))
|
||||
# include BOOST_PP_ITERATE()
|
||||
# undef BOOST_PP_ITERATION_PARAMS_1
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,905 @@
|
||||
/*==============================================================================
|
||||
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 Expr
|
||||
, typename A0 = void , typename A1 = void , typename A2 = void , typename A3 = void , typename A4 = void , typename A5 = void , typename A6 = void , typename A7 = void , typename A8 = void , typename A9 = void , typename A10 = void , typename A11 = void , typename A12 = void , typename A13 = void , typename A14 = void , typename A15 = void , typename A16 = void , typename A17 = void , typename A18 = void , typename A19 = void , typename A20 = void , typename A21 = void , typename A22 = void , typename A23 = void , typename A24 = void , typename A25 = void , typename A26 = void , typename A27 = void , typename A28 = void , typename A29 = void , typename A30 = void , typename A31 = void , typename A32 = void , typename A33 = void , typename A34 = void , typename A35 = void , typename A36 = void , typename A37 = void , typename A38 = void , typename A39 = void
|
||||
, typename Dummy = void>
|
||||
struct actor;
|
||||
template <typename Expr>
|
||||
struct nullary_actor_result
|
||||
{
|
||||
typedef
|
||||
typename boost::phoenix::evaluator::impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector1<const ::boost::phoenix::actor<Expr> *> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, typename A0>
|
||||
struct actor<Expr, A0>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector2<const ::boost::phoenix::actor<Expr> *, A0> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, typename A0 , typename A1>
|
||||
struct actor<Expr, A0 , A1>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector3<const ::boost::phoenix::actor<Expr> *, A0 , A1> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, typename A0 , typename A1 , typename A2>
|
||||
struct actor<Expr, A0 , A1 , A2>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector4<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, typename A0 , typename A1 , typename A2 , typename A3>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector5<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector6<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector7<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector8<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector9<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector10<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector11<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector12<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector13<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector14<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector15<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector16<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector17<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector18<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector19<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector20<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector21<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector22<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector23<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21 , typename A22>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector24<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21 , typename A22 , typename A23>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector25<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector26<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector27<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector28<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector29<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector30<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector31<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector32<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector33<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector34<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector35<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector36<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector37<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector38<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector39<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37 , typename A38>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector40<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename Expr, 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 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37 , typename A38 , typename A39>
|
||||
struct actor<Expr, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39>
|
||||
{
|
||||
typedef
|
||||
typename phoenix::evaluator::
|
||||
impl<
|
||||
Expr const&
|
||||
, vector2<
|
||||
vector41<const ::boost::phoenix::actor<Expr> *, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39> &
|
||||
, default_actions
|
||||
> const &
|
||||
, proto::empty_env
|
||||
>::result_type
|
||||
type;
|
||||
};
|
||||
@@ -0,0 +1,141 @@
|
||||
// Copyright (c) 2013 Anton Bikineev
|
||||
// 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)
|
||||
|
||||
//
|
||||
// This is a partial header, do not include on it's own!!!
|
||||
//
|
||||
// Contains asymptotic expansions for derivatives of Bessel J(v,x) and Y(v,x)
|
||||
// functions, as x -> INF.
|
||||
#ifndef BOOST_MATH_SF_DETAIL_BESSEL_JY_DERIVATIVES_ASYM_HPP
|
||||
#define BOOST_MATH_SF_DETAIL_BESSEL_JY_DERIVATIVES_ASYM_HPP
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
namespace boost{ namespace math{ namespace detail{
|
||||
|
||||
template <class T>
|
||||
inline T asymptotic_bessel_derivative_amplitude(T v, T x)
|
||||
{
|
||||
// Calculate the amplitude for J'(v,x) and I'(v,x)
|
||||
// for large x: see A&S 9.2.30.
|
||||
BOOST_MATH_STD_USING
|
||||
T s = 1;
|
||||
const T mu = 4 * v * v;
|
||||
T txq = 2 * x;
|
||||
txq *= txq;
|
||||
|
||||
s -= (mu - 3) / (2 * txq);
|
||||
s -= ((mu - 1) * (mu - 45)) / (txq * txq * 8);
|
||||
|
||||
return sqrt(s * 2 / (boost::math::constants::pi<T>() * x));
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline T asymptotic_bessel_derivative_phase_mx(T v, T x)
|
||||
{
|
||||
// Calculate the phase of J'(v, x) and Y'(v, x) for large x.
|
||||
// See A&S 9.2.31.
|
||||
// Note that the result returned is the phase less (x - PI(v/2 - 1/4))
|
||||
// which we'll factor in later when we calculate the sines/cosines of the result:
|
||||
const T mu = 4 * v * v;
|
||||
const T mu2 = mu * mu;
|
||||
const T mu3 = mu2 * mu;
|
||||
T denom = 4 * x;
|
||||
T denom_mult = denom * denom;
|
||||
|
||||
T s = 0;
|
||||
s += (mu + 3) / (2 * denom);
|
||||
denom *= denom_mult;
|
||||
s += (mu2 + (46 * mu) - 63) / (6 * denom);
|
||||
denom *= denom_mult;
|
||||
s += (mu3 + (185 * mu2) - (2053 * mu) + 1899) / (5 * denom);
|
||||
return s;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline T asymptotic_bessel_y_derivative_large_x_2(T v, T x)
|
||||
{
|
||||
// See A&S 9.2.20.
|
||||
BOOST_MATH_STD_USING
|
||||
// Get the phase and amplitude:
|
||||
const T ampl = asymptotic_bessel_derivative_amplitude(v, x);
|
||||
const T phase = asymptotic_bessel_derivative_phase_mx(v, x);
|
||||
BOOST_MATH_INSTRUMENT_VARIABLE(ampl);
|
||||
BOOST_MATH_INSTRUMENT_VARIABLE(phase);
|
||||
//
|
||||
// Calculate the sine of the phase, using
|
||||
// sine/cosine addition rules to factor in
|
||||
// the x - PI(v/2 - 1/4) term not added to the
|
||||
// phase when we calculated it.
|
||||
//
|
||||
const T cx = cos(x);
|
||||
const T sx = sin(x);
|
||||
const T vd2shifted = (v / 2) - 0.25f;
|
||||
const T ci = cos_pi(vd2shifted);
|
||||
const T si = sin_pi(vd2shifted);
|
||||
const T sin_phase = sin(phase) * (cx * ci + sx * si) + cos(phase) * (sx * ci - cx * si);
|
||||
BOOST_MATH_INSTRUMENT_CODE(sin(phase));
|
||||
BOOST_MATH_INSTRUMENT_CODE(cos(x));
|
||||
BOOST_MATH_INSTRUMENT_CODE(cos(phase));
|
||||
BOOST_MATH_INSTRUMENT_CODE(sin(x));
|
||||
return sin_phase * ampl;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline T asymptotic_bessel_j_derivative_large_x_2(T v, T x)
|
||||
{
|
||||
// See A&S 9.2.20.
|
||||
BOOST_MATH_STD_USING
|
||||
// Get the phase and amplitude:
|
||||
const T ampl = asymptotic_bessel_derivative_amplitude(v, x);
|
||||
const T phase = asymptotic_bessel_derivative_phase_mx(v, x);
|
||||
BOOST_MATH_INSTRUMENT_VARIABLE(ampl);
|
||||
BOOST_MATH_INSTRUMENT_VARIABLE(phase);
|
||||
//
|
||||
// Calculate the sine of the phase, using
|
||||
// sine/cosine addition rules to factor in
|
||||
// the x - PI(v/2 - 1/4) term not added to the
|
||||
// phase when we calculated it.
|
||||
//
|
||||
BOOST_MATH_INSTRUMENT_CODE(cos(phase));
|
||||
BOOST_MATH_INSTRUMENT_CODE(cos(x));
|
||||
BOOST_MATH_INSTRUMENT_CODE(sin(phase));
|
||||
BOOST_MATH_INSTRUMENT_CODE(sin(x));
|
||||
const T cx = cos(x);
|
||||
const T sx = sin(x);
|
||||
const T vd2shifted = (v / 2) - 0.25f;
|
||||
const T ci = cos_pi(vd2shifted);
|
||||
const T si = sin_pi(vd2shifted);
|
||||
const T sin_phase = cos(phase) * (cx * ci + sx * si) - sin(phase) * (sx * ci - cx * si);
|
||||
BOOST_MATH_INSTRUMENT_VARIABLE(sin_phase);
|
||||
return sin_phase * ampl;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline bool asymptotic_bessel_derivative_large_x_limit(const T& v, const T& x)
|
||||
{
|
||||
BOOST_MATH_STD_USING
|
||||
//
|
||||
// This function is the copy of math::asymptotic_bessel_large_x_limit
|
||||
// It means that we use the same rules for determining how x is large
|
||||
// compared to v.
|
||||
//
|
||||
// Determines if x is large enough compared to v to take the asymptotic
|
||||
// forms above. From A&S 9.2.28 we require:
|
||||
// v < x * eps^1/8
|
||||
// and from A&S 9.2.29 we require:
|
||||
// v^12/10 < 1.5 * x * eps^1/10
|
||||
// using the former seems to work OK in practice with broadly similar
|
||||
// error rates either side of the divide for v < 10000.
|
||||
// At double precision eps^1/8 ~= 0.01.
|
||||
//
|
||||
return (std::max)(T(fabs(v)), T(1)) < x * sqrt(boost::math::tools::forth_root_epsilon<T>());
|
||||
}
|
||||
|
||||
}}} // namespaces
|
||||
|
||||
#endif // BOOST_MATH_SF_DETAIL_BESSEL_JY_DERIVATIVES_ASYM_HPP
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
[auto_generated]
|
||||
/boost/numeric/odeint/external/mtl4/mtl4.hpp
|
||||
|
||||
[begin_description]
|
||||
includes all headers required for using mtl4 with odeint
|
||||
[end_description]
|
||||
|
||||
Copyright 2013 Karsten Ahnert
|
||||
Copyright 2013 Mario Mulansky
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or
|
||||
copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_MTL4_MTL4_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_EXTERNAL_MTL4_MTL4_HPP_INCLUDED
|
||||
|
||||
#include <boost/numeric/odeint/external/mtl4/mtl4_algebra_dispatcher.hpp>
|
||||
#include <boost/numeric/odeint/external/mtl4/mtl4_resize.hpp>
|
||||
|
||||
#endif // BOOST_NUMERIC_ODEINT_EXTERNAL_MTL4_MTL4_INCLUDED
|
||||
@@ -0,0 +1,93 @@
|
||||
// (C) Copyright John Maddock 2011.
|
||||
// (C) Copyright Cray, Inc. 2013
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Greenhills C compiler setup:
|
||||
|
||||
#define BOOST_COMPILER "Cray C version " BOOST_STRINGIZE(_RELEASE)
|
||||
|
||||
#if _RELEASE < 8
|
||||
# error "Boost is not configured for Cray compilers prior to version 8, please try the configure script."
|
||||
#endif
|
||||
|
||||
//
|
||||
// Check this is a recent EDG based compiler, otherwise we don't support it here:
|
||||
//
|
||||
#ifndef __EDG_VERSION__
|
||||
# error "Unsupported Cray compiler, please try running the configure script."
|
||||
#endif
|
||||
|
||||
#include <boost/config/compiler/common_edg.hpp>
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
#define BOOST_HAS_NRVO
|
||||
#define BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#define BOOST_HAS_NRVO
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
#define BOOST_NO_CXX11_RAW_LITERALS
|
||||
#define BOOST_NO_CXX11_NULLPTR
|
||||
#define BOOST_NO_CXX11_NOEXCEPT
|
||||
#define BOOST_NO_CXX11_LAMBDAS
|
||||
#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#define BOOST_NO_CXX11_DECLTYPE
|
||||
#define BOOST_NO_CXX11_CONSTEXPR
|
||||
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
||||
#define BOOST_NO_CXX11_CHAR32_T
|
||||
#define BOOST_NO_CXX11_CHAR16_T
|
||||
#define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||
#define BOOST_NO_CXX11_FINAL
|
||||
#define BOOST_NO_CXX11_THREAD_LOCAL
|
||||
|
||||
|
||||
//#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
|
||||
#define BOOST_MATH_DISABLE_STD_FPCLASSIFY
|
||||
//#define BOOST_HAS_FPCLASSIFY
|
||||
|
||||
#define BOOST_SP_USE_PTHREADS
|
||||
#define BOOST_AC_USE_PTHREADS
|
||||
|
||||
/* everything that follows is working around what are thought to be
|
||||
* compiler shortcomings. Revist all of these regularly.
|
||||
*/
|
||||
|
||||
//#define BOOST_USE_ENUM_STATIC_ASSERT
|
||||
//#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS //(this may be implied by the previous #define
|
||||
|
||||
// These constants should be provided by the
|
||||
// compiler, at least when -hgnu is asserted on the command line.
|
||||
|
||||
#ifndef __ATOMIC_RELAXED
|
||||
#define __ATOMIC_RELAXED 0
|
||||
#define __ATOMIC_CONSUME 1
|
||||
#define __ATOMIC_ACQUIRE 2
|
||||
#define __ATOMIC_RELEASE 3
|
||||
#define __ATOMIC_ACQ_REL 4
|
||||
#define __ATOMIC_SEQ_CST 5
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
use, intrinsic :: iso_c_binding, only: c_int, c_short, c_float, c_char, c_bool
|
||||
|
||||
include 'constants.f90'
|
||||
|
||||
!
|
||||
! these structures must be kept in sync with ../commons.h
|
||||
!
|
||||
type, bind(C) :: params_block
|
||||
integer(c_int) :: nutc
|
||||
logical(c_bool) :: ndiskdat
|
||||
integer(c_int) :: ntr
|
||||
integer(c_int) :: nfqso
|
||||
logical(c_bool) :: newdat
|
||||
integer(c_int) :: npts8
|
||||
integer(c_int) :: nfa
|
||||
integer(c_int) :: nfsplit
|
||||
integer(c_int) :: nfb
|
||||
integer(c_int) :: ntol
|
||||
integer(c_int) :: kin
|
||||
integer(c_int) :: nzhsym
|
||||
integer(c_int) :: nsubmode
|
||||
logical(c_bool) :: nagain
|
||||
integer(c_int) :: ndepth
|
||||
integer(c_int) :: ntxmode
|
||||
integer(c_int) :: nmode
|
||||
integer(c_int) :: minw
|
||||
logical(c_bool) :: nclearave
|
||||
integer(c_int) :: minsync
|
||||
real(c_float) :: emedelay
|
||||
real(c_float) :: dttol
|
||||
integer(c_int) :: nlist
|
||||
integer(c_int) :: listutc(10)
|
||||
integer(c_int) :: n2pass
|
||||
integer(c_int) :: nranera
|
||||
integer(c_int) :: naggressive
|
||||
logical(c_bool) :: nrobust
|
||||
integer(c_int) :: nexp_decode
|
||||
character(kind=c_char, len=20) :: datetime
|
||||
character(kind=c_char, len=12) :: mycall
|
||||
character(kind=c_char, len=6) :: mygrid
|
||||
character(kind=c_char, len=12) :: hiscall
|
||||
character(kind=c_char, len=6) :: hisgrid
|
||||
end type params_block
|
||||
|
||||
type, bind(C) :: dec_data
|
||||
real(c_float) :: ss(184,NSMAX)
|
||||
real(c_float) :: savg(NSMAX)
|
||||
real(c_float) :: sred(5760)
|
||||
integer(c_short) :: id2(NMAX)
|
||||
type(params_block) :: params
|
||||
end type dec_data
|
||||
@@ -0,0 +1,234 @@
|
||||
/*==============================================================================
|
||||
Copyright (c) 2001-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)
|
||||
==============================================================================*/
|
||||
namespace detail {
|
||||
template <typename Object, typename MemPtr>
|
||||
struct mem_fun_ptr_gen
|
||||
{
|
||||
mem_fun_ptr_gen(Object const& obj_, MemPtr ptr_)
|
||||
: obj(obj_)
|
||||
, ptr(ptr_)
|
||||
{}
|
||||
typename phoenix::expression::mem_fun_ptr<Object, MemPtr>::type const
|
||||
operator()() const
|
||||
{
|
||||
return phoenix::expression::mem_fun_ptr<Object, MemPtr>::make(obj, ptr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename A0>
|
||||
typename phoenix::expression::mem_fun_ptr<
|
||||
Object
|
||||
, MemPtr
|
||||
, A0
|
||||
>::type const
|
||||
operator()(A0 const& a0) const
|
||||
{
|
||||
return phoenix::expression::mem_fun_ptr<
|
||||
Object
|
||||
, MemPtr
|
||||
, A0
|
||||
>::make(obj, ptr, a0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename A0 , typename A1>
|
||||
typename phoenix::expression::mem_fun_ptr<
|
||||
Object
|
||||
, MemPtr
|
||||
, A0 , A1
|
||||
>::type const
|
||||
operator()(A0 const& a0 , A1 const& a1) const
|
||||
{
|
||||
return phoenix::expression::mem_fun_ptr<
|
||||
Object
|
||||
, MemPtr
|
||||
, A0 , A1
|
||||
>::make(obj, ptr, a0 , a1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename A0 , typename A1 , typename A2>
|
||||
typename phoenix::expression::mem_fun_ptr<
|
||||
Object
|
||||
, MemPtr
|
||||
, A0 , A1 , A2
|
||||
>::type const
|
||||
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2) const
|
||||
{
|
||||
return phoenix::expression::mem_fun_ptr<
|
||||
Object
|
||||
, MemPtr
|
||||
, A0 , A1 , A2
|
||||
>::make(obj, ptr, a0 , a1 , a2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3>
|
||||
typename phoenix::expression::mem_fun_ptr<
|
||||
Object
|
||||
, MemPtr
|
||||
, A0 , A1 , A2 , A3
|
||||
>::type const
|
||||
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3) const
|
||||
{
|
||||
return phoenix::expression::mem_fun_ptr<
|
||||
Object
|
||||
, MemPtr
|
||||
, A0 , A1 , A2 , A3
|
||||
>::make(obj, ptr, a0 , a1 , a2 , a3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
|
||||
typename phoenix::expression::mem_fun_ptr<
|
||||
Object
|
||||
, MemPtr
|
||||
, A0 , A1 , A2 , A3 , A4
|
||||
>::type const
|
||||
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4) const
|
||||
{
|
||||
return phoenix::expression::mem_fun_ptr<
|
||||
Object
|
||||
, MemPtr
|
||||
, A0 , A1 , A2 , A3 , A4
|
||||
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
|
||||
typename phoenix::expression::mem_fun_ptr<
|
||||
Object
|
||||
, MemPtr
|
||||
, A0 , A1 , A2 , A3 , A4 , A5
|
||||
>::type const
|
||||
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5) const
|
||||
{
|
||||
return phoenix::expression::mem_fun_ptr<
|
||||
Object
|
||||
, MemPtr
|
||||
, A0 , A1 , A2 , A3 , A4 , A5
|
||||
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
|
||||
typename phoenix::expression::mem_fun_ptr<
|
||||
Object
|
||||
, MemPtr
|
||||
, A0 , A1 , A2 , A3 , A4 , A5 , A6
|
||||
>::type const
|
||||
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6) const
|
||||
{
|
||||
return phoenix::expression::mem_fun_ptr<
|
||||
Object
|
||||
, MemPtr
|
||||
, A0 , A1 , A2 , A3 , A4 , A5 , A6
|
||||
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
|
||||
typename phoenix::expression::mem_fun_ptr<
|
||||
Object
|
||||
, MemPtr
|
||||
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
|
||||
>::type const
|
||||
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7) const
|
||||
{
|
||||
return phoenix::expression::mem_fun_ptr<
|
||||
Object
|
||||
, MemPtr
|
||||
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
|
||||
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
|
||||
typename phoenix::expression::mem_fun_ptr<
|
||||
Object
|
||||
, MemPtr
|
||||
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
|
||||
>::type const
|
||||
operator()(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) const
|
||||
{
|
||||
return phoenix::expression::mem_fun_ptr<
|
||||
Object
|
||||
, MemPtr
|
||||
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
|
||||
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
|
||||
}
|
||||
Object const& obj;
|
||||
MemPtr ptr;
|
||||
};
|
||||
struct make_mem_fun_ptr_gen
|
||||
: proto::callable
|
||||
{
|
||||
template<typename Sig>
|
||||
struct result;
|
||||
template<typename This, typename Object, typename MemPtr>
|
||||
struct result<This(Object, MemPtr)>
|
||||
{
|
||||
typedef
|
||||
mem_fun_ptr_gen<
|
||||
typename remove_const<typename remove_reference<Object>::type>::type
|
||||
, typename remove_const<typename remove_reference<MemPtr>::type>::type
|
||||
>
|
||||
type;
|
||||
};
|
||||
template<typename Object, typename MemPtr>
|
||||
mem_fun_ptr_gen<Object, MemPtr> operator()(Object const & obj, MemPtr ptr) const
|
||||
{
|
||||
return mem_fun_ptr_gen<Object, MemPtr>(obj, ptr);
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user