Initial Commit

This commit is contained in:
Jordan Sherer
2018-02-08 21:28:33 -05:00
commit 678c1d3966
14352 changed files with 3176737 additions and 0 deletions
@@ -0,0 +1,62 @@
// (C) Copyright Jeremy Siek 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)
// Revision History:
// 27 Feb 2001 Jeremy Siek
// Initial checkin.
#ifndef BOOST_FUNCTION_OUTPUT_ITERATOR_HPP
#define BOOST_FUNCTION_OUTPUT_ITERATOR_HPP
#include <iterator>
namespace boost {
namespace iterators {
template <class UnaryFunction>
class function_output_iterator {
typedef function_output_iterator self;
public:
typedef std::output_iterator_tag iterator_category;
typedef void value_type;
typedef void difference_type;
typedef void pointer;
typedef void reference;
explicit function_output_iterator() {}
explicit function_output_iterator(const UnaryFunction& f)
: m_f(f) {}
struct output_proxy {
output_proxy(UnaryFunction& f) : m_f(f) { }
template <class T> output_proxy& operator=(const T& value) {
m_f(value);
return *this;
}
UnaryFunction& m_f;
};
output_proxy operator*() { return output_proxy(m_f); }
self& operator++() { return *this; }
self& operator++(int) { return *this; }
private:
UnaryFunction m_f;
};
template <class UnaryFunction>
inline function_output_iterator<UnaryFunction>
make_function_output_iterator(const UnaryFunction& f = UnaryFunction()) {
return function_output_iterator<UnaryFunction>(f);
}
} // namespace iterators
using iterators::function_output_iterator;
using iterators::make_function_output_iterator;
} // namespace boost
#endif // BOOST_FUNCTION_OUTPUT_ITERATOR_HPP
@@ -0,0 +1,94 @@
// 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/equal_to.hpp" header
// -- DO NOT modify by hand!
namespace boost { namespace mpl {
template<
typename Tag1
, typename Tag2
>
struct equal_to_impl
: if_c<
( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
> BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
)
, aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
, aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
>::type
{
};
/// for Digital Mars C++/compilers with no CTPS/TTP support
template<> struct equal_to_impl< na,na >
{
template< typename U1, typename U2 > struct apply
{
typedef apply type;
BOOST_STATIC_CONSTANT(int, value = 0);
};
};
template< typename Tag > struct equal_to_impl< na,Tag >
{
template< typename U1, typename U2 > struct apply
{
typedef apply type;
BOOST_STATIC_CONSTANT(int, value = 0);
};
};
template< typename Tag > struct equal_to_impl< Tag,na >
{
template< typename U1, typename U2 > struct apply
{
typedef apply type;
BOOST_STATIC_CONSTANT(int, value = 0);
};
};
template< typename T > struct equal_to_tag
{
typedef typename T::tag type;
};
template<
typename BOOST_MPL_AUX_NA_PARAM(N1)
, typename BOOST_MPL_AUX_NA_PARAM(N2)
>
struct equal_to
: equal_to_impl<
typename equal_to_tag<N1>::type
, typename equal_to_tag<N2>::type
>::template apply< N1,N2 >::type
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2))
};
BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to)
}}
namespace boost { namespace mpl {
template<>
struct equal_to_impl< integral_c_tag,integral_c_tag >
{
template< typename N1, typename N2 > struct apply
: bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
{
};
};
}}
@@ -0,0 +1,27 @@
subroutine wav11(d2,npts,dd)
! Convert i*2 data sampled at 12000 Hz to r*4 sampled at 11025 Hz.
parameter (NZ11=60*11025,NZ12=60*12000)
parameter (NFFT1=64*12000,NFFT2=64*11025)
integer*2 d2(NZ12)
real*4 dd(NZ11)
real x(NFFT2)
complex cx(0:NFFT1/2)
equivalence (x,cx)
save x,cx
jz=min(NZ12,npts)
x(1:jz)=d2(1:jz)
x(jz+1:)=0.0
call four2a(x,nfft1,1,-1,0) !Forward FFT, r2c
df=12000.0/NFFT1
ia=5000.0/df
cx(ia:)=0.0
call four2a(cx,nfft2,1,1,-1) !Inverse FFT, c2r
npts=jz*11025.0/12000.0
fac=1.e-6
dd(1:npts)=fac*x(1:npts)
return
end subroutine wav11
@@ -0,0 +1,33 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_SI_SOLID_ANGLE_HPP
#define BOOST_UNITS_SI_SOLID_ANGLE_HPP
#include <boost/units/systems/si/base.hpp>
namespace boost {
namespace units {
namespace si {
typedef unit<solid_angle_dimension,si::system> solid_angle;
BOOST_UNITS_STATIC_CONSTANT(steradian,solid_angle);
BOOST_UNITS_STATIC_CONSTANT(steradians,solid_angle);
} // namespace si
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_SI_SOLID_ANGLE_HPP
@@ -0,0 +1,77 @@
// Copyright David Abrahams 2006. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
# define BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
# include <boost/config.hpp>
# include <boost/preprocessor/cat.hpp>
# include <boost/concept/detail/backward_compatibility.hpp>
# ifdef BOOST_OLD_CONCEPT_SUPPORT
# include <boost/concept/detail/has_constraints.hpp>
# include <boost/mpl/if.hpp>
# endif
// This implementation works on Comeau and GCC, all the way back to
// 2.95
namespace boost { namespace concepts {
template <class ModelFn>
struct requirement_;
namespace detail
{
template <void(*)()> struct instantiate {};
}
template <class Model>
struct requirement
{
static void failed() { ((Model*)0)->~Model(); }
};
struct failed {};
template <class Model>
struct requirement<failed ************ Model::************>
{
static void failed() { ((Model*)0)->~Model(); }
};
# ifdef BOOST_OLD_CONCEPT_SUPPORT
template <class Model>
struct constraint
{
static void failed() { ((Model*)0)->constraints(); }
};
template <class Model>
struct requirement_<void(*)(Model)>
: mpl::if_<
concepts::not_satisfied<Model>
, constraint<Model>
, requirement<failed ************ Model::************>
>::type
{};
# else
// For GCC-2.x, these can't have exactly the same name
template <class Model>
struct requirement_<void(*)(Model)>
: requirement<failed ************ Model::************>
{};
# endif
# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
typedef ::boost::concepts::detail::instantiate< \
&::boost::concepts::requirement_<ModelFnPtr>::failed> \
BOOST_PP_CAT(boost_concept_check,__LINE__) \
BOOST_ATTRIBUTE_UNUSED
}}
#endif // BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
@@ -0,0 +1,314 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2009-2012. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_INTERPROCESS_WINDOWS_INTERMODULE_SINGLETON_HPP
#define BOOST_INTERPROCESS_WINDOWS_INTERMODULE_SINGLETON_HPP
#ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
#endif
#
#if defined(BOOST_HAS_PRAGMA_ONCE)
#pragma once
#endif
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/container/string.hpp>
#if !defined(BOOST_INTERPROCESS_WINDOWS)
#error "This header can't be included from non-windows operating systems"
#endif
#include <boost/assert.hpp>
#include <boost/interprocess/detail/intermodule_singleton_common.hpp>
#include <boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp>
#include <boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp>
#include <boost/interprocess/sync/scoped_lock.hpp>
#include <boost/cstdint.hpp>
#include <string>
#include <boost/container/map.hpp>
namespace boost{
namespace interprocess{
namespace ipcdetail{
namespace intermodule_singleton_helpers {
//This global map will be implemented using 3 sync primitives:
//
//1) A named mutex that will implement global mutual exclusion between
// threads from different modules/dlls
//
//2) A semaphore that will act as a global counter for modules attached to the global map
// so that the global map can be destroyed when the last module is detached.
//
//3) A semaphore that will be hacked to hold the address of a heap-allocated map in the
// max and current semaphore count.
class windows_semaphore_based_map
{
typedef boost::container::map<boost::container::string, ref_count_ptr> map_type;
public:
windows_semaphore_based_map()
{
map_type *m = new map_type;
boost::uint32_t initial_count = 0;
boost::uint32_t max_count = 0;
//Windows user address space sizes:
//32 bit windows: [32 bit processes] 2GB or 3GB (31/32 bits)
//64 bit windows: [32 bit processes] 2GB or 4GB (31/32 bits)
// [64 bit processes] 2GB or 8TB (31/43 bits)
//
//Windows semaphores use 'long' parameters (32 bits in LLP64 data model) and
//those values can't be negative, so we have 31 bits to store something
//in max_count and initial count parameters.
//Also, max count must be bigger than 0 and bigger or equal than initial count.
if(sizeof(void*) == sizeof(boost::uint32_t)){
//This means that for 32 bit processes, a semaphore count (31 usable bits) is
//enough to store 4 byte aligned memory (4GB -> 32 bits - 2 bits = 30 bits).
//The max count will hold the pointer value and current semaphore count
//will be zero.
//
//Relying in UB with a cast through union, but all known windows compilers
//accept this (C11 also accepts this).
union caster_union
{
void *addr;
boost::uint32_t addr_uint32;
} caster;
caster.addr = m;
//memory is at least 4 byte aligned in windows
BOOST_ASSERT((caster.addr_uint32 & boost::uint32_t(3)) == 0);
max_count = caster.addr_uint32 >> 2;
}
else if(sizeof(void*) == sizeof(boost::uint64_t)){
//Relying in UB with a cast through union, but all known windows compilers
//accept this (C11 accepts this).
union caster_union
{
void *addr;
boost::uint64_t addr_uint64;
} caster;
caster.addr = m;
//We'll encode the address using 30 bits in each 32 bit high and low parts.
//High part will be the sem max count, low part will be the sem initial count.
//(restrictions: max count > 0, initial count >= 0 and max count >= initial count):
//
// - Low part will be shifted two times (4 byte alignment) so that top
// two bits are cleared (the top one for sign, the next one to
// assure low part value is always less than the high part value.
// - The top bit of the high part will be cleared and the next bit will be 1
// (so high part is always bigger than low part due to the quasi-top bit).
//
// This means that the addresses we can store must be 4 byte aligned
// and less than 1 ExbiBytes ( 2^60 bytes, ~1 ExaByte). User-level address space in Windows 64
// is much less than this (8TB, 2^43 bytes): "1 EByte (or it was 640K?) ought to be enough for anybody" ;-).
caster.addr = m;
BOOST_ASSERT((caster.addr_uint64 & boost::uint64_t(3)) == 0);
max_count = boost::uint32_t(caster.addr_uint64 >> 32);
initial_count = boost::uint32_t(caster.addr_uint64);
initial_count = initial_count/4;
//Make sure top two bits are zero
BOOST_ASSERT((max_count & boost::uint32_t(0xC0000000)) == 0);
//Set quasi-top bit
max_count |= boost::uint32_t(0x40000000);
}
bool created = false;
const permissions & perm = permissions();
std::string pid_creation_time, name;
get_pid_creation_time_str(pid_creation_time);
name = "bipc_gmap_sem_lock_";
name += pid_creation_time;
bool success = m_mtx_lock.open_or_create(name.c_str(), perm);
name = "bipc_gmap_sem_count_";
name += pid_creation_time;
scoped_lock<winapi_mutex_wrapper> lck(m_mtx_lock);
{
success = success && m_sem_count.open_or_create
( name.c_str(), static_cast<long>(0), winapi_semaphore_wrapper::MaxCount, perm, created);
name = "bipc_gmap_sem_map_";
name += pid_creation_time;
success = success && m_sem_map.open_or_create
(name.c_str(), initial_count, max_count, perm, created);
if(!success){
delete m;
//winapi_xxx wrappers do the cleanup...
throw int(0);
}
if(!created){
delete m;
}
else{
BOOST_ASSERT(&get_map_unlocked() == m);
}
m_sem_count.post();
}
}
map_type &get_map_unlocked()
{
if(sizeof(void*) == sizeof(boost::uint32_t)){
union caster_union
{
void *addr;
boost::uint32_t addr_uint32;
} caster;
caster.addr = 0;
caster.addr_uint32 = m_sem_map.limit();
caster.addr_uint32 = caster.addr_uint32 << 2;
return *static_cast<map_type*>(caster.addr);
}
else{
union caster_union
{
void *addr;
boost::uint64_t addr_uint64;
} caster;
boost::uint32_t max_count(m_sem_map.limit()), initial_count(m_sem_map.value());
//Clear quasi-top bit
max_count &= boost::uint32_t(0xBFFFFFFF);
caster.addr_uint64 = max_count;
caster.addr_uint64 = caster.addr_uint64 << 32;
caster.addr_uint64 |= boost::uint64_t(initial_count) << 2;
return *static_cast<map_type*>(caster.addr);
}
}
ref_count_ptr *find(const char *name)
{
scoped_lock<winapi_mutex_wrapper> lck(m_mtx_lock);
map_type &map = this->get_map_unlocked();
map_type::iterator it = map.find(boost::container::string(name));
if(it != map.end()){
return &it->second;
}
else{
return 0;
}
}
ref_count_ptr * insert(const char *name, const ref_count_ptr &ref)
{
scoped_lock<winapi_mutex_wrapper> lck(m_mtx_lock);
map_type &map = this->get_map_unlocked();
map_type::iterator it = map.insert(map_type::value_type(boost::container::string(name), ref)).first;
return &it->second;
}
bool erase(const char *name)
{
scoped_lock<winapi_mutex_wrapper> lck(m_mtx_lock);
map_type &map = this->get_map_unlocked();
return map.erase(boost::container::string(name)) != 0;
}
template<class F>
void atomic_func(F &f)
{
scoped_lock<winapi_mutex_wrapper> lck(m_mtx_lock);
f();
}
~windows_semaphore_based_map()
{
scoped_lock<winapi_mutex_wrapper> lck(m_mtx_lock);
m_sem_count.wait();
if(0 == m_sem_count.value()){
map_type &map = this->get_map_unlocked();
BOOST_ASSERT(map.empty());
delete &map;
}
//First close sems to protect this with the external mutex
m_sem_map.close();
m_sem_count.close();
//Once scoped_lock unlocks the mutex, the destructor will close the handle...
}
private:
winapi_mutex_wrapper m_mtx_lock;
winapi_semaphore_wrapper m_sem_map;
winapi_semaphore_wrapper m_sem_count;
};
template<>
struct thread_safe_global_map_dependant<windows_semaphore_based_map>
{
static void apply_gmem_erase_logic(const char *, const char *){}
static bool remove_old_gmem()
{ return true; }
struct lock_file_logic
{
lock_file_logic(windows_semaphore_based_map &)
: retry_with_new_map(false)
{}
void operator()(void){}
bool retry() const { return retry_with_new_map; }
private:
const bool retry_with_new_map;
};
static void construct_map(void *addr)
{
::new (addr)windows_semaphore_based_map;
}
struct unlink_map_logic
{
unlink_map_logic(windows_semaphore_based_map &)
{}
void operator()(){}
};
static ref_count_ptr *find(windows_semaphore_based_map &map, const char *name)
{
return map.find(name);
}
static ref_count_ptr * insert(windows_semaphore_based_map &map, const char *name, const ref_count_ptr &ref)
{
return map.insert(name, ref);
}
static bool erase(windows_semaphore_based_map &map, const char *name)
{
return map.erase(name);
}
template<class F>
static void atomic_func(windows_semaphore_based_map &map, F &f)
{
map.atomic_func(f);
}
};
} //namespace intermodule_singleton_helpers {
template<typename C, bool LazyInit = true, bool Phoenix = false>
class windows_intermodule_singleton
: public intermodule_singleton_impl
< C
, LazyInit
, Phoenix
, intermodule_singleton_helpers::windows_semaphore_based_map
>
{};
} //namespace ipcdetail{
} //namespace interprocess{
} //namespace boost{
#include <boost/interprocess/detail/config_end.hpp>
#endif //#ifndef BOOST_INTERPROCESS_WINDOWS_INTERMODULE_SINGLETON_HPP
@@ -0,0 +1,331 @@
///////////////////////////////////////////////////////////////////////////////
/// \file make_expr_.hpp
/// Contains definition of make_expr_\<\> class template.
//
// Copyright 2008 Eric Niebler. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
template<
typename Tag
, typename Domain
, 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 _ = void
>
struct make_expr_
{};
template<typename Domain, typename A>
struct make_expr_<tag::terminal, Domain, A
, void , void , void , void , void , void , void , void , void , void>
{
typedef typename proto::detail::protoify<A, Domain>::result_type result_type;
BOOST_FORCEINLINE
result_type operator()(typename add_reference<A>::type a) const
{
return proto::detail::protoify<A, Domain>()(a);
}
};
template<typename A>
struct make_expr_<tag::terminal, deduce_domain, A
, void , void , void , void , void , void , void , void , void , void>
: make_expr_<tag::terminal, default_domain, A>
{};
template<typename Tag, typename Domain , typename A0>
struct make_expr_<Tag, Domain , A0
, void , void , void , void , void , void , void , void , void, void>
{
typedef
list1<
typename boost::proto::detail::protoify< A0 , Domain >::result_type
>
proto_args;
typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
typedef typename Domain::proto_generator proto_generator;
typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
BOOST_FORCEINLINE
result_type operator()(typename add_reference<A0 >::type a0) const
{
expr_type const that = {
boost::proto::detail::protoify< A0 , Domain >()(a0)
};
return proto_generator()(that);
}
};
template<typename Tag , typename A0>
struct make_expr_<Tag, deduce_domain , A0
, void , void , void , void , void , void , void , void , void, void>
: make_expr_<
Tag
, typename deduce_domain1<A0>::type
, A0
>
{};
template<typename Tag, typename Domain , typename A0 , typename A1>
struct make_expr_<Tag, Domain , A0 , A1
, void , void , void , void , void , void , void , void, void>
{
typedef
list2<
typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type
>
proto_args;
typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
typedef typename Domain::proto_generator proto_generator;
typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
BOOST_FORCEINLINE
result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1) const
{
expr_type const that = {
boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1)
};
return proto_generator()(that);
}
};
template<typename Tag , typename A0 , typename A1>
struct make_expr_<Tag, deduce_domain , A0 , A1
, void , void , void , void , void , void , void , void, void>
: make_expr_<
Tag
, typename deduce_domain2<A0 , A1>::type
, A0 , A1
>
{};
template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2>
struct make_expr_<Tag, Domain , A0 , A1 , A2
, void , void , void , void , void , void , void, void>
{
typedef
list3<
typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type
>
proto_args;
typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
typedef typename Domain::proto_generator proto_generator;
typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
BOOST_FORCEINLINE
result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2) const
{
expr_type const that = {
boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2)
};
return proto_generator()(that);
}
};
template<typename Tag , typename A0 , typename A1 , typename A2>
struct make_expr_<Tag, deduce_domain , A0 , A1 , A2
, void , void , void , void , void , void , void, void>
: make_expr_<
Tag
, typename deduce_domain3<A0 , A1 , A2>::type
, A0 , A1 , A2
>
{};
template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3>
struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3
, void , void , void , void , void , void, void>
{
typedef
list4<
typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type
>
proto_args;
typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
typedef typename Domain::proto_generator proto_generator;
typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
BOOST_FORCEINLINE
result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3) const
{
expr_type const that = {
boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3)
};
return proto_generator()(that);
}
};
template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3>
struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3
, void , void , void , void , void , void, void>
: make_expr_<
Tag
, typename deduce_domain4<A0 , A1 , A2 , A3>::type
, A0 , A1 , A2 , A3
>
{};
template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4
, void , void , void , void , void, void>
{
typedef
list5<
typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type
>
proto_args;
typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
typedef typename Domain::proto_generator proto_generator;
typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
BOOST_FORCEINLINE
result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4) const
{
expr_type const that = {
boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4)
};
return proto_generator()(that);
}
};
template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4
, void , void , void , void , void, void>
: make_expr_<
Tag
, typename deduce_domain5<A0 , A1 , A2 , A3 , A4>::type
, A0 , A1 , A2 , A3 , A4
>
{};
template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5
, void , void , void , void, void>
{
typedef
list6<
typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type
>
proto_args;
typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
typedef typename Domain::proto_generator proto_generator;
typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
BOOST_FORCEINLINE
result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5) const
{
expr_type const that = {
boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5)
};
return proto_generator()(that);
}
};
template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5
, void , void , void , void, void>
: make_expr_<
Tag
, typename deduce_domain6<A0 , A1 , A2 , A3 , A4 , A5>::type
, A0 , A1 , A2 , A3 , A4 , A5
>
{};
template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5 , A6
, void , void , void, void>
{
typedef
list7<
typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type , typename boost::proto::detail::protoify< A6 , Domain >::result_type
>
proto_args;
typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
typedef typename Domain::proto_generator proto_generator;
typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
BOOST_FORCEINLINE
result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5 , typename add_reference<A6 >::type a6) const
{
expr_type const that = {
boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5) , boost::proto::detail::protoify< A6 , Domain >()(a6)
};
return proto_generator()(that);
}
};
template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5 , A6
, void , void , void, void>
: make_expr_<
Tag
, typename deduce_domain7<A0 , A1 , A2 , A3 , A4 , A5 , A6>::type
, A0 , A1 , A2 , A3 , A4 , A5 , A6
>
{};
template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
, void , void, void>
{
typedef
list8<
typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type , typename boost::proto::detail::protoify< A6 , Domain >::result_type , typename boost::proto::detail::protoify< A7 , Domain >::result_type
>
proto_args;
typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
typedef typename Domain::proto_generator proto_generator;
typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
BOOST_FORCEINLINE
result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5 , typename add_reference<A6 >::type a6 , typename add_reference<A7 >::type a7) const
{
expr_type const that = {
boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5) , boost::proto::detail::protoify< A6 , Domain >()(a6) , boost::proto::detail::protoify< A7 , Domain >()(a7)
};
return proto_generator()(that);
}
};
template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
, void , void, void>
: make_expr_<
Tag
, typename deduce_domain8<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>::type
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
>
{};
template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
, void, void>
{
typedef
list9<
typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type , typename boost::proto::detail::protoify< A6 , Domain >::result_type , typename boost::proto::detail::protoify< A7 , Domain >::result_type , typename boost::proto::detail::protoify< A8 , Domain >::result_type
>
proto_args;
typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
typedef typename Domain::proto_generator proto_generator;
typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
BOOST_FORCEINLINE
result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5 , typename add_reference<A6 >::type a6 , typename add_reference<A7 >::type a7 , typename add_reference<A8 >::type a8) const
{
expr_type const that = {
boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5) , boost::proto::detail::protoify< A6 , Domain >()(a6) , boost::proto::detail::protoify< A7 , Domain >()(a7) , boost::proto::detail::protoify< A8 , Domain >()(a8)
};
return proto_generator()(that);
}
};
template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
, void, void>
: make_expr_<
Tag
, typename deduce_domain9<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>::type
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
>
{};
template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
, void>
{
typedef
list10<
typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type , typename boost::proto::detail::protoify< A6 , Domain >::result_type , typename boost::proto::detail::protoify< A7 , Domain >::result_type , typename boost::proto::detail::protoify< A8 , Domain >::result_type , typename boost::proto::detail::protoify< A9 , Domain >::result_type
>
proto_args;
typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
typedef typename Domain::proto_generator proto_generator;
typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
BOOST_FORCEINLINE
result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5 , typename add_reference<A6 >::type a6 , typename add_reference<A7 >::type a7 , typename add_reference<A8 >::type a8 , typename add_reference<A9 >::type a9) const
{
expr_type const that = {
boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5) , boost::proto::detail::protoify< A6 , Domain >()(a6) , boost::proto::detail::protoify< A7 , Domain >()(a7) , boost::proto::detail::protoify< A8 , Domain >()(a8) , boost::proto::detail::protoify< A9 , Domain >()(a9)
};
return proto_generator()(that);
}
};
template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
, void>
: make_expr_<
Tag
, typename deduce_domain10<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>::type
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
>
{};
@@ -0,0 +1,8 @@
#ifndef GETUSERID_HPP_
#define GETUSERID_HPP_
#include <QString>
QString get_user_id ();
#endif
@@ -0,0 +1,19 @@
//-----------------------------------------------------------------------------
// boost variant/detail/config.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003 Eric Friedman
// Copyright (c) 2016 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_VARIANT_DETAIL_CONFIG_HPP
#define BOOST_VARIANT_DETAIL_CONFIG_HPP
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#endif // BOOST_VARIANT_DETAIL_CONFIG_HPP
@@ -0,0 +1,116 @@
// Copyright (C) 2006 The Trustees of Indiana University.
// 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)
// Authors: Douglas Gregor
// Jeremiah Willcock
// Andrew Lumsdaine
// Distributed version of the two-bit color map
#ifndef BOOST_DISTRIBUTED_TWO_BIT_COLOR_MAP_HPP
#define BOOST_DISTRIBUTED_TWO_BIT_COLOR_MAP_HPP
#ifndef BOOST_GRAPH_USE_MPI
#error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
#endif
#include <boost/graph/two_bit_color_map.hpp>
#include <boost/property_map/parallel/distributed_property_map.hpp>
#include <boost/property_map/parallel/local_property_map.hpp>
namespace boost {
template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
class two_bit_color_map<local_property_map<ProcessGroup,GlobalMap,StorageMap> >
: public parallel::distributed_property_map<ProcessGroup, GlobalMap,
two_bit_color_map<StorageMap> >
{
typedef two_bit_color_map<StorageMap> local_map;
typedef parallel::distributed_property_map<ProcessGroup, GlobalMap,
local_map >
inherited;
typedef local_property_map<ProcessGroup, GlobalMap, StorageMap>
index_map_type;
public:
two_bit_color_map(std::size_t inital_size,
const index_map_type& index = index_map_type())
: inherited(index.process_group(), index.global(),
local_map(inital_size, index.base())) { }
inherited& base() { return *this; }
const inherited& base() const { return *this; }
};
template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
inline two_bit_color_type
get(two_bit_color_map<local_property_map<ProcessGroup,GlobalMap,StorageMap> >
const& pm,
typename property_traits<GlobalMap>::key_type key)
{
return get(pm.base(), key);
}
template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
inline void
put(two_bit_color_map<local_property_map<ProcessGroup,GlobalMap,StorageMap> >
const& pm,
typename property_traits<GlobalMap>::key_type key,
two_bit_color_type value)
{
put(pm.base(), key, value);
}
template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
class two_bit_color_map<parallel::distributed_property_map<
ProcessGroup, GlobalMap, StorageMap> >
: public parallel::distributed_property_map<
ProcessGroup, GlobalMap, two_bit_color_map<StorageMap> >
{
typedef two_bit_color_map<StorageMap> local_map;
typedef parallel::distributed_property_map<ProcessGroup,GlobalMap,local_map>
inherited;
typedef parallel::distributed_property_map<ProcessGroup, GlobalMap,
StorageMap>
index_map_type;
public:
two_bit_color_map(std::size_t inital_size,
const index_map_type& index = index_map_type())
: inherited(index.process_group(), index.global(),
local_map(inital_size, index.base())) { }
inherited& base() { return *this; }
const inherited& base() const { return *this; }
};
template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
inline two_bit_color_type
get(two_bit_color_map<
parallel::distributed_property_map<
ProcessGroup, GlobalMap, two_bit_color_map<StorageMap> > > const& pm,
typename property_traits<GlobalMap>::key_type key)
{
return get(pm.base(), key);
}
template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
inline void
put(two_bit_color_map<
parallel::distributed_property_map<
ProcessGroup, GlobalMap, two_bit_color_map<StorageMap> > > const& pm,
typename property_traits<GlobalMap>::key_type key,
two_bit_color_type value)
{
put(pm.base(), key, value);
}
} // end namespace boost
#endif // BOOST_DISTRIBUTED_TWO_BIT_COLOR_MAP_HPP
@@ -0,0 +1,9 @@
#ifndef META_DATA_REGISTRY_HPP__
#define META_DATA_REGISTRY_HPP__
class QItemEditorFactory;
QItemEditorFactory * item_editor_factory ();
void register_types ();
#endif
@@ -0,0 +1,467 @@
#include "DXLabSuiteCommanderTransceiver.hpp"
#include <QTcpSocket>
#include <QRegularExpression>
#include <QLocale>
#include <QThread>
#include "NetworkServerLookup.hpp"
#include "moc_DXLabSuiteCommanderTransceiver.cpp"
namespace
{
char const * const commander_transceiver_name {"DX Lab Suite Commander"};
QString map_mode (Transceiver::MODE mode)
{
switch (mode)
{
case Transceiver::AM: return "AM";
case Transceiver::CW: return "CW";
case Transceiver::CW_R: return "CW-R";
case Transceiver::USB: return "USB";
case Transceiver::LSB: return "LSB";
case Transceiver::FSK: return "RTTY";
case Transceiver::FSK_R: return "RTTY-R";
case Transceiver::DIG_L: return "DATA-L";
case Transceiver::DIG_U: return "DATA-U";
case Transceiver::FM:
case Transceiver::DIG_FM:
return "FM";
default: break;
}
return "USB";
}
}
void DXLabSuiteCommanderTransceiver::register_transceivers (TransceiverFactory::Transceivers * registry, int id)
{
(*registry)[commander_transceiver_name] = TransceiverFactory::Capabilities {id, TransceiverFactory::Capabilities::network, true};
}
DXLabSuiteCommanderTransceiver::DXLabSuiteCommanderTransceiver (std::unique_ptr<TransceiverBase> wrapped,
QString const& address, bool use_for_ptt,
int poll_interval, QObject * parent)
: PollingTransceiver {poll_interval, parent}
, wrapped_ {std::move (wrapped)}
, use_for_ptt_ {use_for_ptt}
, server_ {address}
, commander_ {nullptr}
{
}
int DXLabSuiteCommanderTransceiver::do_start ()
{
TRACE_CAT ("DXLabSuiteCommanderTransceiver", "starting");
if (wrapped_) wrapped_->start (0);
auto server_details = network_server_lookup (server_, 52002u, QHostAddress::LocalHost, QAbstractSocket::IPv4Protocol);
if (!commander_)
{
commander_ = new QTcpSocket {this}; // QObject takes ownership
}
commander_->connectToHost (std::get<0> (server_details), std::get<1> (server_details));
if (!commander_->waitForConnected ())
{
TRACE_CAT ("DXLabSuiteCommanderTransceiver", "failed to connect" << commander_->errorString ());
throw error {tr ("Failed to connect to DX Lab Suite Commander\n") + commander_->errorString ()};
}
// sleeps here are to ensure Commander has actually queried the rig
// rather than returning cached data which maybe stale or simply
// read backs of not yet committed values, the 2s delays are
// arbitrary but hopefully enough as the actual time required is rig
// and Commander setting dependent
int resolution {0};
QThread::msleep (2000);
auto reply = command_with_reply ("<command:10>CmdGetFreq<parameters:0>");
if (0 == reply.indexOf ("<CmdFreq:"))
{
auto f = string_to_frequency (reply.mid (reply.indexOf ('>') + 1));
if (f && !(f % 10))
{
auto test_frequency = f - f % 100 + 55;
auto f_string = frequency_to_string (test_frequency);
auto params = ("<xcvrfreq:%1>" + f_string).arg (f_string.size ());
simple_command (("<command:10>CmdSetFreq<parameters:%1>" + params).arg (params.size ()));
QThread::msleep (2000);
reply = command_with_reply ("<command:10>CmdGetFreq<parameters:0>");
if (0 == reply.indexOf ("<CmdFreq:"))
{
auto new_frequency = string_to_frequency (reply.mid (reply.indexOf ('>') + 1));
switch (static_cast<Radio::FrequencyDelta> (new_frequency - test_frequency))
{
case -5: resolution = -1; break; // 10Hz truncated
case 5: resolution = 1; break; // 10Hz rounded
case -15: resolution = -2; break; // 20Hz truncated
case -55: resolution = -2; break; // 100Hz truncated
case 45: resolution = 2; break; // 100Hz rounded
}
if (1 == resolution) // may be 20Hz rounded
{
test_frequency = f - f % 100 + 51;
f_string = frequency_to_string (test_frequency);
params = ("<xcvrfreq:%1>" + f_string).arg (f_string.size ());
simple_command (("<command:10>CmdSetFreq<parameters:%1>" + params).arg (params.size ()));
QThread::msleep (2000);
reply = command_with_reply ("<command:10>CmdGetFreq<parameters:0>");
new_frequency = string_to_frequency (reply.mid (reply.indexOf ('>') + 1));
if (9 == static_cast<Radio::FrequencyDelta> (new_frequency - test_frequency))
{
resolution = 2; // 20Hz rounded
}
}
f_string = frequency_to_string (f);
params = ("<xcvrfreq:%1>" + f_string).arg (f_string.size ());
simple_command (("<command:10>CmdSetFreq<parameters:%1>" + params).arg (params.size ()));
}
}
}
else
{
TRACE_CAT ("DXLabSuiteCommanderTransceiver", "get frequency unexpected response");
throw error {tr ("DX Lab Suite Commander didn't respond correctly reading frequency")};
}
poll ();
return resolution;
}
void DXLabSuiteCommanderTransceiver::do_stop ()
{
if (commander_)
{
commander_->close ();
delete commander_, commander_ = nullptr;
}
if (wrapped_) wrapped_->stop ();
TRACE_CAT ("DXLabSuiteCommanderTransceiver", "stopped");
}
void DXLabSuiteCommanderTransceiver::do_ptt (bool on)
{
TRACE_CAT ("DXLabSuiteCommanderTransceiver", on << state ());
if (use_for_ptt_)
{
simple_command (on ? "<command:5>CmdTX<parameters:0>" : "<command:5>CmdRX<parameters:0>");
}
else
{
Q_ASSERT (wrapped_);
TransceiverState new_state {wrapped_->state ()};
new_state.ptt (on);
wrapped_->set (new_state, 0);
}
update_PTT (on);
}
void DXLabSuiteCommanderTransceiver::do_frequency (Frequency f, MODE m, bool /*no_ignore*/)
{
TRACE_CAT ("DXLabSuiteCommanderTransceiver", f << state ());
auto f_string = frequency_to_string (f);
if (UNK != m && m != get_mode ())
{
auto m_string = map_mode (m);
auto params = ("<xcvrfreq:%1>" + f_string + "<xcvrmode:%2>" + m_string + "<preservesplitanddual:1>Y").arg (f_string.size ()).arg (m_string.size ());
simple_command (("<command:14>CmdSetFreqMode<parameters:%1>" + params).arg (params.size ()));
update_mode (m);
}
else
{
auto params = ("<xcvrfreq:%1>" + f_string).arg (f_string.size ());
simple_command (("<command:10>CmdSetFreq<parameters:%1>" + params).arg (params.size ()));
}
update_rx_frequency (f);
}
void DXLabSuiteCommanderTransceiver::do_tx_frequency (Frequency tx, MODE mode, bool /*no_ignore*/)
{
TRACE_CAT ("DXLabSuiteCommanderTransceiver", tx << state ());
if (tx)
{
auto f_string = frequency_to_string (tx);
auto params = ("<xcvrfreq:%1>" + f_string + "<SuppressDual:1>Y").arg (f_string.size ());
if (UNK == mode)
{
params += "<SuppressModeChange:1>Y";
}
simple_command (("<command:11>CmdQSXSplit<parameters:%1>" + params).arg (params.size ()));
}
else
{
simple_command ("<command:8>CmdSplit<parameters:8><1:3>off");
}
update_split (tx);
update_other_frequency (tx);
}
void DXLabSuiteCommanderTransceiver::do_mode (MODE m)
{
TRACE_CAT ("DXLabSuiteCommanderTransceiver", m << state ());
auto m_string = map_mode (m);
auto params = ("<1:%1>" + m_string).arg (m_string.size ());
simple_command (("<command:10>CmdSetMode<parameters:%1>" + params).arg (params.size ()));
update_mode (m);
}
void DXLabSuiteCommanderTransceiver::poll ()
{
#if WSJT_TRACE_CAT && WSJT_TRACE_CAT_POLLS
bool quiet {false};
#else
bool quiet {true};
#endif
auto reply = command_with_reply ("<command:10>CmdGetFreq<parameters:0>", quiet);
if (0 == reply.indexOf ("<CmdFreq:"))
{
auto f = string_to_frequency (reply.mid (reply.indexOf ('>') + 1));
if (f)
{
if (!state ().ptt ()) // Commander is not reliable on frequency
// polls while transmitting
{
update_rx_frequency (f);
}
}
}
else
{
TRACE_CAT_POLL ("DXLabSuiteCommanderTransceiver", "get frequency unexpected response");
throw error {tr ("DX Lab Suite Commander didn't respond correctly polling frequency")};
}
if (state ().split ())
{
reply = command_with_reply ("<command:12>CmdGetTXFreq<parameters:0>", quiet);
if (0 == reply.indexOf ("<CmdTXFreq:"))
{
auto f = string_to_frequency (reply.mid (reply.indexOf ('>') + 1));
if (f)
{
if (!state ().ptt ()) // Commander is not reliable on frequency
// polls while transmitting
{
update_other_frequency (f);
}
}
}
else
{
TRACE_CAT_POLL ("DXLabSuiteCommanderTransceiver", "get tx frequency unexpected response");
throw error {tr ("DX Lab Suite Commander didn't respond correctly polling TX frequency")};
}
}
reply = command_with_reply ("<command:12>CmdSendSplit<parameters:0>", quiet);
if (0 == reply.indexOf ("<CmdSplit:"))
{
auto split = reply.mid (reply.indexOf ('>') + 1);
if ("ON" == split)
{
update_split (true);
}
else if ("OFF" == split)
{
update_split (false);
}
else
{
TRACE_CAT_POLL ("DXLabSuiteCommanderTransceiver", "unexpected split state" << split);
throw error {tr ("DX Lab Suite Commander sent an unrecognised split state: ") + split};
}
}
else
{
TRACE_CAT_POLL ("DXLabSuiteCommanderTransceiver", "get split mode unexpected response");
throw error {tr ("DX Lab Suite Commander didn't respond correctly polling split status")};
}
get_mode (quiet);
}
auto DXLabSuiteCommanderTransceiver::get_mode (bool no_debug) -> MODE
{
MODE m {UNK};
auto reply = command_with_reply ("<command:11>CmdSendMode<parameters:0>", no_debug);
if (0 == reply.indexOf ("<CmdMode:"))
{
auto mode = reply.mid (reply.indexOf ('>') + 1);
if ("AM" == mode)
{
m = AM;
}
else if ("CW" == mode)
{
m = CW;
}
else if ("CW-R" == mode)
{
m = CW_R;
}
else if ("FM" == mode || "WBFM" == mode)
{
m = FM;
}
else if ("LSB" == mode)
{
m = LSB;
}
else if ("USB" == mode)
{
m = USB;
}
else if ("RTTY" == mode)
{
m = FSK;
}
else if ("RTTY-R" == mode)
{
m = FSK_R;
}
else if ("PKT" == mode || "DATA-L" == mode || "Data-L" == mode || "DIGL" == mode)
{
m = DIG_L;
}
else if ("PKT-R" == mode || "DATA-U" == mode || "Data-U" == mode || "DIGU" == mode)
{
m = DIG_U;
}
else
{
TRACE_CAT_POLL ("DXLabSuiteCommanderTransceiver", "unexpected mode name" << mode);
throw error {tr ("DX Lab Suite Commander sent an unrecognised mode: \"") + mode + '"'};
}
update_mode (m);
}
else
{
TRACE_CAT_POLL ("DXLabSuiteCommanderTransceiver", "unexpected response");
throw error {tr ("DX Lab Suite Commander didn't respond correctly polling mode")};
}
return m;
}
void DXLabSuiteCommanderTransceiver::simple_command (QString const& cmd, bool no_debug)
{
Q_ASSERT (commander_);
if (!no_debug)
{
TRACE_CAT ("DXLabSuiteCommanderTransceiver", cmd);
}
if (!write_to_port (cmd))
{
TRACE_CAT ("DXLabSuiteCommanderTransceiver", "failed:" << commander_->errorString ());
throw error {tr ("DX Lab Suite Commander send command failed\n") + commander_->errorString ()};
}
}
QString DXLabSuiteCommanderTransceiver::command_with_reply (QString const& cmd, bool no_debug)
{
Q_ASSERT (commander_);
if (!write_to_port (cmd))
{
TRACE_CAT ("DXLabSuiteCommanderTransceiver", "failed to send command:" << commander_->errorString ());
throw error {
tr ("DX Lab Suite Commander failed to send command \"%1\": %2\n")
.arg (cmd)
.arg (commander_->errorString ())
};
}
// waitForReadReady appears to be unreliable on Windows timing out
// when data is waiting so retry a few times
unsigned retries {5};
bool replied {false};
while (!replied && --retries)
{
replied = commander_->waitForReadyRead ();
if (!replied && commander_->error () != commander_->SocketTimeoutError)
{
TRACE_CAT ("DXLabSuiteCommanderTransceiver", cmd << "failed to read reply:" << commander_->errorString ());
throw error {
tr ("DX Lab Suite Commander send command \"%1\" read reply failed: %2\n")
.arg (cmd)
.arg (commander_->errorString ())
};
}
}
if (!replied)
{
TRACE_CAT ("DXLabSuiteCommanderTransceiver", cmd << "retries exhausted");
throw error {
tr ("DX Lab Suite Commander retries exhausted sending command \"%1\"")
.arg (cmd)
};
}
auto result = commander_->readAll ();
// qDebug () << "result: " << result;
// for (int i = 0; i < result.size (); ++i)
// {
// qDebug () << i << ":" << hex << int (result[i]);
// }
if (!no_debug)
{
TRACE_CAT ("DXLabSuiteCommanderTransceiver", cmd << "->" << result);
}
return result; // converting raw UTF-8 bytes to QString
}
bool DXLabSuiteCommanderTransceiver::write_to_port (QString const& s)
{
auto data = s.toLocal8Bit ();
auto to_send = data.constData ();
auto length = data.size ();
qint64 total_bytes_sent {0};
while (total_bytes_sent < length)
{
auto bytes_sent = commander_->write (to_send + total_bytes_sent, length - total_bytes_sent);
if (bytes_sent < 0 || !commander_->waitForBytesWritten ())
{
return false;
}
total_bytes_sent += bytes_sent;
}
return true;
}
QString DXLabSuiteCommanderTransceiver::frequency_to_string (Frequency f) const
{
// number is localized and in kHz, avoid floating point translation
// errors by adding a small number (0.1Hz)
return QString {"%L1"}.arg (f / 1e3 + 1e-4, 10, 'f', 3);
}
auto DXLabSuiteCommanderTransceiver::string_to_frequency (QString s) const -> Frequency
{
// temporary hack because Commander is returning invalid UTF-8 bytes
s.replace (QChar {QChar::ReplacementCharacter}, locale_.groupSeparator ());
// remove DP - relies on n.nnn kHz format so we can do ulonglong
// conversion to Hz
bool ok;
// auto f = locale_.toDouble (s, &ok); // use when CmdSendFreq and
// CmdSendTxFreq reinstated
auto f = QLocale::c ().toDouble (s, &ok); // temporary fix
if (!ok)
{
throw error {tr ("DX Lab Suite Commander sent an unrecognized frequency")};
}
return (f + 1e-4) * 1e3;
}
@@ -0,0 +1,62 @@
// Copyright (C) 2004 Arkadiy Vertleyb
// Copyright (C) 2004 Peder Holt
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_TYPEOF_REGISTER_FUNDAMENTAL_HPP_INCLUDED
#define BOOST_TYPEOF_REGISTER_FUNDAMENTAL_HPP_INCLUDED
#include <boost/typeof/typeof.hpp>
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
BOOST_TYPEOF_REGISTER_TYPE(unsigned char)
BOOST_TYPEOF_REGISTER_TYPE(unsigned short)
BOOST_TYPEOF_REGISTER_TYPE(unsigned int)
BOOST_TYPEOF_REGISTER_TYPE(unsigned long)
BOOST_TYPEOF_REGISTER_TYPE(signed char)
BOOST_TYPEOF_REGISTER_TYPE(signed short)
BOOST_TYPEOF_REGISTER_TYPE(signed int)
BOOST_TYPEOF_REGISTER_TYPE(signed long)
BOOST_TYPEOF_REGISTER_TYPE(bool)
BOOST_TYPEOF_REGISTER_TYPE(char)
BOOST_TYPEOF_REGISTER_TYPE(float)
BOOST_TYPEOF_REGISTER_TYPE(double)
BOOST_TYPEOF_REGISTER_TYPE(long double)
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
// If the following line fails to compile and you're using the Intel
// compiler, see http://lists.boost.org/MailArchives/boost-users/msg06567.php,
// and define BOOST_NO_INTRINSIC_WCHAR_T on the command line.
BOOST_TYPEOF_REGISTER_TYPE(wchar_t)
#endif
#if (defined(BOOST_MSVC) && (BOOST_MSVC == 1200)) \
|| (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \
|| (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER == 1200))
BOOST_TYPEOF_REGISTER_TYPE(unsigned __int8)
BOOST_TYPEOF_REGISTER_TYPE(__int8)
BOOST_TYPEOF_REGISTER_TYPE(unsigned __int16)
BOOST_TYPEOF_REGISTER_TYPE(__int16)
BOOST_TYPEOF_REGISTER_TYPE(unsigned __int32)
BOOST_TYPEOF_REGISTER_TYPE(__int32)
#ifdef __BORLANDC__
BOOST_TYPEOF_REGISTER_TYPE(unsigned __int64)
BOOST_TYPEOF_REGISTER_TYPE(__int64)
#endif
#endif
# if defined(BOOST_HAS_LONG_LONG)
BOOST_TYPEOF_REGISTER_TYPE(::boost::ulong_long_type)
BOOST_TYPEOF_REGISTER_TYPE(::boost::long_long_type)
#elif defined(BOOST_HAS_MS_INT64)
BOOST_TYPEOF_REGISTER_TYPE(unsigned __int64)
BOOST_TYPEOF_REGISTER_TYPE(__int64)
#endif
BOOST_TYPEOF_REGISTER_TYPE(void)
#endif//BOOST_TYPEOF_REGISTER_FUNDAMENTAL_HPP_INCLUDED
@@ -0,0 +1,42 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_END_IMPL_05042005_1142)
#define FUSION_END_IMPL_05042005_1142
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/container/vector/vector_iterator.hpp>
namespace boost { namespace fusion
{
struct vector_tag;
namespace extension
{
template <typename Tag>
struct end_impl;
template <>
struct end_impl<vector_tag>
{
template <typename Sequence>
struct apply
{
typedef typename Sequence::size size;
typedef vector_iterator<Sequence, size::value> type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(Sequence& v)
{
return type(v);
}
};
};
}
}}
#endif
@@ -0,0 +1,43 @@
#ifndef BOOST_MPL_LIST_LIST20_HPP_INCLUDED
#define BOOST_MPL_LIST_LIST20_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$
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include <boost/mpl/list/list10.hpp>
#endif
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER list20.hpp
# include <boost/mpl/list/aux_/include_preprocessed.hpp>
#else
# include <boost/preprocessor/iterate.hpp>
namespace boost { namespace mpl {
# define BOOST_PP_ITERATION_PARAMS_1 \
(3,(11, 20, <boost/mpl/list/aux_/numbered.hpp>))
# include BOOST_PP_ITERATE()
}}
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_LIST_LIST20_HPP_INCLUDED
@@ -0,0 +1,16 @@
#ifndef BOOST_SCOPED_ARRAY_HPP_INCLUDED
#define BOOST_SCOPED_ARRAY_HPP_INCLUDED
// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
// Copyright (c) 2001, 2002 Peter Dimov
//
// 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)
//
// http://www.boost.org/libs/smart_ptr/scoped_array.htm
//
#include <boost/smart_ptr/scoped_array.hpp>
#endif // #ifndef BOOST_SCOPED_ARRAY_HPP_INCLUDED
@@ -0,0 +1,917 @@
/*==============================================================================
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 TryCatch, typename Exception, typename Capture, typename Expr>
struct catch_push_back<TryCatch, Exception, Capture, Expr, 2>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
, catch_exception<Exception>
, Capture
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Capture const& capture
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch)
, proto::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
>(catch_exception<Exception>(), capture, catch_)
);
}
};
template <typename TryCatch, typename Exception, typename Expr>
struct catch_push_back<TryCatch, Exception, void, Expr, 2>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
, catch_exception<Exception>
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch)
, proto::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
>(catch_exception<Exception>(), catch_)
);
}
};
template <typename TryCatch, typename Expr>
struct catch_all_push_back<TryCatch, Expr, 2>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_all
, proto::basic_default_domain
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch)
, proto::make_expr<
phoenix::tag::catch_all
, proto::basic_default_domain
>(catch_)
);
}
};
template <typename TryCatch, typename Exception, typename Capture, typename Expr>
struct catch_push_back<TryCatch, Exception, Capture, Expr, 3>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
, catch_exception<Exception>
, Capture
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Capture const& capture
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch)
, proto::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
>(catch_exception<Exception>(), capture, catch_)
);
}
};
template <typename TryCatch, typename Exception, typename Expr>
struct catch_push_back<TryCatch, Exception, void, Expr, 3>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
, catch_exception<Exception>
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch)
, proto::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
>(catch_exception<Exception>(), catch_)
);
}
};
template <typename TryCatch, typename Expr>
struct catch_all_push_back<TryCatch, Expr, 3>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_all
, proto::basic_default_domain
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch)
, proto::make_expr<
phoenix::tag::catch_all
, proto::basic_default_domain
>(catch_)
);
}
};
template <typename TryCatch, typename Exception, typename Capture, typename Expr>
struct catch_push_back<TryCatch, Exception, Capture, Expr, 4>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
, catch_exception<Exception>
, Capture
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Capture const& capture
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch)
, proto::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
>(catch_exception<Exception>(), capture, catch_)
);
}
};
template <typename TryCatch, typename Exception, typename Expr>
struct catch_push_back<TryCatch, Exception, void, Expr, 4>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
, catch_exception<Exception>
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch)
, proto::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
>(catch_exception<Exception>(), catch_)
);
}
};
template <typename TryCatch, typename Expr>
struct catch_all_push_back<TryCatch, Expr, 4>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_all
, proto::basic_default_domain
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch)
, proto::make_expr<
phoenix::tag::catch_all
, proto::basic_default_domain
>(catch_)
);
}
};
template <typename TryCatch, typename Exception, typename Capture, typename Expr>
struct catch_push_back<TryCatch, Exception, Capture, Expr, 5>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
, catch_exception<Exception>
, Capture
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type , typename proto::result_of::child_c<TryCatch, 4>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Capture const& capture
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch) , proto::child_c< 4>(try_catch)
, proto::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
>(catch_exception<Exception>(), capture, catch_)
);
}
};
template <typename TryCatch, typename Exception, typename Expr>
struct catch_push_back<TryCatch, Exception, void, Expr, 5>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
, catch_exception<Exception>
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type , typename proto::result_of::child_c<TryCatch, 4>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch) , proto::child_c< 4>(try_catch)
, proto::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
>(catch_exception<Exception>(), catch_)
);
}
};
template <typename TryCatch, typename Expr>
struct catch_all_push_back<TryCatch, Expr, 5>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_all
, proto::basic_default_domain
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type , typename proto::result_of::child_c<TryCatch, 4>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch) , proto::child_c< 4>(try_catch)
, proto::make_expr<
phoenix::tag::catch_all
, proto::basic_default_domain
>(catch_)
);
}
};
template <typename TryCatch, typename Exception, typename Capture, typename Expr>
struct catch_push_back<TryCatch, Exception, Capture, Expr, 6>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
, catch_exception<Exception>
, Capture
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type , typename proto::result_of::child_c<TryCatch, 4>::type , typename proto::result_of::child_c<TryCatch, 5>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Capture const& capture
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch) , proto::child_c< 4>(try_catch) , proto::child_c< 5>(try_catch)
, proto::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
>(catch_exception<Exception>(), capture, catch_)
);
}
};
template <typename TryCatch, typename Exception, typename Expr>
struct catch_push_back<TryCatch, Exception, void, Expr, 6>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
, catch_exception<Exception>
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type , typename proto::result_of::child_c<TryCatch, 4>::type , typename proto::result_of::child_c<TryCatch, 5>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch) , proto::child_c< 4>(try_catch) , proto::child_c< 5>(try_catch)
, proto::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
>(catch_exception<Exception>(), catch_)
);
}
};
template <typename TryCatch, typename Expr>
struct catch_all_push_back<TryCatch, Expr, 6>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_all
, proto::basic_default_domain
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type , typename proto::result_of::child_c<TryCatch, 4>::type , typename proto::result_of::child_c<TryCatch, 5>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch) , proto::child_c< 4>(try_catch) , proto::child_c< 5>(try_catch)
, proto::make_expr<
phoenix::tag::catch_all
, proto::basic_default_domain
>(catch_)
);
}
};
template <typename TryCatch, typename Exception, typename Capture, typename Expr>
struct catch_push_back<TryCatch, Exception, Capture, Expr, 7>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
, catch_exception<Exception>
, Capture
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type , typename proto::result_of::child_c<TryCatch, 4>::type , typename proto::result_of::child_c<TryCatch, 5>::type , typename proto::result_of::child_c<TryCatch, 6>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Capture const& capture
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch) , proto::child_c< 4>(try_catch) , proto::child_c< 5>(try_catch) , proto::child_c< 6>(try_catch)
, proto::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
>(catch_exception<Exception>(), capture, catch_)
);
}
};
template <typename TryCatch, typename Exception, typename Expr>
struct catch_push_back<TryCatch, Exception, void, Expr, 7>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
, catch_exception<Exception>
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type , typename proto::result_of::child_c<TryCatch, 4>::type , typename proto::result_of::child_c<TryCatch, 5>::type , typename proto::result_of::child_c<TryCatch, 6>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch) , proto::child_c< 4>(try_catch) , proto::child_c< 5>(try_catch) , proto::child_c< 6>(try_catch)
, proto::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
>(catch_exception<Exception>(), catch_)
);
}
};
template <typename TryCatch, typename Expr>
struct catch_all_push_back<TryCatch, Expr, 7>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_all
, proto::basic_default_domain
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type , typename proto::result_of::child_c<TryCatch, 4>::type , typename proto::result_of::child_c<TryCatch, 5>::type , typename proto::result_of::child_c<TryCatch, 6>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch) , proto::child_c< 4>(try_catch) , proto::child_c< 5>(try_catch) , proto::child_c< 6>(try_catch)
, proto::make_expr<
phoenix::tag::catch_all
, proto::basic_default_domain
>(catch_)
);
}
};
template <typename TryCatch, typename Exception, typename Capture, typename Expr>
struct catch_push_back<TryCatch, Exception, Capture, Expr, 8>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
, catch_exception<Exception>
, Capture
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type , typename proto::result_of::child_c<TryCatch, 4>::type , typename proto::result_of::child_c<TryCatch, 5>::type , typename proto::result_of::child_c<TryCatch, 6>::type , typename proto::result_of::child_c<TryCatch, 7>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Capture const& capture
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch) , proto::child_c< 4>(try_catch) , proto::child_c< 5>(try_catch) , proto::child_c< 6>(try_catch) , proto::child_c< 7>(try_catch)
, proto::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
>(catch_exception<Exception>(), capture, catch_)
);
}
};
template <typename TryCatch, typename Exception, typename Expr>
struct catch_push_back<TryCatch, Exception, void, Expr, 8>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
, catch_exception<Exception>
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type , typename proto::result_of::child_c<TryCatch, 4>::type , typename proto::result_of::child_c<TryCatch, 5>::type , typename proto::result_of::child_c<TryCatch, 6>::type , typename proto::result_of::child_c<TryCatch, 7>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch) , proto::child_c< 4>(try_catch) , proto::child_c< 5>(try_catch) , proto::child_c< 6>(try_catch) , proto::child_c< 7>(try_catch)
, proto::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
>(catch_exception<Exception>(), catch_)
);
}
};
template <typename TryCatch, typename Expr>
struct catch_all_push_back<TryCatch, Expr, 8>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_all
, proto::basic_default_domain
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type , typename proto::result_of::child_c<TryCatch, 4>::type , typename proto::result_of::child_c<TryCatch, 5>::type , typename proto::result_of::child_c<TryCatch, 6>::type , typename proto::result_of::child_c<TryCatch, 7>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch) , proto::child_c< 4>(try_catch) , proto::child_c< 5>(try_catch) , proto::child_c< 6>(try_catch) , proto::child_c< 7>(try_catch)
, proto::make_expr<
phoenix::tag::catch_all
, proto::basic_default_domain
>(catch_)
);
}
};
template <typename TryCatch, typename Exception, typename Capture, typename Expr>
struct catch_push_back<TryCatch, Exception, Capture, Expr, 9>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
, catch_exception<Exception>
, Capture
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type , typename proto::result_of::child_c<TryCatch, 4>::type , typename proto::result_of::child_c<TryCatch, 5>::type , typename proto::result_of::child_c<TryCatch, 6>::type , typename proto::result_of::child_c<TryCatch, 7>::type , typename proto::result_of::child_c<TryCatch, 8>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Capture const& capture
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch) , proto::child_c< 4>(try_catch) , proto::child_c< 5>(try_catch) , proto::child_c< 6>(try_catch) , proto::child_c< 7>(try_catch) , proto::child_c< 8>(try_catch)
, proto::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
>(catch_exception<Exception>(), capture, catch_)
);
}
};
template <typename TryCatch, typename Exception, typename Expr>
struct catch_push_back<TryCatch, Exception, void, Expr, 9>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
, catch_exception<Exception>
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type , typename proto::result_of::child_c<TryCatch, 4>::type , typename proto::result_of::child_c<TryCatch, 5>::type , typename proto::result_of::child_c<TryCatch, 6>::type , typename proto::result_of::child_c<TryCatch, 7>::type , typename proto::result_of::child_c<TryCatch, 8>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch) , proto::child_c< 4>(try_catch) , proto::child_c< 5>(try_catch) , proto::child_c< 6>(try_catch) , proto::child_c< 7>(try_catch) , proto::child_c< 8>(try_catch)
, proto::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
>(catch_exception<Exception>(), catch_)
);
}
};
template <typename TryCatch, typename Expr>
struct catch_all_push_back<TryCatch, Expr, 9>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_all
, proto::basic_default_domain
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type , typename proto::result_of::child_c<TryCatch, 4>::type , typename proto::result_of::child_c<TryCatch, 5>::type , typename proto::result_of::child_c<TryCatch, 6>::type , typename proto::result_of::child_c<TryCatch, 7>::type , typename proto::result_of::child_c<TryCatch, 8>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch) , proto::child_c< 4>(try_catch) , proto::child_c< 5>(try_catch) , proto::child_c< 6>(try_catch) , proto::child_c< 7>(try_catch) , proto::child_c< 8>(try_catch)
, proto::make_expr<
phoenix::tag::catch_all
, proto::basic_default_domain
>(catch_)
);
}
};
template <typename TryCatch, typename Exception, typename Capture, typename Expr>
struct catch_push_back<TryCatch, Exception, Capture, Expr, 10>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
, catch_exception<Exception>
, Capture
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type , typename proto::result_of::child_c<TryCatch, 4>::type , typename proto::result_of::child_c<TryCatch, 5>::type , typename proto::result_of::child_c<TryCatch, 6>::type , typename proto::result_of::child_c<TryCatch, 7>::type , typename proto::result_of::child_c<TryCatch, 8>::type , typename proto::result_of::child_c<TryCatch, 9>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Capture const& capture
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch) , proto::child_c< 4>(try_catch) , proto::child_c< 5>(try_catch) , proto::child_c< 6>(try_catch) , proto::child_c< 7>(try_catch) , proto::child_c< 8>(try_catch) , proto::child_c< 9>(try_catch)
, proto::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
>(catch_exception<Exception>(), capture, catch_)
);
}
};
template <typename TryCatch, typename Exception, typename Expr>
struct catch_push_back<TryCatch, Exception, void, Expr, 10>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
, catch_exception<Exception>
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type , typename proto::result_of::child_c<TryCatch, 4>::type , typename proto::result_of::child_c<TryCatch, 5>::type , typename proto::result_of::child_c<TryCatch, 6>::type , typename proto::result_of::child_c<TryCatch, 7>::type , typename proto::result_of::child_c<TryCatch, 8>::type , typename proto::result_of::child_c<TryCatch, 9>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch) , proto::child_c< 4>(try_catch) , proto::child_c< 5>(try_catch) , proto::child_c< 6>(try_catch) , proto::child_c< 7>(try_catch) , proto::child_c< 8>(try_catch) , proto::child_c< 9>(try_catch)
, proto::make_expr<
phoenix::tag::catch_
, proto::basic_default_domain
>(catch_exception<Exception>(), catch_)
);
}
};
template <typename TryCatch, typename Expr>
struct catch_all_push_back<TryCatch, Expr, 10>
{
typedef
typename proto::result_of::make_expr<
phoenix::tag::catch_all
, proto::basic_default_domain
, Expr
>::type
catch_expr;
typedef phoenix::expression::try_catch<
typename proto::result_of::child_c<TryCatch, 0>::type , typename proto::result_of::child_c<TryCatch, 1>::type , typename proto::result_of::child_c<TryCatch, 2>::type , typename proto::result_of::child_c<TryCatch, 3>::type , typename proto::result_of::child_c<TryCatch, 4>::type , typename proto::result_of::child_c<TryCatch, 5>::type , typename proto::result_of::child_c<TryCatch, 6>::type , typename proto::result_of::child_c<TryCatch, 7>::type , typename proto::result_of::child_c<TryCatch, 8>::type , typename proto::result_of::child_c<TryCatch, 9>::type
, catch_expr> gen_type;
typedef typename gen_type::type type;
static type
make(
TryCatch const& try_catch
, Expr const& catch_
)
{
return
gen_type::make(
proto::child_c< 0>(try_catch) , proto::child_c< 1>(try_catch) , proto::child_c< 2>(try_catch) , proto::child_c< 3>(try_catch) , proto::child_c< 4>(try_catch) , proto::child_c< 5>(try_catch) , proto::child_c< 6>(try_catch) , proto::child_c< 7>(try_catch) , proto::child_c< 8>(try_catch) , proto::child_c< 9>(try_catch)
, proto::make_expr<
phoenix::tag::catch_all
, proto::basic_default_domain
>(catch_)
);
}
};
@@ -0,0 +1,114 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright 2016 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_MP_MIN_MAX_HPP
#define BOOST_MP_MIN_MAX_HPP
#include <boost/multiprecision/traits/is_backend.hpp>
namespace boost{ namespace multiprecision{
//
// Expression template overloads for (min) and (max):
//
// Introduced in response to https://svn.boost.org/trac/boost/ticket/11149
// note that these can not legally be injected into namespace std, and that doing so
// may break future enhancements to the standard. None the less adding
// namespace std{ using boost::multiprecision::(min); using boost::multiprecision::(max); }
// to your code may get some generic code working that wouldn't work otherwise.
//
// The use of enable_if on the return type is to avoid poisoning std::min/max,
// otherwise attempting to make an explicit call to min<long>(a, b) when these and std
// versions are in scope, will cause the compiler to try to instantiate the signatures
// for our versions as well as the std ones, which in turn instantiates number<long>
// which fails to compile as "long" is not a valid backend type.
//
template <class Backend>
inline typename boost::enable_if_c < boost::multiprecision::detail::is_backend<Backend>::value, const number<Backend, et_on>&>::type
(min)(const number<Backend, et_on>& a, const number<Backend, et_on>& b)
{
return a < b ? a : b;
}
template <class Backend, class tag, class A1, class A2, class A3, class A4>
inline typename boost::enable_if_c < boost::multiprecision::detail::is_backend<Backend>::value, const number<Backend, et_on> >::type
(min)(const number<Backend, et_on>& a, const detail::expression<tag, A1, A2, A3, A4>& b)
{
number<Backend, et_on> t(b);
if(a < t)
return a;
return BOOST_MP_MOVE(t);
}
template <class tag, class A1, class A2, class A3, class A4, class Backend>
inline typename boost::enable_if_c < boost::multiprecision::detail::is_backend<Backend>::value, const number<Backend, et_on> >::type
(min)(const detail::expression<tag, A1, A2, A3, A4>& a, const number<Backend, et_on>& b)
{
number<Backend, et_on> t(a);
if(t < b)
return BOOST_MP_MOVE(t);
return b;
}
template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b>
inline typename detail::expression<tag, A1, A2, A3, A4>::result_type
(min)(const detail::expression<tag, A1, A2, A3, A4>& a, const detail::expression<tagb, A1b, A2b, A3b, A4b>& b)
{
typename detail::expression<tag, A1, A2, A3, A4>::result_type t1(a), t2(b);
if(t1 < t2)
return BOOST_MP_MOVE(t1);
return BOOST_MP_MOVE(t2);
}
template <class tag, class A1, class A2, class A3, class A4>
inline typename detail::expression<tag, A1, A2, A3, A4>::result_type (min)(const detail::expression<tag, A1, A2, A3, A4>& a, const detail::expression<tag, A1, A2, A3, A4>& b)
{
typename detail::expression<tag, A1, A2, A3, A4>::result_type t1(a), t2(b);
if(t1 < t2)
return BOOST_MP_MOVE(t1);
return BOOST_MP_MOVE(t2);
}
template <class Backend>
inline typename boost::enable_if_c < boost::multiprecision::detail::is_backend<Backend>::value, const number<Backend, et_on>&>::type
(max)(const number<Backend, et_on>& a, const number<Backend, et_on>& b)
{
return a > b ? a : b;
}
template <class Backend, class tag, class A1, class A2, class A3, class A4>
inline typename boost::enable_if_c < boost::multiprecision::detail::is_backend<Backend>::value, const number<Backend, et_on> >::type
(max)(const number<Backend, et_on>& a, const detail::expression<tag, A1, A2, A3, A4>& b)
{
number<Backend, et_on> t(b);
if(a > t)
return a;
return BOOST_MP_MOVE(t);
}
template <class tag, class A1, class A2, class A3, class A4, class Backend>
inline typename boost::enable_if_c < boost::multiprecision::detail::is_backend<Backend>::value, const number<Backend, et_on> >::type
(max)(const detail::expression<tag, A1, A2, A3, A4>& a, const number<Backend, et_on>& b)
{
number<Backend, et_on> t(a);
if(t > b)
return BOOST_MP_MOVE(t);
return b;
}
template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b>
inline typename detail::expression<tag, A1, A2, A3, A4>::result_type
(max)(const detail::expression<tag, A1, A2, A3, A4>& a, const detail::expression<tagb, A1b, A2b, A3b, A4b>& b)
{
typename detail::expression<tag, A1, A2, A3, A4>::result_type t1(a), t2(b);
if(t1 > t2)
return BOOST_MP_MOVE(t1);
return BOOST_MP_MOVE(t2);
}
template <class tag, class A1, class A2, class A3, class A4>
inline typename detail::expression<tag, A1, A2, A3, A4>::result_type (max)(const detail::expression<tag, A1, A2, A3, A4>& a, const detail::expression<tag, A1, A2, A3, A4>& b)
{
typename detail::expression<tag, A1, A2, A3, A4>::result_type t1(a), t2(b);
if(t1 > t2)
return BOOST_MP_MOVE(t1);
return BOOST_MP_MOVE(t2);
}
}} // namespaces
#endif
@@ -0,0 +1,229 @@
// 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/list/list50.hpp" header
// -- DO NOT modify by hand!
namespace boost { namespace mpl {
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11, typename T12, typename T13, typename T14
, typename T15, typename T16, typename T17, typename T18, typename T19
, typename T20, typename T21, typename T22, typename T23, typename T24
, typename T25, typename T26, typename T27, typename T28, typename T29
, typename T30, typename T31, typename T32, typename T33, typename T34
, typename T35, typename T36, typename T37, typename T38, typename T39
, typename T40
>
struct list41
: l_item<
long_<41>
, T0
, list40< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40 >
>
{
typedef list41 type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11, typename T12, typename T13, typename T14
, typename T15, typename T16, typename T17, typename T18, typename T19
, typename T20, typename T21, typename T22, typename T23, typename T24
, typename T25, typename T26, typename T27, typename T28, typename T29
, typename T30, typename T31, typename T32, typename T33, typename T34
, typename T35, typename T36, typename T37, typename T38, typename T39
, typename T40, typename T41
>
struct list42
: l_item<
long_<42>
, T0
, list41< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41 >
>
{
typedef list42 type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11, typename T12, typename T13, typename T14
, typename T15, typename T16, typename T17, typename T18, typename T19
, typename T20, typename T21, typename T22, typename T23, typename T24
, typename T25, typename T26, typename T27, typename T28, typename T29
, typename T30, typename T31, typename T32, typename T33, typename T34
, typename T35, typename T36, typename T37, typename T38, typename T39
, typename T40, typename T41, typename T42
>
struct list43
: l_item<
long_<43>
, T0
, list42< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42 >
>
{
typedef list43 type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11, typename T12, typename T13, typename T14
, typename T15, typename T16, typename T17, typename T18, typename T19
, typename T20, typename T21, typename T22, typename T23, typename T24
, typename T25, typename T26, typename T27, typename T28, typename T29
, typename T30, typename T31, typename T32, typename T33, typename T34
, typename T35, typename T36, typename T37, typename T38, typename T39
, typename T40, typename T41, typename T42, typename T43
>
struct list44
: l_item<
long_<44>
, T0
, list43< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43 >
>
{
typedef list44 type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11, typename T12, typename T13, typename T14
, typename T15, typename T16, typename T17, typename T18, typename T19
, typename T20, typename T21, typename T22, typename T23, typename T24
, typename T25, typename T26, typename T27, typename T28, typename T29
, typename T30, typename T31, typename T32, typename T33, typename T34
, typename T35, typename T36, typename T37, typename T38, typename T39
, typename T40, typename T41, typename T42, typename T43, typename T44
>
struct list45
: l_item<
long_<45>
, T0
, list44< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44 >
>
{
typedef list45 type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11, typename T12, typename T13, typename T14
, typename T15, typename T16, typename T17, typename T18, typename T19
, typename T20, typename T21, typename T22, typename T23, typename T24
, typename T25, typename T26, typename T27, typename T28, typename T29
, typename T30, typename T31, typename T32, typename T33, typename T34
, typename T35, typename T36, typename T37, typename T38, typename T39
, typename T40, typename T41, typename T42, typename T43, typename T44
, typename T45
>
struct list46
: l_item<
long_<46>
, T0
, list45< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45 >
>
{
typedef list46 type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11, typename T12, typename T13, typename T14
, typename T15, typename T16, typename T17, typename T18, typename T19
, typename T20, typename T21, typename T22, typename T23, typename T24
, typename T25, typename T26, typename T27, typename T28, typename T29
, typename T30, typename T31, typename T32, typename T33, typename T34
, typename T35, typename T36, typename T37, typename T38, typename T39
, typename T40, typename T41, typename T42, typename T43, typename T44
, typename T45, typename T46
>
struct list47
: l_item<
long_<47>
, T0
, list46< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46 >
>
{
typedef list47 type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11, typename T12, typename T13, typename T14
, typename T15, typename T16, typename T17, typename T18, typename T19
, typename T20, typename T21, typename T22, typename T23, typename T24
, typename T25, typename T26, typename T27, typename T28, typename T29
, typename T30, typename T31, typename T32, typename T33, typename T34
, typename T35, typename T36, typename T37, typename T38, typename T39
, typename T40, typename T41, typename T42, typename T43, typename T44
, typename T45, typename T46, typename T47
>
struct list48
: l_item<
long_<48>
, T0
, list47< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47 >
>
{
typedef list48 type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11, typename T12, typename T13, typename T14
, typename T15, typename T16, typename T17, typename T18, typename T19
, typename T20, typename T21, typename T22, typename T23, typename T24
, typename T25, typename T26, typename T27, typename T28, typename T29
, typename T30, typename T31, typename T32, typename T33, typename T34
, typename T35, typename T36, typename T37, typename T38, typename T39
, typename T40, typename T41, typename T42, typename T43, typename T44
, typename T45, typename T46, typename T47, typename T48
>
struct list49
: l_item<
long_<49>
, T0
, list48< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48 >
>
{
typedef list49 type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11, typename T12, typename T13, typename T14
, typename T15, typename T16, typename T17, typename T18, typename T19
, typename T20, typename T21, typename T22, typename T23, typename T24
, typename T25, typename T26, typename T27, typename T28, typename T29
, typename T30, typename T31, typename T32, typename T33, typename T34
, typename T35, typename T36, typename T37, typename T38, typename T39
, typename T40, typename T41, typename T42, typename T43, typename T44
, typename T45, typename T46, typename T47, typename T48, typename T49
>
struct list50
: l_item<
long_<50>
, T0
, list49< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49 >
>
{
typedef list50 type;
};
}}
@@ -0,0 +1,148 @@
// 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/divides.hpp" header
// -- DO NOT modify by hand!
namespace boost { namespace mpl {
template<
typename Tag1
, typename Tag2
, BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
, BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
>
struct divides_impl
: if_c<
( tag1_ > tag2_ )
, aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 >
, aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 >
>::type
{
};
/// for Digital Mars C++/compilers with no CTPS/TTP support
template<> struct divides_impl< na,na >
{
template< typename U1, typename U2 > struct apply
{
typedef apply type;
BOOST_STATIC_CONSTANT(int, value = 0);
};
};
template<> struct divides_impl< na,integral_c_tag >
{
template< typename U1, typename U2 > struct apply
{
typedef apply type;
BOOST_STATIC_CONSTANT(int, value = 0);
};
};
template<> struct divides_impl< integral_c_tag,na >
{
template< typename U1, typename U2 > struct apply
{
typedef apply type;
BOOST_STATIC_CONSTANT(int, value = 0);
};
};
template< typename T > struct divides_tag
{
typedef typename T::tag type;
};
/// forward declaration
template<
typename BOOST_MPL_AUX_NA_PARAM(N1)
, typename BOOST_MPL_AUX_NA_PARAM(N2)
>
struct divides2;
template<
typename BOOST_MPL_AUX_NA_PARAM(N1)
, typename BOOST_MPL_AUX_NA_PARAM(N2)
, typename N3 = na, typename N4 = na, typename N5 = na
>
struct divides
: if_<
is_na<N3>
, divides2< N1,N2 >
, divides<
divides2< N1,N2 >
, N3, N4, N5
>
>::type
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(
5
, divides
, ( N1, N2, N3, N4, N5 )
)
};
template<
typename N1
, typename N2
>
struct divides2
: aux::msvc_eti_base< typename apply_wrap2<
divides_impl<
typename divides_tag<N1>::type
, typename divides_tag<N2>::type
>
, N1
, N2
>::type >::type
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides2, (N1, N2))
};
BOOST_MPL_AUX_NA_SPEC2(2, 5, divides)
}}
namespace boost { namespace mpl {
namespace aux {
template< typename T, T n1, T n2 >
struct divides_wknd
{
BOOST_STATIC_CONSTANT(T, value = (n1 / n2));
typedef integral_c< T,value > type;
};
}
template<>
struct divides_impl< integral_c_tag,integral_c_tag >
{
template< typename N1, typename N2 > struct apply
: aux::divides_wknd<
typename aux::largest_int<
typename N1::value_type
, typename N2::value_type
>::type
, N1::value
, N2::value
>::type
{
};
};
}}
@@ -0,0 +1,326 @@
// (C) Copyright Tobias Schwinger
//
// Use modification and distribution are subject to the boost Software License,
// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
//------------------------------------------------------------------------------
// no include guards, this file is intended for multiple inclusion
// input: BOOST_FT_syntax type macro to use
// input: BOOST_FT_cc empty or cc specifier
// input: BOOST_FT_ell empty or "..."
// input: BOOST_FT_cv empty or cv qualifiers
// input: BOOST_FT_flags single decimal integer encoding the flags
// output: BOOST_FT_n number of component types (arity+1)
// output: BOOST_FT_arity current arity
// output: BOOST_FT_type macro that expands to the type
// output: BOOST_FT_tplargs(p) template arguments with given prefix
// output: BOOST_FT_params(p) parameters with given prefix
# define BOOST_FT_make_type(flags,cc,arity) BOOST_FT_make_type_impl(flags,cc,arity)
# define BOOST_FT_make_type_impl(flags,cc,arity) make_type_ ## flags ## _ ## cc ## _ ## arity
template< typename R , typename T0 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,1)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) ( BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 2 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,1)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
> ::type type;
};
};
template< typename R , typename T0 , typename T1 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,2)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 3 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,2)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
> ::type type;
};
};
template< typename R , typename T0 , typename T1 , typename T2 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,3)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 4 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
typedef typename mpl::next< iter_2 > ::type iter_3;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,3)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
, typename mpl::deref< iter_3 > ::type
> ::type type;
};
};
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,4)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 5 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
typedef typename mpl::next< iter_2 > ::type iter_3;
typedef typename mpl::next< iter_3 > ::type iter_4;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,4)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
, typename mpl::deref< iter_3 > ::type
, typename mpl::deref< iter_4 > ::type
> ::type type;
};
};
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,5)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 6 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
typedef typename mpl::next< iter_2 > ::type iter_3;
typedef typename mpl::next< iter_3 > ::type iter_4;
typedef typename mpl::next< iter_4 > ::type iter_5;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,5)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
, typename mpl::deref< iter_3 > ::type
, typename mpl::deref< iter_4 > ::type
, typename mpl::deref< iter_5 > ::type
> ::type type;
};
};
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,6)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 7 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
typedef typename mpl::next< iter_2 > ::type iter_3;
typedef typename mpl::next< iter_3 > ::type iter_4;
typedef typename mpl::next< iter_4 > ::type iter_5;
typedef typename mpl::next< iter_5 > ::type iter_6;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,6)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
, typename mpl::deref< iter_3 > ::type
, typename mpl::deref< iter_4 > ::type
, typename mpl::deref< iter_5 > ::type
, typename mpl::deref< iter_6 > ::type
> ::type type;
};
};
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,7)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 8 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
typedef typename mpl::next< iter_2 > ::type iter_3;
typedef typename mpl::next< iter_3 > ::type iter_4;
typedef typename mpl::next< iter_4 > ::type iter_5;
typedef typename mpl::next< iter_5 > ::type iter_6;
typedef typename mpl::next< iter_6 > ::type iter_7;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,7)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
, typename mpl::deref< iter_3 > ::type
, typename mpl::deref< iter_4 > ::type
, typename mpl::deref< iter_5 > ::type
, typename mpl::deref< iter_6 > ::type
, typename mpl::deref< iter_7 > ::type
> ::type type;
};
};
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,8)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 9 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
typedef typename mpl::next< iter_2 > ::type iter_3;
typedef typename mpl::next< iter_3 > ::type iter_4;
typedef typename mpl::next< iter_4 > ::type iter_5;
typedef typename mpl::next< iter_5 > ::type iter_6;
typedef typename mpl::next< iter_6 > ::type iter_7;
typedef typename mpl::next< iter_7 > ::type iter_8;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,8)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
, typename mpl::deref< iter_3 > ::type
, typename mpl::deref< iter_4 > ::type
, typename mpl::deref< iter_5 > ::type
, typename mpl::deref< iter_6 > ::type
, typename mpl::deref< iter_7 > ::type
, typename mpl::deref< iter_8 > ::type
> ::type type;
};
};
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,9)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 10 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
typedef typename mpl::next< iter_2 > ::type iter_3;
typedef typename mpl::next< iter_3 > ::type iter_4;
typedef typename mpl::next< iter_4 > ::type iter_5;
typedef typename mpl::next< iter_5 > ::type iter_6;
typedef typename mpl::next< iter_6 > ::type iter_7;
typedef typename mpl::next< iter_7 > ::type iter_8;
typedef typename mpl::next< iter_8 > ::type iter_9;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,9)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
, typename mpl::deref< iter_3 > ::type
, typename mpl::deref< iter_4 > ::type
, typename mpl::deref< iter_5 > ::type
, typename mpl::deref< iter_6 > ::type
, typename mpl::deref< iter_7 > ::type
, typename mpl::deref< iter_8 > ::type
, typename mpl::deref< iter_9 > ::type
> ::type type;
};
};
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,10)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 11 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
typedef typename mpl::next< iter_2 > ::type iter_3;
typedef typename mpl::next< iter_3 > ::type iter_4;
typedef typename mpl::next< iter_4 > ::type iter_5;
typedef typename mpl::next< iter_5 > ::type iter_6;
typedef typename mpl::next< iter_6 > ::type iter_7;
typedef typename mpl::next< iter_7 > ::type iter_8;
typedef typename mpl::next< iter_8 > ::type iter_9;
typedef typename mpl::next< iter_9 > ::type iter_10;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,10)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
, typename mpl::deref< iter_3 > ::type
, typename mpl::deref< iter_4 > ::type
, typename mpl::deref< iter_5 > ::type
, typename mpl::deref< iter_6 > ::type
, typename mpl::deref< iter_7 > ::type
, typename mpl::deref< iter_8 > ::type
, typename mpl::deref< iter_9 > ::type
, typename mpl::deref< iter_10 > ::type
> ::type type;
};
};
# undef BOOST_FT_make_type
# undef BOOST_FT_make_type_impl
@@ -0,0 +1,11 @@
// Copyright Aleksey Gurtovoy 2000-2008
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// *Preprocessed* version of the main "quote.hpp" header
// -- DO NOT modify by hand!
@@ -0,0 +1,72 @@
// boost timer.hpp header file ---------------------------------------------//
// Copyright Beman Dawes 1994-99. 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/timer for documentation.
// Revision History
// 01 Apr 01 Modified to use new <boost/limits.hpp> header. (JMaddock)
// 12 Jan 01 Change to inline implementation to allow use without library
// builds. See docs for more rationale. (Beman Dawes)
// 25 Sep 99 elapsed_max() and elapsed_min() added (John Maddock)
// 16 Jul 99 Second beta
// 6 Jul 99 Initial boost version
#ifndef BOOST_TIMER_HPP
#define BOOST_TIMER_HPP
#include <boost/config.hpp>
#include <ctime>
#include <boost/limits.hpp>
# ifdef BOOST_NO_STDC_NAMESPACE
namespace std { using ::clock_t; using ::clock; }
# endif
namespace boost {
// timer -------------------------------------------------------------------//
// A timer object measures elapsed time.
// It is recommended that implementations measure wall clock rather than CPU
// time since the intended use is performance measurement on systems where
// total elapsed time is more important than just process or CPU time.
// Warnings: The maximum measurable elapsed time may well be only 596.5+ hours
// due to implementation limitations. The accuracy of timings depends on the
// accuracy of timing information provided by the underlying platform, and
// this varies a great deal from platform to platform.
class timer
{
public:
timer() { _start_time = std::clock(); } // postcondition: elapsed()==0
// timer( const timer& src ); // post: elapsed()==src.elapsed()
// ~timer(){}
// timer& operator=( const timer& src ); // post: elapsed()==src.elapsed()
void restart() { _start_time = std::clock(); } // post: elapsed()==0
double elapsed() const // return elapsed time in seconds
{ return double(std::clock() - _start_time) / CLOCKS_PER_SEC; }
double elapsed_max() const // return estimated maximum value for elapsed()
// Portability warning: elapsed_max() may return too high a value on systems
// where std::clock_t overflows or resets at surprising values.
{
return (double((std::numeric_limits<std::clock_t>::max)())
- double(_start_time)) / double(CLOCKS_PER_SEC);
}
double elapsed_min() const // return minimum value for elapsed()
{ return double(1)/double(CLOCKS_PER_SEC); }
private:
std::clock_t _start_time;
}; // timer
} // namespace boost
#endif // BOOST_TIMER_HPP
@@ -0,0 +1,349 @@
// Copyright John Maddock 2006.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_STATS_GAMMA_HPP
#define BOOST_STATS_GAMMA_HPP
// http://www.itl.nist.gov/div898/handbook/eda/section3/eda366b.htm
// http://mathworld.wolfram.com/GammaDistribution.html
// http://en.wikipedia.org/wiki/Gamma_distribution
#include <boost/math/distributions/fwd.hpp>
#include <boost/math/special_functions/gamma.hpp>
#include <boost/math/distributions/detail/common_error_handling.hpp>
#include <boost/math/distributions/complement.hpp>
#include <utility>
namespace boost{ namespace math
{
namespace detail
{
template <class RealType, class Policy>
inline bool check_gamma_shape(
const char* function,
RealType shape,
RealType* result, const Policy& pol)
{
if((shape <= 0) || !(boost::math::isfinite)(shape))
{
*result = policies::raise_domain_error<RealType>(
function,
"Shape parameter is %1%, but must be > 0 !", shape, pol);
return false;
}
return true;
}
template <class RealType, class Policy>
inline bool check_gamma_x(
const char* function,
RealType const& x,
RealType* result, const Policy& pol)
{
if((x < 0) || !(boost::math::isfinite)(x))
{
*result = policies::raise_domain_error<RealType>(
function,
"Random variate is %1% but must be >= 0 !", x, pol);
return false;
}
return true;
}
template <class RealType, class Policy>
inline bool check_gamma(
const char* function,
RealType scale,
RealType shape,
RealType* result, const Policy& pol)
{
return check_scale(function, scale, result, pol) && check_gamma_shape(function, shape, result, pol);
}
} // namespace detail
template <class RealType = double, class Policy = policies::policy<> >
class gamma_distribution
{
public:
typedef RealType value_type;
typedef Policy policy_type;
gamma_distribution(RealType l_shape, RealType l_scale = 1)
: m_shape(l_shape), m_scale(l_scale)
{
RealType result;
detail::check_gamma("boost::math::gamma_distribution<%1%>::gamma_distribution", l_scale, l_shape, &result, Policy());
}
RealType shape()const
{
return m_shape;
}
RealType scale()const
{
return m_scale;
}
private:
//
// Data members:
//
RealType m_shape; // distribution shape
RealType m_scale; // distribution scale
};
// NO typedef because of clash with name of gamma function.
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const gamma_distribution<RealType, Policy>& /* dist */)
{ // Range of permissible values for random variable x.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(static_cast<RealType>(0), max_value<RealType>());
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const gamma_distribution<RealType, Policy>& /* dist */)
{ // Range of supported values for random variable x.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
using boost::math::tools::min_value;
return std::pair<RealType, RealType>(min_value<RealType>(), max_value<RealType>());
}
template <class RealType, class Policy>
inline RealType pdf(const gamma_distribution<RealType, Policy>& dist, const RealType& x)
{
BOOST_MATH_STD_USING // for ADL of std functions
static const char* function = "boost::math::pdf(const gamma_distribution<%1%>&, %1%)";
RealType shape = dist.shape();
RealType scale = dist.scale();
RealType result = 0;
if(false == detail::check_gamma(function, scale, shape, &result, Policy()))
return result;
if(false == detail::check_gamma_x(function, x, &result, Policy()))
return result;
if(x == 0)
{
return 0;
}
result = gamma_p_derivative(shape, x / scale, Policy()) / scale;
return result;
} // pdf
template <class RealType, class Policy>
inline RealType cdf(const gamma_distribution<RealType, Policy>& dist, const RealType& x)
{
BOOST_MATH_STD_USING // for ADL of std functions
static const char* function = "boost::math::cdf(const gamma_distribution<%1%>&, %1%)";
RealType shape = dist.shape();
RealType scale = dist.scale();
RealType result = 0;
if(false == detail::check_gamma(function, scale, shape, &result, Policy()))
return result;
if(false == detail::check_gamma_x(function, x, &result, Policy()))
return result;
result = boost::math::gamma_p(shape, x / scale, Policy());
return result;
} // cdf
template <class RealType, class Policy>
inline RealType quantile(const gamma_distribution<RealType, Policy>& dist, const RealType& p)
{
BOOST_MATH_STD_USING // for ADL of std functions
static const char* function = "boost::math::quantile(const gamma_distribution<%1%>&, %1%)";
RealType shape = dist.shape();
RealType scale = dist.scale();
RealType result = 0;
if(false == detail::check_gamma(function, scale, shape, &result, Policy()))
return result;
if(false == detail::check_probability(function, p, &result, Policy()))
return result;
if(p == 1)
return policies::raise_overflow_error<RealType>(function, 0, Policy());
result = gamma_p_inv(shape, p, Policy()) * scale;
return result;
}
template <class RealType, class Policy>
inline RealType cdf(const complemented2_type<gamma_distribution<RealType, Policy>, RealType>& c)
{
BOOST_MATH_STD_USING // for ADL of std functions
static const char* function = "boost::math::quantile(const gamma_distribution<%1%>&, %1%)";
RealType shape = c.dist.shape();
RealType scale = c.dist.scale();
RealType result = 0;
if(false == detail::check_gamma(function, scale, shape, &result, Policy()))
return result;
if(false == detail::check_gamma_x(function, c.param, &result, Policy()))
return result;
result = gamma_q(shape, c.param / scale, Policy());
return result;
}
template <class RealType, class Policy>
inline RealType quantile(const complemented2_type<gamma_distribution<RealType, Policy>, RealType>& c)
{
BOOST_MATH_STD_USING // for ADL of std functions
static const char* function = "boost::math::quantile(const gamma_distribution<%1%>&, %1%)";
RealType shape = c.dist.shape();
RealType scale = c.dist.scale();
RealType q = c.param;
RealType result = 0;
if(false == detail::check_gamma(function, scale, shape, &result, Policy()))
return result;
if(false == detail::check_probability(function, q, &result, Policy()))
return result;
if(q == 0)
return policies::raise_overflow_error<RealType>(function, 0, Policy());
result = gamma_q_inv(shape, q, Policy()) * scale;
return result;
}
template <class RealType, class Policy>
inline RealType mean(const gamma_distribution<RealType, Policy>& dist)
{
BOOST_MATH_STD_USING // for ADL of std functions
static const char* function = "boost::math::mean(const gamma_distribution<%1%>&)";
RealType shape = dist.shape();
RealType scale = dist.scale();
RealType result = 0;
if(false == detail::check_gamma(function, scale, shape, &result, Policy()))
return result;
result = shape * scale;
return result;
}
template <class RealType, class Policy>
inline RealType variance(const gamma_distribution<RealType, Policy>& dist)
{
BOOST_MATH_STD_USING // for ADL of std functions
static const char* function = "boost::math::variance(const gamma_distribution<%1%>&)";
RealType shape = dist.shape();
RealType scale = dist.scale();
RealType result = 0;
if(false == detail::check_gamma(function, scale, shape, &result, Policy()))
return result;
result = shape * scale * scale;
return result;
}
template <class RealType, class Policy>
inline RealType mode(const gamma_distribution<RealType, Policy>& dist)
{
BOOST_MATH_STD_USING // for ADL of std functions
static const char* function = "boost::math::mode(const gamma_distribution<%1%>&)";
RealType shape = dist.shape();
RealType scale = dist.scale();
RealType result = 0;
if(false == detail::check_gamma(function, scale, shape, &result, Policy()))
return result;
if(shape < 1)
return policies::raise_domain_error<RealType>(
function,
"The mode of the gamma distribution is only defined for values of the shape parameter >= 1, but got %1%.",
shape, Policy());
result = (shape - 1) * scale;
return result;
}
//template <class RealType, class Policy>
//inline RealType median(const gamma_distribution<RealType, Policy>& dist)
//{ // Rely on default definition in derived accessors.
//}
template <class RealType, class Policy>
inline RealType skewness(const gamma_distribution<RealType, Policy>& dist)
{
BOOST_MATH_STD_USING // for ADL of std functions
static const char* function = "boost::math::skewness(const gamma_distribution<%1%>&)";
RealType shape = dist.shape();
RealType scale = dist.scale();
RealType result = 0;
if(false == detail::check_gamma(function, scale, shape, &result, Policy()))
return result;
result = 2 / sqrt(shape);
return result;
}
template <class RealType, class Policy>
inline RealType kurtosis_excess(const gamma_distribution<RealType, Policy>& dist)
{
BOOST_MATH_STD_USING // for ADL of std functions
static const char* function = "boost::math::kurtosis_excess(const gamma_distribution<%1%>&)";
RealType shape = dist.shape();
RealType scale = dist.scale();
RealType result = 0;
if(false == detail::check_gamma(function, scale, shape, &result, Policy()))
return result;
result = 6 / shape;
return result;
}
template <class RealType, class Policy>
inline RealType kurtosis(const gamma_distribution<RealType, Policy>& dist)
{
return kurtosis_excess(dist) + 3;
}
} // namespace math
} // namespace boost
// This include must be at the end, *after* the accessors
// for this distribution have been defined, in order to
// keep compilers that support two-phase lookup happy.
#include <boost/math/distributions/detail/derived_accessors.hpp>
#endif // BOOST_STATS_GAMMA_HPP