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,224 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
This is an auto-generated file. Do not edit!
==============================================================================*/
namespace boost { namespace fusion { namespace detail
{
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>
struct vector_n_chooser
{
typedef vector30<T0 , 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> type;
};
template <>
struct vector_n_chooser<void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector0<> type;
};
template <typename T0>
struct vector_n_chooser<
T0
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector1<T0> type;
};
template <typename T0 , typename T1>
struct vector_n_chooser<
T0 , T1
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector2<T0 , T1> type;
};
template <typename T0 , typename T1 , typename T2>
struct vector_n_chooser<
T0 , T1 , T2
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector3<T0 , T1 , T2> type;
};
template <typename T0 , typename T1 , typename T2 , typename T3>
struct vector_n_chooser<
T0 , T1 , T2 , T3
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector4<T0 , T1 , T2 , T3> type;
};
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector5<T0 , T1 , T2 , T3 , T4> type;
};
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector6<T0 , T1 , T2 , T3 , T4 , T5> type;
};
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector7<T0 , T1 , T2 , T3 , T4 , T5 , T6> type;
};
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector8<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> type;
};
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector9<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> type;
};
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector10<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> type;
};
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector11<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10> 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>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector12<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11> 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>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector13<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12> 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>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector14<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13> 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>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector15<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> 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>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector16<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15> 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>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector17<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16> 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>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector18<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17> 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>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector19<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18> 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>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector20<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19> 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>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector21<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20> 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>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21
, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector22<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21> 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>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22
, void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector23<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22> 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>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23
, void_ , void_ , void_ , void_ , void_ , void_>
{
typedef vector24<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23> 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>
struct vector_n_chooser<
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24
, void_ , void_ , void_ , void_ , void_>
{
typedef vector25<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24> 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>
struct vector_n_chooser<
T0 , 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
, void_ , void_ , void_ , void_>
{
typedef vector26<T0 , 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> 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>
struct vector_n_chooser<
T0 , 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
, void_ , void_ , void_>
{
typedef vector27<T0 , 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> 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>
struct vector_n_chooser<
T0 , 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
, void_ , void_>
{
typedef vector28<T0 , 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> 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>
struct vector_n_chooser<
T0 , 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
, void_>
{
typedef vector29<T0 , 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> type;
};
}}}
@@ -0,0 +1,462 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
This is an auto-generated file. Do not edit!
==============================================================================*/
namespace boost { namespace fusion { namespace detail
{
template<typename Key, typename Value, typename Rest>
struct keyed_element;
struct nil_keyed_element;
template<typename N, typename T0 = void_ , typename T1 = void_ , typename T2 = void_ , typename T3 = void_ , typename T4 = void_ , typename T5 = void_ , typename T6 = void_ , typename T7 = void_ , typename T8 = void_ , typename T9 = void_ , typename T10 = void_ , typename T11 = void_ , typename T12 = void_ , typename T13 = void_ , typename T14 = void_ , typename T15 = void_ , typename T16 = void_ , typename T17 = void_ , typename T18 = void_ , typename T19 = void_>
struct deque_keyed_values_impl;
template<typename N>
struct deque_keyed_values_impl<N, void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{
typedef nil_keyed_element type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct()
{
return type();
}
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_()
{
return type();
}
};
template<typename N, 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>
struct deque_keyed_values_impl
{
typedef mpl::int_<mpl::plus<N, mpl::int_<1> >::value> next_index;
typedef typename deque_keyed_values_impl<
next_index,
T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19>::type tail;
typedef keyed_element<N, T0, tail> type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0)
{
return type(t0,
deque_keyed_values_impl<
next_index
>::construct());
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
>::forward_());
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1
>::construct(t1));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1
>::forward_(std::forward<T_1>( t1)));
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1 , typename detail::call_param<T2 >::type t2)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1 , T2
>::construct(t1 , t2));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1 , typename T_2>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1 , T_2 && t2)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1 , T_2
>::forward_(std::forward<T_1>( t1) , std::forward<T_2>( t2)));
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1 , typename detail::call_param<T2 >::type t2 , typename detail::call_param<T3 >::type t3)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1 , T2 , T3
>::construct(t1 , t2 , t3));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1 , typename T_2 , typename T_3>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1 , T_2 , T_3
>::forward_(std::forward<T_1>( t1) , std::forward<T_2>( t2) , std::forward<T_3>( t3)));
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1 , typename detail::call_param<T2 >::type t2 , typename detail::call_param<T3 >::type t3 , typename detail::call_param<T4 >::type t4)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1 , T2 , T3 , T4
>::construct(t1 , t2 , t3 , t4));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1 , typename T_2 , typename T_3 , typename T_4>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1 , T_2 , T_3 , T_4
>::forward_(std::forward<T_1>( t1) , std::forward<T_2>( t2) , std::forward<T_3>( t3) , std::forward<T_4>( t4)));
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1 , typename detail::call_param<T2 >::type t2 , typename detail::call_param<T3 >::type t3 , typename detail::call_param<T4 >::type t4 , typename detail::call_param<T5 >::type t5)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1 , T2 , T3 , T4 , T5
>::construct(t1 , t2 , t3 , t4 , t5));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1 , typename T_2 , typename T_3 , typename T_4 , typename T_5>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1 , T_2 , T_3 , T_4 , T_5
>::forward_(std::forward<T_1>( t1) , std::forward<T_2>( t2) , std::forward<T_3>( t3) , std::forward<T_4>( t4) , std::forward<T_5>( t5)));
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1 , typename detail::call_param<T2 >::type t2 , typename detail::call_param<T3 >::type t3 , typename detail::call_param<T4 >::type t4 , typename detail::call_param<T5 >::type t5 , typename detail::call_param<T6 >::type t6)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1 , T2 , T3 , T4 , T5 , T6
>::construct(t1 , t2 , t3 , t4 , t5 , t6));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1 , typename T_2 , typename T_3 , typename T_4 , typename T_5 , typename T_6>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_6 && t6)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1 , T_2 , T_3 , T_4 , T_5 , T_6
>::forward_(std::forward<T_1>( t1) , std::forward<T_2>( t2) , std::forward<T_3>( t3) , std::forward<T_4>( t4) , std::forward<T_5>( t5) , std::forward<T_6>( t6)));
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1 , typename detail::call_param<T2 >::type t2 , typename detail::call_param<T3 >::type t3 , typename detail::call_param<T4 >::type t4 , typename detail::call_param<T5 >::type t5 , typename detail::call_param<T6 >::type t6 , typename detail::call_param<T7 >::type t7)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1 , T2 , T3 , T4 , T5 , T6 , T7
>::construct(t1 , t2 , t3 , t4 , t5 , t6 , t7));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1 , typename T_2 , typename T_3 , typename T_4 , typename T_5 , typename T_6 , typename T_7>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_6 && t6 , T_7 && t7)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1 , T_2 , T_3 , T_4 , T_5 , T_6 , T_7
>::forward_(std::forward<T_1>( t1) , std::forward<T_2>( t2) , std::forward<T_3>( t3) , std::forward<T_4>( t4) , std::forward<T_5>( t5) , std::forward<T_6>( t6) , std::forward<T_7>( t7)));
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1 , typename detail::call_param<T2 >::type t2 , typename detail::call_param<T3 >::type t3 , typename detail::call_param<T4 >::type t4 , typename detail::call_param<T5 >::type t5 , typename detail::call_param<T6 >::type t6 , typename detail::call_param<T7 >::type t7 , typename detail::call_param<T8 >::type t8)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
>::construct(t1 , t2 , t3 , t4 , t5 , t6 , t7 , t8));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1 , typename T_2 , typename T_3 , typename T_4 , typename T_5 , typename T_6 , typename T_7 , typename T_8>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_6 && t6 , T_7 && t7 , T_8 && t8)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1 , T_2 , T_3 , T_4 , T_5 , T_6 , T_7 , T_8
>::forward_(std::forward<T_1>( t1) , std::forward<T_2>( t2) , std::forward<T_3>( t3) , std::forward<T_4>( t4) , std::forward<T_5>( t5) , std::forward<T_6>( t6) , std::forward<T_7>( t7) , std::forward<T_8>( t8)));
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1 , typename detail::call_param<T2 >::type t2 , typename detail::call_param<T3 >::type t3 , typename detail::call_param<T4 >::type t4 , typename detail::call_param<T5 >::type t5 , typename detail::call_param<T6 >::type t6 , typename detail::call_param<T7 >::type t7 , typename detail::call_param<T8 >::type t8 , typename detail::call_param<T9 >::type t9)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
>::construct(t1 , t2 , t3 , t4 , t5 , t6 , t7 , t8 , t9));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1 , typename T_2 , typename T_3 , typename T_4 , typename T_5 , typename T_6 , typename T_7 , typename T_8 , typename T_9>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_6 && t6 , T_7 && t7 , T_8 && t8 , T_9 && t9)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1 , T_2 , T_3 , T_4 , T_5 , T_6 , T_7 , T_8 , T_9
>::forward_(std::forward<T_1>( t1) , std::forward<T_2>( t2) , std::forward<T_3>( t3) , std::forward<T_4>( t4) , std::forward<T_5>( t5) , std::forward<T_6>( t6) , std::forward<T_7>( t7) , std::forward<T_8>( t8) , std::forward<T_9>( t9)));
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1 , typename detail::call_param<T2 >::type t2 , typename detail::call_param<T3 >::type t3 , typename detail::call_param<T4 >::type t4 , typename detail::call_param<T5 >::type t5 , typename detail::call_param<T6 >::type t6 , typename detail::call_param<T7 >::type t7 , typename detail::call_param<T8 >::type t8 , typename detail::call_param<T9 >::type t9 , typename detail::call_param<T10 >::type t10)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10
>::construct(t1 , t2 , t3 , t4 , t5 , t6 , t7 , t8 , t9 , t10));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1 , typename T_2 , typename T_3 , typename T_4 , typename T_5 , typename T_6 , typename T_7 , typename T_8 , typename T_9 , typename T_10>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_6 && t6 , T_7 && t7 , T_8 && t8 , T_9 && t9 , T_10 && t10)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1 , T_2 , T_3 , T_4 , T_5 , T_6 , T_7 , T_8 , T_9 , T_10
>::forward_(std::forward<T_1>( t1) , std::forward<T_2>( t2) , std::forward<T_3>( t3) , std::forward<T_4>( t4) , std::forward<T_5>( t5) , std::forward<T_6>( t6) , std::forward<T_7>( t7) , std::forward<T_8>( t8) , std::forward<T_9>( t9) , std::forward<T_10>( t10)));
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1 , typename detail::call_param<T2 >::type t2 , typename detail::call_param<T3 >::type t3 , typename detail::call_param<T4 >::type t4 , typename detail::call_param<T5 >::type t5 , typename detail::call_param<T6 >::type t6 , typename detail::call_param<T7 >::type t7 , typename detail::call_param<T8 >::type t8 , typename detail::call_param<T9 >::type t9 , typename detail::call_param<T10 >::type t10 , typename detail::call_param<T11 >::type t11)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11
>::construct(t1 , t2 , t3 , t4 , t5 , t6 , t7 , t8 , t9 , t10 , t11));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1 , typename T_2 , typename T_3 , typename T_4 , typename T_5 , typename T_6 , typename T_7 , typename T_8 , typename T_9 , typename T_10 , typename T_11>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_6 && t6 , T_7 && t7 , T_8 && t8 , T_9 && t9 , T_10 && t10 , T_11 && t11)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1 , T_2 , T_3 , T_4 , T_5 , T_6 , T_7 , T_8 , T_9 , T_10 , T_11
>::forward_(std::forward<T_1>( t1) , std::forward<T_2>( t2) , std::forward<T_3>( t3) , std::forward<T_4>( t4) , std::forward<T_5>( t5) , std::forward<T_6>( t6) , std::forward<T_7>( t7) , std::forward<T_8>( t8) , std::forward<T_9>( t9) , std::forward<T_10>( t10) , std::forward<T_11>( t11)));
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1 , typename detail::call_param<T2 >::type t2 , typename detail::call_param<T3 >::type t3 , typename detail::call_param<T4 >::type t4 , typename detail::call_param<T5 >::type t5 , typename detail::call_param<T6 >::type t6 , typename detail::call_param<T7 >::type t7 , typename detail::call_param<T8 >::type t8 , typename detail::call_param<T9 >::type t9 , typename detail::call_param<T10 >::type t10 , typename detail::call_param<T11 >::type t11 , typename detail::call_param<T12 >::type t12)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12
>::construct(t1 , t2 , t3 , t4 , t5 , t6 , t7 , t8 , t9 , t10 , t11 , t12));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1 , typename T_2 , typename T_3 , typename T_4 , typename T_5 , typename T_6 , typename T_7 , typename T_8 , typename T_9 , typename T_10 , typename T_11 , typename T_12>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_6 && t6 , T_7 && t7 , T_8 && t8 , T_9 && t9 , T_10 && t10 , T_11 && t11 , T_12 && t12)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1 , T_2 , T_3 , T_4 , T_5 , T_6 , T_7 , T_8 , T_9 , T_10 , T_11 , T_12
>::forward_(std::forward<T_1>( t1) , std::forward<T_2>( t2) , std::forward<T_3>( t3) , std::forward<T_4>( t4) , std::forward<T_5>( t5) , std::forward<T_6>( t6) , std::forward<T_7>( t7) , std::forward<T_8>( t8) , std::forward<T_9>( t9) , std::forward<T_10>( t10) , std::forward<T_11>( t11) , std::forward<T_12>( t12)));
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1 , typename detail::call_param<T2 >::type t2 , typename detail::call_param<T3 >::type t3 , typename detail::call_param<T4 >::type t4 , typename detail::call_param<T5 >::type t5 , typename detail::call_param<T6 >::type t6 , typename detail::call_param<T7 >::type t7 , typename detail::call_param<T8 >::type t8 , typename detail::call_param<T9 >::type t9 , typename detail::call_param<T10 >::type t10 , typename detail::call_param<T11 >::type t11 , typename detail::call_param<T12 >::type t12 , typename detail::call_param<T13 >::type t13)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13
>::construct(t1 , t2 , t3 , t4 , t5 , t6 , t7 , t8 , t9 , t10 , t11 , t12 , t13));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1 , typename T_2 , typename T_3 , typename T_4 , typename T_5 , typename T_6 , typename T_7 , typename T_8 , typename T_9 , typename T_10 , typename T_11 , typename T_12 , typename T_13>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_6 && t6 , T_7 && t7 , T_8 && t8 , T_9 && t9 , T_10 && t10 , T_11 && t11 , T_12 && t12 , T_13 && t13)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1 , T_2 , T_3 , T_4 , T_5 , T_6 , T_7 , T_8 , T_9 , T_10 , T_11 , T_12 , T_13
>::forward_(std::forward<T_1>( t1) , std::forward<T_2>( t2) , std::forward<T_3>( t3) , std::forward<T_4>( t4) , std::forward<T_5>( t5) , std::forward<T_6>( t6) , std::forward<T_7>( t7) , std::forward<T_8>( t8) , std::forward<T_9>( t9) , std::forward<T_10>( t10) , std::forward<T_11>( t11) , std::forward<T_12>( t12) , std::forward<T_13>( t13)));
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1 , typename detail::call_param<T2 >::type t2 , typename detail::call_param<T3 >::type t3 , typename detail::call_param<T4 >::type t4 , typename detail::call_param<T5 >::type t5 , typename detail::call_param<T6 >::type t6 , typename detail::call_param<T7 >::type t7 , typename detail::call_param<T8 >::type t8 , typename detail::call_param<T9 >::type t9 , typename detail::call_param<T10 >::type t10 , typename detail::call_param<T11 >::type t11 , typename detail::call_param<T12 >::type t12 , typename detail::call_param<T13 >::type t13 , typename detail::call_param<T14 >::type t14)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14
>::construct(t1 , t2 , t3 , t4 , t5 , t6 , t7 , t8 , t9 , t10 , t11 , t12 , t13 , t14));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1 , typename T_2 , typename T_3 , typename T_4 , typename T_5 , typename T_6 , typename T_7 , typename T_8 , typename T_9 , typename T_10 , typename T_11 , typename T_12 , typename T_13 , typename T_14>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_6 && t6 , T_7 && t7 , T_8 && t8 , T_9 && t9 , T_10 && t10 , T_11 && t11 , T_12 && t12 , T_13 && t13 , T_14 && t14)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1 , T_2 , T_3 , T_4 , T_5 , T_6 , T_7 , T_8 , T_9 , T_10 , T_11 , T_12 , T_13 , T_14
>::forward_(std::forward<T_1>( t1) , std::forward<T_2>( t2) , std::forward<T_3>( t3) , std::forward<T_4>( t4) , std::forward<T_5>( t5) , std::forward<T_6>( t6) , std::forward<T_7>( t7) , std::forward<T_8>( t8) , std::forward<T_9>( t9) , std::forward<T_10>( t10) , std::forward<T_11>( t11) , std::forward<T_12>( t12) , std::forward<T_13>( t13) , std::forward<T_14>( t14)));
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1 , typename detail::call_param<T2 >::type t2 , typename detail::call_param<T3 >::type t3 , typename detail::call_param<T4 >::type t4 , typename detail::call_param<T5 >::type t5 , typename detail::call_param<T6 >::type t6 , typename detail::call_param<T7 >::type t7 , typename detail::call_param<T8 >::type t8 , typename detail::call_param<T9 >::type t9 , typename detail::call_param<T10 >::type t10 , typename detail::call_param<T11 >::type t11 , typename detail::call_param<T12 >::type t12 , typename detail::call_param<T13 >::type t13 , typename detail::call_param<T14 >::type t14 , typename detail::call_param<T15 >::type t15)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15
>::construct(t1 , t2 , t3 , t4 , t5 , t6 , t7 , t8 , t9 , t10 , t11 , t12 , t13 , t14 , t15));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1 , typename T_2 , typename T_3 , typename T_4 , typename T_5 , typename T_6 , typename T_7 , typename T_8 , typename T_9 , typename T_10 , typename T_11 , typename T_12 , typename T_13 , typename T_14 , typename T_15>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_6 && t6 , T_7 && t7 , T_8 && t8 , T_9 && t9 , T_10 && t10 , T_11 && t11 , T_12 && t12 , T_13 && t13 , T_14 && t14 , T_15 && t15)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1 , T_2 , T_3 , T_4 , T_5 , T_6 , T_7 , T_8 , T_9 , T_10 , T_11 , T_12 , T_13 , T_14 , T_15
>::forward_(std::forward<T_1>( t1) , std::forward<T_2>( t2) , std::forward<T_3>( t3) , std::forward<T_4>( t4) , std::forward<T_5>( t5) , std::forward<T_6>( t6) , std::forward<T_7>( t7) , std::forward<T_8>( t8) , std::forward<T_9>( t9) , std::forward<T_10>( t10) , std::forward<T_11>( t11) , std::forward<T_12>( t12) , std::forward<T_13>( t13) , std::forward<T_14>( t14) , std::forward<T_15>( t15)));
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1 , typename detail::call_param<T2 >::type t2 , typename detail::call_param<T3 >::type t3 , typename detail::call_param<T4 >::type t4 , typename detail::call_param<T5 >::type t5 , typename detail::call_param<T6 >::type t6 , typename detail::call_param<T7 >::type t7 , typename detail::call_param<T8 >::type t8 , typename detail::call_param<T9 >::type t9 , typename detail::call_param<T10 >::type t10 , typename detail::call_param<T11 >::type t11 , typename detail::call_param<T12 >::type t12 , typename detail::call_param<T13 >::type t13 , typename detail::call_param<T14 >::type t14 , typename detail::call_param<T15 >::type t15 , typename detail::call_param<T16 >::type t16)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16
>::construct(t1 , t2 , t3 , t4 , t5 , t6 , t7 , t8 , t9 , t10 , t11 , t12 , t13 , t14 , t15 , t16));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1 , typename T_2 , typename T_3 , typename T_4 , typename T_5 , typename T_6 , typename T_7 , typename T_8 , typename T_9 , typename T_10 , typename T_11 , typename T_12 , typename T_13 , typename T_14 , typename T_15 , typename T_16>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_6 && t6 , T_7 && t7 , T_8 && t8 , T_9 && t9 , T_10 && t10 , T_11 && t11 , T_12 && t12 , T_13 && t13 , T_14 && t14 , T_15 && t15 , T_16 && t16)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1 , T_2 , T_3 , T_4 , T_5 , T_6 , T_7 , T_8 , T_9 , T_10 , T_11 , T_12 , T_13 , T_14 , T_15 , T_16
>::forward_(std::forward<T_1>( t1) , std::forward<T_2>( t2) , std::forward<T_3>( t3) , std::forward<T_4>( t4) , std::forward<T_5>( t5) , std::forward<T_6>( t6) , std::forward<T_7>( t7) , std::forward<T_8>( t8) , std::forward<T_9>( t9) , std::forward<T_10>( t10) , std::forward<T_11>( t11) , std::forward<T_12>( t12) , std::forward<T_13>( t13) , std::forward<T_14>( t14) , std::forward<T_15>( t15) , std::forward<T_16>( t16)));
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1 , typename detail::call_param<T2 >::type t2 , typename detail::call_param<T3 >::type t3 , typename detail::call_param<T4 >::type t4 , typename detail::call_param<T5 >::type t5 , typename detail::call_param<T6 >::type t6 , typename detail::call_param<T7 >::type t7 , typename detail::call_param<T8 >::type t8 , typename detail::call_param<T9 >::type t9 , typename detail::call_param<T10 >::type t10 , typename detail::call_param<T11 >::type t11 , typename detail::call_param<T12 >::type t12 , typename detail::call_param<T13 >::type t13 , typename detail::call_param<T14 >::type t14 , typename detail::call_param<T15 >::type t15 , typename detail::call_param<T16 >::type t16 , typename detail::call_param<T17 >::type t17)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17
>::construct(t1 , t2 , t3 , t4 , t5 , t6 , t7 , t8 , t9 , t10 , t11 , t12 , t13 , t14 , t15 , t16 , t17));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1 , typename T_2 , typename T_3 , typename T_4 , typename T_5 , typename T_6 , typename T_7 , typename T_8 , typename T_9 , typename T_10 , typename T_11 , typename T_12 , typename T_13 , typename T_14 , typename T_15 , typename T_16 , typename T_17>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_6 && t6 , T_7 && t7 , T_8 && t8 , T_9 && t9 , T_10 && t10 , T_11 && t11 , T_12 && t12 , T_13 && t13 , T_14 && t14 , T_15 && t15 , T_16 && t16 , T_17 && t17)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1 , T_2 , T_3 , T_4 , T_5 , T_6 , T_7 , T_8 , T_9 , T_10 , T_11 , T_12 , T_13 , T_14 , T_15 , T_16 , T_17
>::forward_(std::forward<T_1>( t1) , std::forward<T_2>( t2) , std::forward<T_3>( t3) , std::forward<T_4>( t4) , std::forward<T_5>( t5) , std::forward<T_6>( t6) , std::forward<T_7>( t7) , std::forward<T_8>( t8) , std::forward<T_9>( t9) , std::forward<T_10>( t10) , std::forward<T_11>( t11) , std::forward<T_12>( t12) , std::forward<T_13>( t13) , std::forward<T_14>( t14) , std::forward<T_15>( t15) , std::forward<T_16>( t16) , std::forward<T_17>( t17)));
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1 , typename detail::call_param<T2 >::type t2 , typename detail::call_param<T3 >::type t3 , typename detail::call_param<T4 >::type t4 , typename detail::call_param<T5 >::type t5 , typename detail::call_param<T6 >::type t6 , typename detail::call_param<T7 >::type t7 , typename detail::call_param<T8 >::type t8 , typename detail::call_param<T9 >::type t9 , typename detail::call_param<T10 >::type t10 , typename detail::call_param<T11 >::type t11 , typename detail::call_param<T12 >::type t12 , typename detail::call_param<T13 >::type t13 , typename detail::call_param<T14 >::type t14 , typename detail::call_param<T15 >::type t15 , typename detail::call_param<T16 >::type t16 , typename detail::call_param<T17 >::type t17 , typename detail::call_param<T18 >::type t18)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18
>::construct(t1 , t2 , t3 , t4 , t5 , t6 , t7 , t8 , t9 , t10 , t11 , t12 , t13 , t14 , t15 , t16 , t17 , t18));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1 , typename T_2 , typename T_3 , typename T_4 , typename T_5 , typename T_6 , typename T_7 , typename T_8 , typename T_9 , typename T_10 , typename T_11 , typename T_12 , typename T_13 , typename T_14 , typename T_15 , typename T_16 , typename T_17 , typename T_18>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_6 && t6 , T_7 && t7 , T_8 && t8 , T_9 && t9 , T_10 && t10 , T_11 && t11 , T_12 && t12 , T_13 && t13 , T_14 && t14 , T_15 && t15 , T_16 && t16 , T_17 && t17 , T_18 && t18)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1 , T_2 , T_3 , T_4 , T_5 , T_6 , T_7 , T_8 , T_9 , T_10 , T_11 , T_12 , T_13 , T_14 , T_15 , T_16 , T_17 , T_18
>::forward_(std::forward<T_1>( t1) , std::forward<T_2>( t2) , std::forward<T_3>( t3) , std::forward<T_4>( t4) , std::forward<T_5>( t5) , std::forward<T_6>( t6) , std::forward<T_7>( t7) , std::forward<T_8>( t8) , std::forward<T_9>( t9) , std::forward<T_10>( t10) , std::forward<T_11>( t11) , std::forward<T_12>( t12) , std::forward<T_13>( t13) , std::forward<T_14>( t14) , std::forward<T_15>( t15) , std::forward<T_16>( t16) , std::forward<T_17>( t17) , std::forward<T_18>( t18)));
}
# endif
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type construct(typename detail::call_param<T0 >::type t0 , typename detail::call_param<T1 >::type t1 , typename detail::call_param<T2 >::type t2 , typename detail::call_param<T3 >::type t3 , typename detail::call_param<T4 >::type t4 , typename detail::call_param<T5 >::type t5 , typename detail::call_param<T6 >::type t6 , typename detail::call_param<T7 >::type t7 , typename detail::call_param<T8 >::type t8 , typename detail::call_param<T9 >::type t9 , typename detail::call_param<T10 >::type t10 , typename detail::call_param<T11 >::type t11 , typename detail::call_param<T12 >::type t12 , typename detail::call_param<T13 >::type t13 , typename detail::call_param<T14 >::type t14 , typename detail::call_param<T15 >::type t15 , typename detail::call_param<T16 >::type t16 , typename detail::call_param<T17 >::type t17 , typename detail::call_param<T18 >::type t18 , typename detail::call_param<T19 >::type t19)
{
return type(t0,
deque_keyed_values_impl<
next_index
, T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19
>::construct(t1 , t2 , t3 , t4 , t5 , t6 , t7 , t8 , t9 , t10 , t11 , t12 , t13 , t14 , t15 , t16 , t17 , t18 , t19));
}
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T_0 , typename T_1 , typename T_2 , typename T_3 , typename T_4 , typename T_5 , typename T_6 , typename T_7 , typename T_8 , typename T_9 , typename T_10 , typename T_11 , typename T_12 , typename T_13 , typename T_14 , typename T_15 , typename T_16 , typename T_17 , typename T_18 , typename T_19>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type forward_(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_6 && t6 , T_7 && t7 , T_8 && t8 , T_9 && t9 , T_10 && t10 , T_11 && t11 , T_12 && t12 , T_13 && t13 , T_14 && t14 , T_15 && t15 , T_16 && t16 , T_17 && t17 , T_18 && t18 , T_19 && t19)
{
return type(std::forward<T_0>( t0),
deque_keyed_values_impl<
next_index
, T_1 , T_2 , T_3 , T_4 , T_5 , T_6 , T_7 , T_8 , T_9 , T_10 , T_11 , T_12 , T_13 , T_14 , T_15 , T_16 , T_17 , T_18 , T_19
>::forward_(std::forward<T_1>( t1) , std::forward<T_2>( t2) , std::forward<T_3>( t3) , std::forward<T_4>( t4) , std::forward<T_5>( t5) , std::forward<T_6>( t6) , std::forward<T_7>( t7) , std::forward<T_8>( t8) , std::forward<T_9>( t9) , std::forward<T_10>( t10) , std::forward<T_11>( t11) , std::forward<T_12>( t12) , std::forward<T_13>( t13) , std::forward<T_14>( t14) , std::forward<T_15>( t15) , std::forward<T_16>( t16) , std::forward<T_17>( t17) , std::forward<T_18>( t18) , std::forward<T_19>( t19)));
}
# endif
};
template<typename T0 = void_ , typename T1 = void_ , typename T2 = void_ , typename T3 = void_ , typename T4 = void_ , typename T5 = void_ , typename T6 = void_ , typename T7 = void_ , typename T8 = void_ , typename T9 = void_ , typename T10 = void_ , typename T11 = void_ , typename T12 = void_ , typename T13 = void_ , typename T14 = void_ , typename T15 = void_ , typename T16 = void_ , typename T17 = void_ , typename T18 = void_ , typename T19 = void_>
struct deque_keyed_values
: deque_keyed_values_impl<mpl::int_<0>, T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19>
{};
}}}
@@ -0,0 +1,254 @@
#ifndef DATE_TIME_TIME_SYSTEM_COUNTED_HPP
#define DATE_TIME_TIME_SYSTEM_COUNTED_HPP
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* Use, modification and distribution is subject to the
* Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include "boost/date_time/time_defs.hpp"
#include <string>
namespace boost {
namespace date_time {
//! Time representation that uses a single integer count
template<class config>
struct counted_time_rep
{
typedef typename config::int_type int_type;
typedef typename config::date_type date_type;
typedef typename config::impl_type impl_type;
typedef typename date_type::duration_type date_duration_type;
typedef typename date_type::calendar_type calendar_type;
typedef typename date_type::ymd_type ymd_type;
typedef typename config::time_duration_type time_duration_type;
typedef typename config::resolution_traits resolution_traits;
counted_time_rep(const date_type& d, const time_duration_type& time_of_day)
: time_count_(1)
{
if(d.is_infinity() || d.is_not_a_date() || time_of_day.is_special()) {
time_count_ = time_of_day.get_rep() + d.day_count();
//std::cout << time_count_ << std::endl;
}
else {
time_count_ = (d.day_number() * frac_sec_per_day()) + time_of_day.ticks();
}
}
explicit counted_time_rep(int_type count) :
time_count_(count)
{}
explicit counted_time_rep(impl_type count) :
time_count_(count)
{}
date_type date() const
{
if(time_count_.is_special()) {
return date_type(time_count_.as_special());
}
else {
typename calendar_type::date_int_type dc = static_cast<typename calendar_type::date_int_type>(day_count());
//std::cout << "time_rep here:" << dc << std::endl;
ymd_type ymd = calendar_type::from_day_number(dc);
return date_type(ymd);
}
}
//int_type day_count() const
unsigned long day_count() const
{
/* resolution_traits::as_number returns a boost::int64_t &
* frac_sec_per_day is also a boost::int64_t so, naturally,
* the division operation returns a boost::int64_t.
* The static_cast to an unsigned long is ok (results in no data loss)
* because frac_sec_per_day is either the number of
* microseconds per day, or the number of nanoseconds per day.
* Worst case scenario: resolution_traits::as_number returns the
* maximum value an int64_t can hold and frac_sec_per_day
* is microseconds per day (lowest possible value).
* The division operation will then return a value of 106751991 -
* easily fitting in an unsigned long.
*/
return static_cast<unsigned long>(resolution_traits::as_number(time_count_) / frac_sec_per_day());
}
int_type time_count() const
{
return resolution_traits::as_number(time_count_);
}
int_type tod() const
{
return resolution_traits::as_number(time_count_) % frac_sec_per_day();
}
static int_type frac_sec_per_day()
{
int_type seconds_per_day = 60*60*24;
int_type fractional_sec_per_sec(resolution_traits::res_adjust());
return seconds_per_day*fractional_sec_per_sec;
}
bool is_pos_infinity()const
{
return impl_type::is_pos_inf(time_count_.as_number());
}
bool is_neg_infinity()const
{
return impl_type::is_neg_inf(time_count_.as_number());
}
bool is_not_a_date_time()const
{
return impl_type::is_not_a_number(time_count_.as_number());
}
bool is_special()const
{
return time_count_.is_special();
}
impl_type get_rep()const
{
return time_count_;
}
private:
impl_type time_count_;
};
//! An unadjusted time system implementation.
template<class time_rep>
class counted_time_system
{
public:
typedef time_rep time_rep_type;
typedef typename time_rep_type::impl_type impl_type;
typedef typename time_rep_type::time_duration_type time_duration_type;
typedef typename time_duration_type::fractional_seconds_type fractional_seconds_type;
typedef typename time_rep_type::date_type date_type;
typedef typename time_rep_type::date_duration_type date_duration_type;
template<class T> static void unused_var(const T&) {}
static time_rep_type get_time_rep(const date_type& day,
const time_duration_type& tod,
date_time::dst_flags dst=not_dst)
{
unused_var(dst);
return time_rep_type(day, tod);
}
static time_rep_type get_time_rep(special_values sv)
{
switch (sv) {
case not_a_date_time:
return time_rep_type(date_type(not_a_date_time),
time_duration_type(not_a_date_time));
case pos_infin:
return time_rep_type(date_type(pos_infin),
time_duration_type(pos_infin));
case neg_infin:
return time_rep_type(date_type(neg_infin),
time_duration_type(neg_infin));
case max_date_time: {
time_duration_type td = time_duration_type(24,0,0,0) - time_duration_type(0,0,0,1);
return time_rep_type(date_type(max_date_time), td);
}
case min_date_time:
return time_rep_type(date_type(min_date_time), time_duration_type(0,0,0,0));
default:
return time_rep_type(date_type(not_a_date_time),
time_duration_type(not_a_date_time));
}
}
static date_type get_date(const time_rep_type& val)
{
return val.date();
}
static time_duration_type get_time_of_day(const time_rep_type& val)
{
if(val.is_special()) {
return time_duration_type(val.get_rep().as_special());
}
else{
return time_duration_type(0,0,0,val.tod());
}
}
static std::string zone_name(const time_rep_type&)
{
return "";
}
static bool is_equal(const time_rep_type& lhs, const time_rep_type& rhs)
{
return (lhs.time_count() == rhs.time_count());
}
static bool is_less(const time_rep_type& lhs, const time_rep_type& rhs)
{
return (lhs.time_count() < rhs.time_count());
}
static time_rep_type add_days(const time_rep_type& base,
const date_duration_type& dd)
{
if(base.is_special() || dd.is_special()) {
return(time_rep_type(base.get_rep() + dd.get_rep()));
}
else {
return time_rep_type(base.time_count() + (dd.days() * time_rep_type::frac_sec_per_day()));
}
}
static time_rep_type subtract_days(const time_rep_type& base,
const date_duration_type& dd)
{
if(base.is_special() || dd.is_special()) {
return(time_rep_type(base.get_rep() - dd.get_rep()));
}
else{
return time_rep_type(base.time_count() - (dd.days() * time_rep_type::frac_sec_per_day()));
}
}
static time_rep_type subtract_time_duration(const time_rep_type& base,
const time_duration_type& td)
{
if(base.is_special() || td.is_special()) {
return(time_rep_type(base.get_rep() - td.get_rep()));
}
else {
return time_rep_type(base.time_count() - td.ticks());
}
}
static time_rep_type add_time_duration(const time_rep_type& base,
time_duration_type td)
{
if(base.is_special() || td.is_special()) {
return(time_rep_type(base.get_rep() + td.get_rep()));
}
else {
return time_rep_type(base.time_count() + td.ticks());
}
}
static time_duration_type subtract_times(const time_rep_type& lhs,
const time_rep_type& rhs)
{
if(lhs.is_special() || rhs.is_special()) {
return(time_duration_type(
impl_type::to_special((lhs.get_rep() - rhs.get_rep()).as_number())));
}
else {
fractional_seconds_type fs = lhs.time_count() - rhs.time_count();
return time_duration_type(0,0,0,fs);
}
}
};
} } //namespace date_time
#endif
@@ -0,0 +1,73 @@
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// Preprocessed version of "boost/mpl/or.hpp" header
// -- DO NOT modify by hand!
namespace boost { namespace mpl {
namespace aux {
template< bool C_ > struct or_impl
{
template<
typename T1, typename T2, typename T3, typename T4
>
struct result_
: true_
{
};
};
template<> struct or_impl<false>
{
template<
typename T1, typename T2, typename T3, typename T4
>
struct result_
: or_impl<
BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
>::template result_< T2,T3,T4,false_ >
{
};
};
template<>
struct or_impl<false>
::result_< false_,false_,false_,false_ >
: false_
{
};
} // namespace aux
template<
typename BOOST_MPL_AUX_NA_PARAM(T1)
, typename BOOST_MPL_AUX_NA_PARAM(T2)
, typename T3 = false_, typename T4 = false_, typename T5 = false_
>
struct or_
: aux::or_impl<
BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
>::template result_< T2,T3,T4,T5 >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(
5
, or_
, ( T1, T2, T3, T4, T5)
)
};
BOOST_MPL_AUX_NA_SPEC2(
2
, 5
, or_
)
}}
@@ -0,0 +1,100 @@
/*=============================================================================
Copyright (c) 2003 Jonathan de Halleux (dehalleux@pelikhan.com)
http://spirit.sourceforge.net/
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
#ifndef BOOST_SPIRIT_ACTOR_ASSIGN_ACTOR_HPP
#define BOOST_SPIRIT_ACTOR_ASSIGN_ACTOR_HPP
#include <boost/spirit/home/classic/namespace.hpp>
#include <boost/spirit/home/classic/actor/ref_value_actor.hpp>
#include <boost/spirit/home/classic/actor/ref_const_ref_actor.hpp>
namespace boost { namespace spirit {
BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
///////////////////////////////////////////////////////////////////////////
// Summary:
// A semantic action policy that applies the assignement operator.
// (This doc uses convention available in actors.hpp)
//
// Actions (what it does):
// ref = value;
// ref = T(first,last);
// ref = value_ref;
//
// Policy name:
// assign_action
//
// Policy holder, corresponding helper method:
// ref_value_actor, assign_a( ref );
// ref_const_ref_actor, assign_a( ref, value_ref );
//
// () operators: both
//
// See also ref_value_actor and ref_const_ref_actor for more details.
///////////////////////////////////////////////////////////////////////////
struct assign_action
{
template<
typename T,
typename ValueT
>
void act(T& ref_, ValueT const& value_) const
{
ref_ = value_;
}
template<
typename T,
typename IteratorT
>
void act(
T& ref_,
IteratorT const& first_,
IteratorT const& last_
) const
{
typedef T value_type;
#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
value_type value(first_,last_);
#else
value_type value;
std::copy(first_, last_, std::inserter(value, value.end()));
#endif
ref_ = value;
}
};
// Deprecated. Please use assign_a
template<typename T>
inline ref_value_actor<T,assign_action> assign(T& ref_)
{
return ref_value_actor<T,assign_action>(ref_);
}
template<typename T>
inline ref_value_actor<T,assign_action> assign_a(T& ref_)
{
return ref_value_actor<T,assign_action>(ref_);
}
template<
typename T,
typename ValueT
>
inline ref_const_ref_actor<T,ValueT,assign_action> assign_a(
T& ref_,
ValueT const& value_
)
{
return ref_const_ref_actor<T,ValueT,assign_action>(ref_,value_);
}
BOOST_SPIRIT_CLASSIC_NAMESPACE_END
}}
#endif
@@ -0,0 +1,133 @@
// 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_DIMENSION_LIST_HPP
#define BOOST_UNITS_DIMENSION_LIST_HPP
#include <boost/mpl/next.hpp>
#include <boost/mpl/deref.hpp>
#include <boost/mpl/push_front_fwd.hpp>
#include <boost/mpl/pop_front_fwd.hpp>
#include <boost/mpl/size_fwd.hpp>
#include <boost/mpl/begin_end_fwd.hpp>
#include <boost/mpl/front_fwd.hpp>
#include <boost/units/config.hpp>
namespace boost {
namespace units {
struct dimensionless_type;
namespace detail {
struct dimension_list_tag { };
} // namespace detail
template<class Item, class Next>
struct list
{
typedef detail::dimension_list_tag tag;
typedef list type;
typedef Item item;
typedef Next next;
typedef typename mpl::next<typename Next::size>::type size;
};
} // namespace units
namespace mpl {
// INTERNAL ONLY
template<>
struct size_impl<units::detail::dimension_list_tag>
{
template<class L> struct apply : public L::size { };
};
// INTERNAL ONLY
template<>
struct begin_impl<units::detail::dimension_list_tag>
{
template<class L>
struct apply
{
typedef L type;
};
};
// INTERNAL ONLY
template<>
struct end_impl<units::detail::dimension_list_tag>
{
template<class L>
struct apply
{
typedef units::dimensionless_type type;
};
};
// INTERNAL ONLY
template<>
struct push_front_impl<units::detail::dimension_list_tag>
{
template<class L, class T>
struct apply
{
typedef units::list<T, L> type;
};
};
// INTERNAL ONLY
template<>
struct pop_front_impl<units::detail::dimension_list_tag>
{
template<class L>
struct apply
{
typedef typename L::next type;
};
};
// INTERNAL ONLY
template<>
struct front_impl<units::detail::dimension_list_tag>
{
template<class L>
struct apply
{
typedef typename L::item type;
};
};
// INTERNAL ONLY
template<class Item, class Next>
struct deref<units::list<Item, Next> >
{
typedef Item type;
};
} // namespace mpl
} // namespace boost
#if BOOST_UNITS_HAS_BOOST_TYPEOF
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::list, 2)
#endif
#include <boost/units/dimensionless_type.hpp>
#endif // BOOST_UNITS_DIMENSION_LIST_HPP
@@ -0,0 +1,368 @@
// Copyright David Abrahams and Thomas Becker 2000-2006.
// Copyright Kohei Takahashi 2012-2014.
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_ZIP_ITERATOR_TMB_07_13_2003_HPP_
# define BOOST_ZIP_ITERATOR_TMB_07_13_2003_HPP_
#include <stddef.h>
#include <boost/iterator.hpp>
#include <boost/iterator/iterator_traits.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/iterator/iterator_adaptor.hpp> // for enable_if_convertible
#include <boost/iterator/iterator_categories.hpp>
#include <boost/iterator/minimum_category.hpp>
#include <utility> // for std::pair
#include <boost/fusion/adapted/boost_tuple.hpp> // for backward compatibility
#include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/mpl/at.hpp>
#include <boost/mpl/fold.hpp>
#include <boost/mpl/transform.hpp>
#include <boost/mpl/placeholders.hpp>
#include <boost/fusion/algorithm/iteration/for_each.hpp>
#include <boost/fusion/algorithm/transformation/transform.hpp>
#include <boost/fusion/sequence/convert.hpp>
#include <boost/fusion/sequence/intrinsic/at_c.hpp>
#include <boost/fusion/sequence/comparison/equal_to.hpp>
#include <boost/fusion/support/tag_of_fwd.hpp>
namespace boost {
namespace iterators {
// Zip iterator forward declaration for zip_iterator_base
template<typename IteratorTuple>
class zip_iterator;
namespace detail
{
// Functors to be used with tuple algorithms
//
template<typename DiffType>
class advance_iterator
{
public:
advance_iterator(DiffType step) : m_step(step) {}
template<typename Iterator>
void operator()(Iterator& it) const
{ it += m_step; }
private:
DiffType m_step;
};
//
struct increment_iterator
{
template<typename Iterator>
void operator()(Iterator& it) const
{ ++it; }
};
//
struct decrement_iterator
{
template<typename Iterator>
void operator()(Iterator& it) const
{ --it; }
};
//
struct dereference_iterator
{
template<typename>
struct result;
template<typename This, typename Iterator>
struct result<This(Iterator)>
{
typedef typename
remove_reference<typename remove_cv<Iterator>::type>::type
iterator;
typedef typename iterator_reference<iterator>::type type;
};
template<typename Iterator>
typename result<dereference_iterator(Iterator)>::type
operator()(Iterator const& it) const
{ return *it; }
};
// Metafunction to obtain the type of the tuple whose element types
// are the reference types of an iterator tuple.
//
template<typename IteratorTuple>
struct tuple_of_references
: mpl::transform<
IteratorTuple,
iterator_reference<mpl::_1>
>
{
};
// Specialization for std::pair
template<typename Iterator1, typename Iterator2>
struct tuple_of_references<std::pair<Iterator1, Iterator2> >
{
typedef std::pair<
typename iterator_reference<Iterator1>::type
, typename iterator_reference<Iterator2>::type
> type;
};
// Metafunction to obtain the minimal traversal tag in a tuple
// of iterators.
//
template<typename IteratorTuple>
struct minimum_traversal_category_in_iterator_tuple
{
typedef typename mpl::transform<
IteratorTuple
, pure_traversal_tag<iterator_traversal<> >
>::type tuple_of_traversal_tags;
typedef typename mpl::fold<
tuple_of_traversal_tags
, random_access_traversal_tag
, minimum_category<>
>::type type;
};
template<typename Iterator1, typename Iterator2>
struct minimum_traversal_category_in_iterator_tuple<std::pair<Iterator1, Iterator2> >
{
typedef typename pure_traversal_tag<
typename iterator_traversal<Iterator1>::type
>::type iterator1_traversal;
typedef typename pure_traversal_tag<
typename iterator_traversal<Iterator2>::type
>::type iterator2_traversal;
typedef typename minimum_category<
iterator1_traversal
, typename minimum_category<
iterator2_traversal
, random_access_traversal_tag
>::type
>::type type;
};
///////////////////////////////////////////////////////////////////
//
// Class zip_iterator_base
//
// Builds and exposes the iterator facade type from which the zip
// iterator will be derived.
//
template<typename IteratorTuple>
struct zip_iterator_base
{
private:
// Reference type is the type of the tuple obtained from the
// iterators' reference types.
typedef typename
detail::tuple_of_references<IteratorTuple>::type reference;
// Value type is the same as reference type.
typedef reference value_type;
// Difference type is the first iterator's difference type
typedef typename iterator_difference<
typename mpl::at_c<IteratorTuple, 0>::type
>::type difference_type;
// Traversal catetgory is the minimum traversal category in the
// iterator tuple.
typedef typename
detail::minimum_traversal_category_in_iterator_tuple<
IteratorTuple
>::type traversal_category;
public:
// The iterator facade type from which the zip iterator will
// be derived.
typedef iterator_facade<
zip_iterator<IteratorTuple>,
value_type,
traversal_category,
reference,
difference_type
> type;
};
template <>
struct zip_iterator_base<int>
{
typedef int type;
};
template <typename reference>
struct converter
{
template <typename Seq>
static reference call(Seq seq)
{
typedef typename fusion::traits::tag_of<reference>::type tag;
return fusion::convert<tag>(seq);
}
};
template <typename Reference1, typename Reference2>
struct converter<std::pair<Reference1, Reference2> >
{
typedef std::pair<Reference1, Reference2> reference;
template <typename Seq>
static reference call(Seq seq)
{
return reference(
fusion::at_c<0>(seq)
, fusion::at_c<1>(seq));
}
};
}
/////////////////////////////////////////////////////////////////////
//
// zip_iterator class definition
//
template<typename IteratorTuple>
class zip_iterator :
public detail::zip_iterator_base<IteratorTuple>::type
{
// Typedef super_t as our base class.
typedef typename
detail::zip_iterator_base<IteratorTuple>::type super_t;
// iterator_core_access is the iterator's best friend.
friend class iterator_core_access;
public:
// Construction
// ============
// Default constructor
zip_iterator() { }
// Constructor from iterator tuple
zip_iterator(IteratorTuple iterator_tuple)
: m_iterator_tuple(iterator_tuple)
{ }
// Copy constructor
template<typename OtherIteratorTuple>
zip_iterator(
const zip_iterator<OtherIteratorTuple>& other,
typename enable_if_convertible<
OtherIteratorTuple,
IteratorTuple
>::type* = 0
) : m_iterator_tuple(other.get_iterator_tuple())
{}
// Get method for the iterator tuple.
const IteratorTuple& get_iterator_tuple() const
{ return m_iterator_tuple; }
private:
// Implementation of Iterator Operations
// =====================================
// Dereferencing returns a tuple built from the dereferenced
// iterators in the iterator tuple.
typename super_t::reference dereference() const
{
typedef typename super_t::reference reference;
typedef detail::converter<reference> gen;
return gen::call(fusion::transform(
get_iterator_tuple(),
detail::dereference_iterator()));
}
// Two zip iterators are equal if all iterators in the iterator
// tuple are equal. NOTE: It should be possible to implement this
// as
//
// return get_iterator_tuple() == other.get_iterator_tuple();
//
// but equality of tuples currently (7/2003) does not compile
// under several compilers. No point in bringing in a bunch
// of #ifdefs here.
//
template<typename OtherIteratorTuple>
bool equal(const zip_iterator<OtherIteratorTuple>& other) const
{
return fusion::equal_to(
get_iterator_tuple(),
other.get_iterator_tuple());
}
// Advancing a zip iterator means to advance all iterators in the
// iterator tuple.
void advance(typename super_t::difference_type n)
{
fusion::for_each(
m_iterator_tuple,
detail::advance_iterator<BOOST_DEDUCED_TYPENAME super_t::difference_type>(n));
}
// Incrementing a zip iterator means to increment all iterators in
// the iterator tuple.
void increment()
{
fusion::for_each(
m_iterator_tuple,
detail::increment_iterator());
}
// Decrementing a zip iterator means to decrement all iterators in
// the iterator tuple.
void decrement()
{
fusion::for_each(
m_iterator_tuple,
detail::decrement_iterator());
}
// Distance is calculated using the first iterator in the tuple.
template<typename OtherIteratorTuple>
typename super_t::difference_type distance_to(
const zip_iterator<OtherIteratorTuple>& other
) const
{
return fusion::at_c<0>(other.get_iterator_tuple()) -
fusion::at_c<0>(this->get_iterator_tuple());
}
// Data Members
// ============
// The iterator tuple.
IteratorTuple m_iterator_tuple;
};
// Make function for zip iterator
//
template<typename IteratorTuple>
inline zip_iterator<IteratorTuple>
make_zip_iterator(IteratorTuple t)
{ return zip_iterator<IteratorTuple>(t); }
} // namespace iterators
using iterators::zip_iterator;
using iterators::make_zip_iterator;
} // namespace boost
#endif
@@ -0,0 +1,253 @@
// Copyright (C) 2015-2016 Andrzej Krzemienski.
//
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/optional for documentation.
//
// You are welcome to contact the author at:
// akrzemi1@gmail.com
#ifndef BOOST_OPTIONAL_DETAIL_OPTIONAL_REFERENCE_SPEC_AJK_03OCT2015_HPP
#define BOOST_OPTIONAL_DETAIL_OPTIONAL_REFERENCE_SPEC_AJK_03OCT2015_HPP
#ifdef BOOST_OPTIONAL_CONFIG_NO_PROPER_ASSIGN_FROM_CONST_INT
#include <boost/type_traits/is_integral.hpp>
#include <boost/type_traits/is_const.hpp>
#endif
# if 1
namespace boost {
namespace detail {
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
template <class From>
void prevent_binding_rvalue()
{
#ifndef BOOST_OPTIONAL_CONFIG_ALLOW_BINDING_TO_RVALUES
BOOST_STATIC_ASSERT_MSG(boost::is_lvalue_reference<From>::value,
"binding rvalue references to optional lvalue references is disallowed");
#endif
}
template <class T>
BOOST_DEDUCED_TYPENAME boost::remove_reference<T>::type& forward_reference(T&& r)
{
BOOST_STATIC_ASSERT_MSG(boost::is_lvalue_reference<T>::value,
"binding rvalue references to optional lvalue references is disallowed");
return boost::forward<T>(r);
}
#endif // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
template <class T>
struct is_const_integral
{
static const bool value = boost::is_const<T>::value && boost::is_integral<T>::value;
};
template <class T>
struct is_const_integral_bad_for_conversion
{
#if (!defined BOOST_OPTIONAL_CONFIG_ALLOW_BINDING_TO_RVALUES) && (defined BOOST_OPTIONAL_CONFIG_NO_PROPER_CONVERT_FROM_CONST_INT)
static const bool value = boost::is_const<T>::value && boost::is_integral<T>::value;
#else
static const bool value = false;
#endif
};
template <class From>
void prevent_assignment_from_false_const_integral()
{
#ifndef BOOST_OPTIONAL_CONFIG_ALLOW_BINDING_TO_RVALUES
#ifdef BOOST_OPTIONAL_CONFIG_NO_PROPER_ASSIGN_FROM_CONST_INT
// MSVC compiler without rvalue refernces: we need to disable the asignment from
// const integral lvalue reference, as it may be an invalid temporary
BOOST_STATIC_ASSERT_MSG(!is_const_integral<From>::value,
"binding const lvalue references to integral types is disabled in this compiler");
#endif
#endif
}
template <class T>
struct is_optional_
{
static const bool value = false;
};
template <class U>
struct is_optional_< ::boost::optional<U> >
{
static const bool value = true;
};
template <class T>
struct is_no_optional
{
static const bool value = !is_optional_<BOOST_DEDUCED_TYPENAME boost::decay<T>::type>::value;
};
template <class T, class U>
struct is_same_decayed
{
static const bool value = ::boost::is_same<T, BOOST_DEDUCED_TYPENAME ::boost::remove_reference<U>::type>::value
|| ::boost::is_same<T, const BOOST_DEDUCED_TYPENAME ::boost::remove_reference<U>::type>::value;
};
template <class T, class U>
struct no_unboxing_cond
{
static const bool value = is_no_optional<U>::value && !is_same_decayed<T, U>::value;
};
} // namespace detail
template <class T>
class optional<T&> : public optional_detail::optional_tag
{
T* ptr_;
public:
typedef T& value_type;
typedef T& reference_type;
typedef T& reference_const_type;
typedef T& rval_reference_type;
typedef T* pointer_type;
typedef T* pointer_const_type;
optional() BOOST_NOEXCEPT : ptr_() {}
optional(none_t) BOOST_NOEXCEPT : ptr_() {}
template <class U>
explicit optional(const optional<U&>& rhs) BOOST_NOEXCEPT : ptr_(rhs.get_ptr()) {}
optional(const optional& rhs) BOOST_NOEXCEPT : ptr_(rhs.get_ptr()) {}
// the following two implement a 'conditionally explicit' constructor: condition is a hack for buggy compilers with srewed conversion construction from const int
template <class U>
explicit optional(U& rhs, BOOST_DEDUCED_TYPENAME boost::enable_if_c<detail::is_same_decayed<T, U>::value && detail::is_const_integral_bad_for_conversion<U>::value>::type* = 0) BOOST_NOEXCEPT
: ptr_(boost::addressof(rhs)) {}
template <class U>
optional(U& rhs, BOOST_DEDUCED_TYPENAME boost::enable_if_c<detail::is_same_decayed<T, U>::value && !detail::is_const_integral_bad_for_conversion<U>::value>::type* = 0) BOOST_NOEXCEPT
: ptr_(boost::addressof(rhs)) {}
optional& operator=(const optional& rhs) BOOST_NOEXCEPT { ptr_ = rhs.get_ptr(); return *this; }
template <class U>
optional& operator=(const optional<U&>& rhs) BOOST_NOEXCEPT { ptr_ = rhs.get_ptr(); return *this; }
optional& operator=(none_t) BOOST_NOEXCEPT { ptr_ = 0; return *this; }
void swap(optional& rhs) BOOST_NOEXCEPT { std::swap(ptr_, rhs.ptr_); }
T& get() const { BOOST_ASSERT(ptr_); return *ptr_; }
T* get_ptr() const BOOST_NOEXCEPT { return ptr_; }
T* operator->() const { BOOST_ASSERT(ptr_); return ptr_; }
T& operator*() const { BOOST_ASSERT(ptr_); return *ptr_; }
T& value() const { return ptr_ ? *ptr_ : (throw_exception(bad_optional_access()), *ptr_); }
bool operator!() const BOOST_NOEXCEPT { return ptr_ == 0; }
BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
void reset() BOOST_NOEXCEPT { ptr_ = 0; }
bool is_initialized() const BOOST_NOEXCEPT { return ptr_ != 0; }
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
optional(T&& /* rhs */) BOOST_NOEXCEPT { detail::prevent_binding_rvalue<T&&>(); }
template <class R>
optional(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::no_unboxing_cond<T, R> >::type* = 0) BOOST_NOEXCEPT
: ptr_(boost::addressof(r)) { detail::prevent_binding_rvalue<R>(); }
template <class R>
optional(bool cond, R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R> >::type* = 0) BOOST_NOEXCEPT
: ptr_(cond ? boost::addressof(r) : 0) { detail::prevent_binding_rvalue<R>(); }
template <class R>
BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R>, optional<T&>&>::type
operator=(R&& r) BOOST_NOEXCEPT { detail::prevent_binding_rvalue<R>(); ptr_ = boost::addressof(r); return *this; }
template <class R>
void emplace(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R> >::type* = 0) BOOST_NOEXCEPT
{ detail::prevent_binding_rvalue<R>(); ptr_ = boost::addressof(r); }
template <class R>
T& get_value_or(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R> >::type* = 0) const BOOST_NOEXCEPT
{ detail::prevent_binding_rvalue<R>(); return ptr_ ? *ptr_ : r; }
template <class R>
T& value_or(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R> >::type* = 0) const BOOST_NOEXCEPT
{ detail::prevent_binding_rvalue<R>(); return ptr_ ? *ptr_ : r; }
template <class R>
void reset(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R> >::type* = 0) BOOST_NOEXCEPT
{ detail::prevent_binding_rvalue<R>(); ptr_ = boost::addressof(r); }
template <class F>
T& value_or_eval(F f) const { return ptr_ ? *ptr_ : detail::forward_reference(f()); }
#else // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// the following two implement a 'conditionally explicit' constructor
template <class U>
explicit optional(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if_c<detail::no_unboxing_cond<T, U>::value && detail::is_const_integral_bad_for_conversion<U>::value >::type* = 0) BOOST_NOEXCEPT
: ptr_(boost::addressof(v)) { }
template <class U>
optional(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if_c<detail::no_unboxing_cond<T, U>::value && !detail::is_const_integral_bad_for_conversion<U>::value >::type* = 0) BOOST_NOEXCEPT
: ptr_(boost::addressof(v)) { }
template <class U>
optional(bool cond, U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) BOOST_NOEXCEPT : ptr_(cond ? boost::addressof(v) : 0) {}
template <class U>
BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U>, optional<T&>&>::type
operator=(U& v) BOOST_NOEXCEPT
{
detail::prevent_assignment_from_false_const_integral<U>();
ptr_ = boost::addressof(v); return *this;
}
template <class U>
void emplace(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) BOOST_NOEXCEPT
{ ptr_ = boost::addressof(v); }
template <class U>
T& get_value_or(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) const BOOST_NOEXCEPT
{ return ptr_ ? *ptr_ : v; }
template <class U>
T& value_or(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) const BOOST_NOEXCEPT
{ return ptr_ ? *ptr_ : v; }
template <class U>
void reset(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) BOOST_NOEXCEPT
{ ptr_ = boost::addressof(v); }
template <class F>
T& value_or_eval(F f) const { return ptr_ ? *ptr_ : f(); }
#endif // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
};
template <class T>
void swap ( optional<T&>& x, optional<T&>& y) BOOST_NOEXCEPT
{
x.swap(y);
}
} // namespace boost
#endif // 1/0
#endif // header guard
@@ -0,0 +1,116 @@
#ifndef BOOST_SERIALIZATION_EXTENDED_TYPE_INFO_HPP
#define BOOST_SERIALIZATION_EXTENDED_TYPE_INFO_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// extended_type_info.hpp: interface for portable version of type_info
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
// for now, extended type info is part of the serialization libraries
// this could change in the future.
#include <cstdarg>
#include <boost/assert.hpp>
#include <cstddef> // NULL
#include <boost/config.hpp>
#include <boost/noncopyable.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/serialization/config.hpp>
#include <boost/config/abi_prefix.hpp> // must be the last header
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4251 4231 4660 4275)
#endif
#define BOOST_SERIALIZATION_MAX_KEY_SIZE 128
namespace boost {
namespace serialization {
namespace void_cast_detail{
class void_caster;
}
class BOOST_SYMBOL_VISIBLE extended_type_info :
private boost::noncopyable
{
private:
friend class boost::serialization::void_cast_detail::void_caster;
// used to uniquely identify the type of class derived from this one
// so that different derivations of this class can be simultaneously
// included in implementation of sets and maps.
const unsigned int m_type_info_key;
virtual bool is_less_than(const extended_type_info & /*rhs*/) const = 0;
virtual bool is_equal(const extended_type_info & /*rhs*/) const = 0;
const char * m_key;
protected:
BOOST_SERIALIZATION_DECL void key_unregister() const;
BOOST_SERIALIZATION_DECL void key_register() const;
// this class can't be used as is. It's just the
// common functionality for all type_info replacement
// systems. Hence, make these protected
BOOST_SERIALIZATION_DECL extended_type_info(
const unsigned int type_info_key,
const char * key
);
virtual BOOST_SERIALIZATION_DECL ~extended_type_info();
public:
const char * get_key() const {
return m_key;
}
virtual const char * get_debug_info() const = 0;
BOOST_SERIALIZATION_DECL bool operator<(const extended_type_info &rhs) const;
BOOST_SERIALIZATION_DECL bool operator==(const extended_type_info &rhs) const;
bool operator!=(const extended_type_info &rhs) const {
return !(operator==(rhs));
}
// note explicit "export" of static function to work around
// gcc 4.5 mingw error
static BOOST_SERIALIZATION_DECL const extended_type_info *
find(const char *key);
// for plugins
virtual void * construct(unsigned int /*count*/ = 0, ...) const = 0;
virtual void destroy(void const * const /*p*/) const = 0;
};
template<class T>
struct guid_defined : boost::mpl::false_ {};
namespace ext {
template <typename T>
struct guid_impl
{
static inline const char * call()
{
return NULL;
}
};
}
template<class T>
inline const char * guid(){
return ext::guid_impl<T>::call();
}
} // namespace serialization
} // namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#include <boost/config/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif // BOOST_SERIALIZATION_EXTENDED_TYPE_INFO_HPP
@@ -0,0 +1,133 @@
//---------------------------------------------------------------------------//
// Copyright (c) 2014 Roshan <thisisroshansmail@gmail.com>
//
// Distributed under the Boost Software License, Version 1.0
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
// See http://boostorg.github.com/compute for more information.
//---------------------------------------------------------------------------//
#ifndef BOOST_COMPUTE_ALGORITHM_DETAIL_BINARY_FIND_HPP
#define BOOST_COMPUTE_ALGORITHM_DETAIL_BINARY_FIND_HPP
#include <boost/compute/functional.hpp>
#include <boost/compute/algorithm/find_if.hpp>
#include <boost/compute/algorithm/transform.hpp>
#include <boost/compute/command_queue.hpp>
#include <boost/compute/detail/parameter_cache.hpp>
namespace boost {
namespace compute {
namespace detail{
///
/// \brief Binary find kernel class
///
/// Subclass of meta_kernel to perform single step in binary find.
///
template<class InputIterator, class UnaryPredicate>
class binary_find_kernel : public meta_kernel
{
public:
binary_find_kernel(InputIterator first,
InputIterator last,
UnaryPredicate predicate)
: meta_kernel("binary_find")
{
typedef typename std::iterator_traits<InputIterator>::value_type value_type;
m_index_arg = add_arg<uint_ *>(memory_object::global_memory, "index");
m_block_arg = add_arg<uint_>("block");
atomic_min<uint_> atomic_min_uint;
*this <<
"uint i = get_global_id(0) * block;\n" <<
decl<value_type>("value") << "=" << first[var<uint_>("i")] << ";\n" <<
"if(" << predicate(var<value_type>("value")) << ") {\n" <<
atomic_min_uint(var<uint_ *>("index"), var<uint_>("i")) << ";\n" <<
"}\n";
}
size_t m_index_arg;
size_t m_block_arg;
};
///
/// \brief Binary find algorithm
///
/// Finds the end of true values in the partitioned range [first, last).
/// \return Iterator pointing to end of true values
///
/// \param first Iterator pointing to start of range
/// \param last Iterator pointing to end of range
/// \param predicate Predicate according to which the range is partitioned
/// \param queue Queue on which to execute
///
template<class InputIterator, class UnaryPredicate>
inline InputIterator binary_find(InputIterator first,
InputIterator last,
UnaryPredicate predicate,
command_queue &queue = system::default_queue())
{
const device &device = queue.get_device();
boost::shared_ptr<parameter_cache> parameters =
detail::parameter_cache::get_global_cache(device);
const std::string cache_key = "__boost_binary_find";
size_t find_if_limit = 128;
size_t threads = parameters->get(cache_key, "tpb", 128);
size_t count = iterator_range_size(first, last);
InputIterator search_first = first;
InputIterator search_last = last;
scalar<uint_> index(queue.get_context());
// construct and compile binary_find kernel
binary_find_kernel<InputIterator, UnaryPredicate>
binary_find_kernel(search_first, search_last, predicate);
::boost::compute::kernel kernel = binary_find_kernel.compile(queue.get_context());
// set buffer for index
kernel.set_arg(binary_find_kernel.m_index_arg, index.get_buffer());
while(count > find_if_limit) {
index.write(static_cast<uint_>(count), queue);
// set block and run binary_find kernel
uint_ block = static_cast<uint_>((count - 1)/(threads - 1));
kernel.set_arg(binary_find_kernel.m_block_arg, block);
queue.enqueue_1d_range_kernel(kernel, 0, threads, 0);
size_t i = index.read(queue);
if(i == count) {
search_first = search_last - ((count - 1)%(threads - 1));
break;
} else {
search_last = search_first + i;
search_first = search_last - ((count - 1)/(threads - 1));
}
// Make sure that first and last stay within the input range
search_last = (std::min)(search_last, last);
search_last = (std::max)(search_last, first);
search_first = (std::max)(search_first, first);
search_first = (std::min)(search_first, last);
count = iterator_range_size(search_first, search_last);
}
return find_if(search_first, search_last, predicate, queue);
}
} // end detail namespace
} // end compute namespace
} // end boost namespace
#endif // BOOST_COMPUTE_ALGORITHM_DETAIL_BINARY_FIND_HPP
@@ -0,0 +1,49 @@
# /* Copyright (C) 2001
# * Housemarque Oy
# * http://www.housemarque.com
# *
# * Distributed under the Boost Software License, Version 1.0. (See
# * accompanying file LICENSE_1_0.txt or copy at
# * http://www.boost.org/LICENSE_1_0.txt)
# */
#
# /* Revised by Paul Mensonides (2002) */
#
# /* See http://www.boost.org for most recent version. */
#
# ifndef BOOST_PREPROCESSOR_LIST_FOR_EACH_HPP
# define BOOST_PREPROCESSOR_LIST_FOR_EACH_HPP
#
# include <boost/preprocessor/config/config.hpp>
# include <boost/preprocessor/list/for_each_i.hpp>
# include <boost/preprocessor/tuple/elem.hpp>
# include <boost/preprocessor/tuple/rem.hpp>
#
# /* BOOST_PP_LIST_FOR_EACH */
#
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
# define BOOST_PP_LIST_FOR_EACH(macro, data, list) BOOST_PP_LIST_FOR_EACH_I(BOOST_PP_LIST_FOR_EACH_O, (macro, data), list)
# else
# define BOOST_PP_LIST_FOR_EACH(macro, data, list) BOOST_PP_LIST_FOR_EACH_X(macro, data, list)
# define BOOST_PP_LIST_FOR_EACH_X(macro, data, list) BOOST_PP_LIST_FOR_EACH_I(BOOST_PP_LIST_FOR_EACH_O, (macro, data), list)
# endif
#
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
# define BOOST_PP_LIST_FOR_EACH_O(r, md, i, elem) BOOST_PP_LIST_FOR_EACH_O_D(r, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md), elem)
# else
# define BOOST_PP_LIST_FOR_EACH_O(r, md, i, elem) BOOST_PP_LIST_FOR_EACH_O_I(r, BOOST_PP_TUPLE_REM_2 md, elem)
# define BOOST_PP_LIST_FOR_EACH_O_I(r, im, elem) BOOST_PP_LIST_FOR_EACH_O_D(r, im, elem)
# endif
#
# define BOOST_PP_LIST_FOR_EACH_O_D(r, m, d, elem) m(r, d, elem)
#
# /* BOOST_PP_LIST_FOR_EACH_R */
#
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
# define BOOST_PP_LIST_FOR_EACH_R(r, macro, data, list) BOOST_PP_LIST_FOR_EACH_I_R(r, BOOST_PP_LIST_FOR_EACH_O, (macro, data), list)
# else
# define BOOST_PP_LIST_FOR_EACH_R(r, macro, data, list) BOOST_PP_LIST_FOR_EACH_R_X(r, macro, data, list)
# define BOOST_PP_LIST_FOR_EACH_R_X(r, macro, data, list) BOOST_PP_LIST_FOR_EACH_I_R(r, BOOST_PP_LIST_FOR_EACH_O, (macro, data), list)
# endif
#
# endif
@@ -0,0 +1,597 @@
///////////////////////////////////////////////////////////////////////////////
/// \file callable_eval.hpp
/// Contains specializations of the callable_eval\<\> 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)
namespace detail
{
template<typename Expr, typename Context>
struct is_expr_handled<Expr, Context, 1>
{
static callable_context_wrapper<Context> &sctx_;
static Expr &sexpr_;
static typename Expr::proto_tag &stag_;
static const bool value =
sizeof(yes_type) ==
sizeof(
detail::check_is_expr_handled(
(sctx_(
stag_
, proto::child_c< 0>( sexpr_)
), 0)
)
);
typedef mpl::bool_<value> type;
};
}
namespace context
{
template<typename Expr, typename Context>
struct callable_eval<Expr, Context, 1>
{
typedef typename proto::result_of::child_c< Expr const &, 0>::type child0;
typedef
typename BOOST_PROTO_RESULT_OF<
Context(
typename Expr::proto_tag
, child0
)
>::type
result_type;
result_type operator ()(Expr &expr, Context &context) const
{
return context(
typename Expr::proto_tag()
, proto::child_c< 0>( expr)
);
}
};
}
namespace detail
{
template<typename Expr, typename Context>
struct is_expr_handled<Expr, Context, 2>
{
static callable_context_wrapper<Context> &sctx_;
static Expr &sexpr_;
static typename Expr::proto_tag &stag_;
static const bool value =
sizeof(yes_type) ==
sizeof(
detail::check_is_expr_handled(
(sctx_(
stag_
, proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_)
), 0)
)
);
typedef mpl::bool_<value> type;
};
}
namespace context
{
template<typename Expr, typename Context>
struct callable_eval<Expr, Context, 2>
{
typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1;
typedef
typename BOOST_PROTO_RESULT_OF<
Context(
typename Expr::proto_tag
, child0 , child1
)
>::type
result_type;
result_type operator ()(Expr &expr, Context &context) const
{
return context(
typename Expr::proto_tag()
, proto::child_c< 0>( expr) , proto::child_c< 1>( expr)
);
}
};
}
namespace detail
{
template<typename Expr, typename Context>
struct is_expr_handled<Expr, Context, 3>
{
static callable_context_wrapper<Context> &sctx_;
static Expr &sexpr_;
static typename Expr::proto_tag &stag_;
static const bool value =
sizeof(yes_type) ==
sizeof(
detail::check_is_expr_handled(
(sctx_(
stag_
, proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_)
), 0)
)
);
typedef mpl::bool_<value> type;
};
}
namespace context
{
template<typename Expr, typename Context>
struct callable_eval<Expr, Context, 3>
{
typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2;
typedef
typename BOOST_PROTO_RESULT_OF<
Context(
typename Expr::proto_tag
, child0 , child1 , child2
)
>::type
result_type;
result_type operator ()(Expr &expr, Context &context) const
{
return context(
typename Expr::proto_tag()
, proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr)
);
}
};
}
namespace detail
{
template<typename Expr, typename Context>
struct is_expr_handled<Expr, Context, 4>
{
static callable_context_wrapper<Context> &sctx_;
static Expr &sexpr_;
static typename Expr::proto_tag &stag_;
static const bool value =
sizeof(yes_type) ==
sizeof(
detail::check_is_expr_handled(
(sctx_(
stag_
, proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_)
), 0)
)
);
typedef mpl::bool_<value> type;
};
}
namespace context
{
template<typename Expr, typename Context>
struct callable_eval<Expr, Context, 4>
{
typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3;
typedef
typename BOOST_PROTO_RESULT_OF<
Context(
typename Expr::proto_tag
, child0 , child1 , child2 , child3
)
>::type
result_type;
result_type operator ()(Expr &expr, Context &context) const
{
return context(
typename Expr::proto_tag()
, proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr)
);
}
};
}
namespace detail
{
template<typename Expr, typename Context>
struct is_expr_handled<Expr, Context, 5>
{
static callable_context_wrapper<Context> &sctx_;
static Expr &sexpr_;
static typename Expr::proto_tag &stag_;
static const bool value =
sizeof(yes_type) ==
sizeof(
detail::check_is_expr_handled(
(sctx_(
stag_
, proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_)
), 0)
)
);
typedef mpl::bool_<value> type;
};
}
namespace context
{
template<typename Expr, typename Context>
struct callable_eval<Expr, Context, 5>
{
typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4;
typedef
typename BOOST_PROTO_RESULT_OF<
Context(
typename Expr::proto_tag
, child0 , child1 , child2 , child3 , child4
)
>::type
result_type;
result_type operator ()(Expr &expr, Context &context) const
{
return context(
typename Expr::proto_tag()
, proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr)
);
}
};
}
namespace detail
{
template<typename Expr, typename Context>
struct is_expr_handled<Expr, Context, 6>
{
static callable_context_wrapper<Context> &sctx_;
static Expr &sexpr_;
static typename Expr::proto_tag &stag_;
static const bool value =
sizeof(yes_type) ==
sizeof(
detail::check_is_expr_handled(
(sctx_(
stag_
, proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_)
), 0)
)
);
typedef mpl::bool_<value> type;
};
}
namespace context
{
template<typename Expr, typename Context>
struct callable_eval<Expr, Context, 6>
{
typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5;
typedef
typename BOOST_PROTO_RESULT_OF<
Context(
typename Expr::proto_tag
, child0 , child1 , child2 , child3 , child4 , child5
)
>::type
result_type;
result_type operator ()(Expr &expr, Context &context) const
{
return context(
typename Expr::proto_tag()
, proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr)
);
}
};
}
namespace detail
{
template<typename Expr, typename Context>
struct is_expr_handled<Expr, Context, 7>
{
static callable_context_wrapper<Context> &sctx_;
static Expr &sexpr_;
static typename Expr::proto_tag &stag_;
static const bool value =
sizeof(yes_type) ==
sizeof(
detail::check_is_expr_handled(
(sctx_(
stag_
, proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_) , proto::child_c< 6>( sexpr_)
), 0)
)
);
typedef mpl::bool_<value> type;
};
}
namespace context
{
template<typename Expr, typename Context>
struct callable_eval<Expr, Context, 7>
{
typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5; typedef typename proto::result_of::child_c< Expr const &, 6>::type child6;
typedef
typename BOOST_PROTO_RESULT_OF<
Context(
typename Expr::proto_tag
, child0 , child1 , child2 , child3 , child4 , child5 , child6
)
>::type
result_type;
result_type operator ()(Expr &expr, Context &context) const
{
return context(
typename Expr::proto_tag()
, proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr) , proto::child_c< 6>( expr)
);
}
};
}
namespace detail
{
template<typename Expr, typename Context>
struct is_expr_handled<Expr, Context, 8>
{
static callable_context_wrapper<Context> &sctx_;
static Expr &sexpr_;
static typename Expr::proto_tag &stag_;
static const bool value =
sizeof(yes_type) ==
sizeof(
detail::check_is_expr_handled(
(sctx_(
stag_
, proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_) , proto::child_c< 6>( sexpr_) , proto::child_c< 7>( sexpr_)
), 0)
)
);
typedef mpl::bool_<value> type;
};
}
namespace context
{
template<typename Expr, typename Context>
struct callable_eval<Expr, Context, 8>
{
typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5; typedef typename proto::result_of::child_c< Expr const &, 6>::type child6; typedef typename proto::result_of::child_c< Expr const &, 7>::type child7;
typedef
typename BOOST_PROTO_RESULT_OF<
Context(
typename Expr::proto_tag
, child0 , child1 , child2 , child3 , child4 , child5 , child6 , child7
)
>::type
result_type;
result_type operator ()(Expr &expr, Context &context) const
{
return context(
typename Expr::proto_tag()
, proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr) , proto::child_c< 6>( expr) , proto::child_c< 7>( expr)
);
}
};
}
namespace detail
{
template<typename Expr, typename Context>
struct is_expr_handled<Expr, Context, 9>
{
static callable_context_wrapper<Context> &sctx_;
static Expr &sexpr_;
static typename Expr::proto_tag &stag_;
static const bool value =
sizeof(yes_type) ==
sizeof(
detail::check_is_expr_handled(
(sctx_(
stag_
, proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_) , proto::child_c< 6>( sexpr_) , proto::child_c< 7>( sexpr_) , proto::child_c< 8>( sexpr_)
), 0)
)
);
typedef mpl::bool_<value> type;
};
}
namespace context
{
template<typename Expr, typename Context>
struct callable_eval<Expr, Context, 9>
{
typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5; typedef typename proto::result_of::child_c< Expr const &, 6>::type child6; typedef typename proto::result_of::child_c< Expr const &, 7>::type child7; typedef typename proto::result_of::child_c< Expr const &, 8>::type child8;
typedef
typename BOOST_PROTO_RESULT_OF<
Context(
typename Expr::proto_tag
, child0 , child1 , child2 , child3 , child4 , child5 , child6 , child7 , child8
)
>::type
result_type;
result_type operator ()(Expr &expr, Context &context) const
{
return context(
typename Expr::proto_tag()
, proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr) , proto::child_c< 6>( expr) , proto::child_c< 7>( expr) , proto::child_c< 8>( expr)
);
}
};
}
namespace detail
{
template<typename Expr, typename Context>
struct is_expr_handled<Expr, Context, 10>
{
static callable_context_wrapper<Context> &sctx_;
static Expr &sexpr_;
static typename Expr::proto_tag &stag_;
static const bool value =
sizeof(yes_type) ==
sizeof(
detail::check_is_expr_handled(
(sctx_(
stag_
, proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_) , proto::child_c< 6>( sexpr_) , proto::child_c< 7>( sexpr_) , proto::child_c< 8>( sexpr_) , proto::child_c< 9>( sexpr_)
), 0)
)
);
typedef mpl::bool_<value> type;
};
}
namespace context
{
template<typename Expr, typename Context>
struct callable_eval<Expr, Context, 10>
{
typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5; typedef typename proto::result_of::child_c< Expr const &, 6>::type child6; typedef typename proto::result_of::child_c< Expr const &, 7>::type child7; typedef typename proto::result_of::child_c< Expr const &, 8>::type child8; typedef typename proto::result_of::child_c< Expr const &, 9>::type child9;
typedef
typename BOOST_PROTO_RESULT_OF<
Context(
typename Expr::proto_tag
, child0 , child1 , child2 , child3 , child4 , child5 , child6 , child7 , child8 , child9
)
>::type
result_type;
result_type operator ()(Expr &expr, Context &context) const
{
return context(
typename Expr::proto_tag()
, proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr) , proto::child_c< 6>( expr) , proto::child_c< 7>( expr) , proto::child_c< 8>( expr) , proto::child_c< 9>( expr)
);
}
};
}
@@ -0,0 +1,55 @@
subroutine genft8(msg,msgsent,msgbits,itone)
! Encode an FT8 message, producing array itone().
use crc
use packjt
include 'ft8_params.f90'
character*22 msg,msgsent
character*87 cbits
! logical checksumok
integer*4 i4Msg6BitWords(12) !72-bit message as 6-bit words
integer*1 msgbits(KK),codeword(3*ND)
integer*1, target:: i1Msg8BitBytes(11)
integer itone(NN)
integer icos7(0:6)
data icos7/2,5,6,0,4,1,3/ !Costas 7x7 tone pattern
call packmsg(msg,i4Msg6BitWords,itype) !Pack into 12 6-bit bytes
call unpackmsg(i4Msg6BitWords,msgsent) !Unpack to get msgsent
i3bit=0 !### temporary ###
write(cbits,1000) i4Msg6BitWords,32*i3bit
1000 format(12b6.6,b8.8)
read(cbits,1001) i1Msg8BitBytes(1:10)
1001 format(10b8)
i1Msg8BitBytes(10)=iand(i1Msg8BitBytes(10),128+64+32)
i1Msg8BitBytes(11)=0
icrc12=crc12(c_loc(i1Msg8BitBytes),11)
! For reference, here's how to check the CRC
! i1Msg8BitBytes(10)=icrc12/256
! i1Msg8BitBytes(11)=iand (icrc12,255)
! checksumok = crc12_check(c_loc (i1Msg8BitBytes), 11)
! if( checksumok ) write(*,*) 'Good checksum'
write(cbits,1003) i4Msg6BitWords,i3bit,icrc12
1003 format(12b6.6,b3.3,b12.12)
read(cbits,1004) msgbits
1004 format(87i1)
call encode174(msgbits,codeword) !Encode the test message
! Message structure: S7 D29 S7 D29 S7
itone(1:7)=icos7
itone(36+1:36+7)=icos7
itone(NN-6:NN)=icos7
k=7
do j=1,ND
i=3*j -2
k=k+1
if(j.eq.30) k=k+7
itone(k)=codeword(i)*4 + codeword(i+1)*2 + codeword(i+2)
enddo
return
end subroutine genft8
@@ -0,0 +1,118 @@
//---------------------------------------------------------------------------//
// Copyright (c) 2013-2014 Kyle Lutz <kyle.r.lutz@gmail.com>
//
// Distributed under the Boost Software License, Version 1.0
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
// See http://boostorg.github.com/compute for more information.
//---------------------------------------------------------------------------//
#ifndef BOOST_COMPUTE_ALLOCATOR_BUFFER_ALLOCATOR_HPP
#define BOOST_COMPUTE_ALLOCATOR_BUFFER_ALLOCATOR_HPP
#include <boost/compute/buffer.hpp>
#include <boost/compute/config.hpp>
#include <boost/compute/context.hpp>
#include <boost/compute/detail/device_ptr.hpp>
namespace boost {
namespace compute {
/// \class buffer_allocator
/// \brief The buffer_allocator class allocates memory with \ref buffer objects
///
/// \see buffer
template<class T>
class buffer_allocator
{
public:
typedef T value_type;
typedef detail::device_ptr<T> pointer;
typedef const detail::device_ptr<T> const_pointer;
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
explicit buffer_allocator(const context &context)
: m_context(context),
m_mem_flags(buffer::read_write)
{
}
buffer_allocator(const buffer_allocator<T> &other)
: m_context(other.m_context),
m_mem_flags(other.m_mem_flags)
{
}
buffer_allocator<T>& operator=(const buffer_allocator<T> &other)
{
if(this != &other){
m_context = other.m_context;
m_mem_flags = other.m_mem_flags;
}
return *this;
}
#ifndef BOOST_COMPUTE_NO_RVALUE_REFERENCES
buffer_allocator(buffer_allocator<T>&& other) BOOST_NOEXCEPT
: m_context(std::move(other.m_context)),
m_mem_flags(other.m_mem_flags)
{
}
buffer_allocator<T>& operator=(buffer_allocator<T>&& other) BOOST_NOEXCEPT
{
m_context = std::move(other.m_context);
m_mem_flags = other.m_mem_flags;
return *this;
}
#endif // BOOST_COMPUTE_NO_RVALUE_REFERENCES
~buffer_allocator()
{
}
pointer allocate(size_type n)
{
buffer buf(m_context, n * sizeof(T), m_mem_flags);
clRetainMemObject(buf.get());
return detail::device_ptr<T>(buf);
}
void deallocate(pointer p, size_type n)
{
BOOST_ASSERT(p.get_buffer().get_context() == m_context);
(void) n;
clReleaseMemObject(p.get_buffer().get());
}
size_type max_size() const
{
return m_context.get_device().max_memory_alloc_size() / sizeof(T);
}
context get_context() const
{
return m_context;
}
protected:
void set_mem_flags(cl_mem_flags flags)
{
m_mem_flags = flags;
}
private:
context m_context;
cl_mem_flags m_mem_flags;
};
} // end compute namespace
} // end boost namespace
#endif // BOOST_COMPUTE_ALLOCATOR_BUFFER_ALLOCATOR_HPP
@@ -0,0 +1,116 @@
// Copyright David Abrahams 2002.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef OBJECT_ATTRIBUTES_DWA2002615_HPP
# define OBJECT_ATTRIBUTES_DWA2002615_HPP
# include <boost/python/detail/prefix.hpp>
# include <boost/python/proxy.hpp>
# include <boost/python/object_core.hpp>
# include <boost/python/object_protocol.hpp>
namespace boost { namespace python { namespace api {
struct const_attribute_policies
{
typedef char const* key_type;
static object get(object const& target, char const* key);
static object get(object const& target, object const& key);
};
struct attribute_policies : const_attribute_policies
{
static object const& set(object const& target, char const* key, object const& value);
static void del(object const&target, char const* key);
};
struct const_objattribute_policies
{
typedef object const key_type;
static object get(object const& target, object const& key);
};
struct objattribute_policies : const_objattribute_policies
{
static object const& set(object const& target, object const& key, object const& value);
static void del(object const&target, object const& key);
};
//
// implementation
//
template <class U>
inline object_attribute object_operators<U>::attr(char const* name)
{
object_cref2 x = *static_cast<U*>(this);
return object_attribute(x, name);
}
template <class U>
inline const_object_attribute object_operators<U>::attr(char const* name) const
{
object_cref2 x = *static_cast<U const*>(this);
return const_object_attribute(x, name);
}
template <class U>
inline object_objattribute object_operators<U>::attr(object const& name)
{
object_cref2 x = *static_cast<U*>(this);
return object_objattribute(x, name);
}
template <class U>
inline const_object_objattribute object_operators<U>::attr(object const& name) const
{
object_cref2 x = *static_cast<U const*>(this);
return const_object_objattribute(x, name);
}
inline object const_attribute_policies::get(object const& target, char const* key)
{
return python::getattr(target, key);
}
inline object const_objattribute_policies::get(object const& target, object const& key)
{
return python::getattr(target, key);
}
inline object const& attribute_policies::set(
object const& target
, char const* key
, object const& value)
{
python::setattr(target, key, value);
return value;
}
inline object const& objattribute_policies::set(
object const& target
, object const& key
, object const& value)
{
python::setattr(target, key, value);
return value;
}
inline void attribute_policies::del(
object const& target
, char const* key)
{
python::delattr(target, key);
}
inline void objattribute_policies::del(
object const& target
, object const& key)
{
python::delattr(target, key);
}
}}} // namespace boost::python::api
#endif // OBJECT_ATTRIBUTES_DWA2002615_HPP
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

@@ -0,0 +1,32 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(BOOST_FUSION_IS_SEQUENCE_IMPL_31122005_1505)
#define BOOST_FUSION_IS_SEQUENCE_IMPL_31122005_1505
#include <boost/fusion/support/config.hpp>
#include <boost/mpl/bool.hpp>
namespace boost { namespace fusion
{
struct mpl_sequence_tag;
namespace extension
{
template<typename Tag>
struct is_sequence_impl;
template<>
struct is_sequence_impl<mpl_sequence_tag>
{
template<typename T>
struct apply : mpl::true_ {};
};
}
}}
#endif
File diff suppressed because one or more lines are too long
@@ -0,0 +1,145 @@
#ifndef BOOST_SERIALIZATION_ACCESS_HPP
#define BOOST_SERIALIZATION_ACCESS_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// access.hpp: interface for serialization system.
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <boost/config.hpp>
namespace boost {
namespace archive {
namespace detail {
template<class Archive, class T>
class iserializer;
template<class Archive, class T>
class oserializer;
} // namespace detail
} // namespace archive
namespace serialization {
// forward declarations
template<class Archive, class T>
inline void serialize_adl(Archive &, T &, const unsigned int);
namespace detail {
template<class Archive, class T>
struct member_saver;
template<class Archive, class T>
struct member_loader;
} // namespace detail
// use an "accessor class so that we can use:
// "friend class boost::serialization::access;"
// in any serialized class to permit clean, safe access to private class members
// by the serialization system
class access {
public:
// grant access to "real" serialization defaults
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
public:
#else
template<class Archive, class T>
friend struct detail::member_saver;
template<class Archive, class T>
friend struct detail::member_loader;
template<class Archive, class T>
friend class archive::detail::iserializer;
template<class Archive, class T>
friend class archive::detail::oserializer;
template<class Archive, class T>
friend inline void serialize(
Archive & ar,
T & t,
const unsigned int file_version
);
template<class Archive, class T>
friend inline void save_construct_data(
Archive & ar,
const T * t,
const unsigned int file_version
);
template<class Archive, class T>
friend inline void load_construct_data(
Archive & ar,
T * t,
const unsigned int file_version
);
#endif
// pass calls to users's class implementation
template<class Archive, class T>
static void member_save(
Archive & ar,
//const T & t,
T & t,
const unsigned int file_version
){
t.save(ar, file_version);
}
template<class Archive, class T>
static void member_load(
Archive & ar,
T & t,
const unsigned int file_version
){
t.load(ar, file_version);
}
template<class Archive, class T>
static void serialize(
Archive & ar,
T & t,
const unsigned int file_version
){
// note: if you get a compile time error here with a
// message something like:
// cannot convert parameter 1 from <file type 1> to <file type 2 &>
// a likely possible cause is that the class T contains a
// serialize function - but that serialize function isn't
// a template and corresponds to a file type different than
// the class Archive. To resolve this, don't include an
// archive type other than that for which the serialization
// function is defined!!!
t.serialize(ar, file_version);
}
template<class T>
static void destroy( const T * t) // const appropriate here?
{
// the const business is an MSVC 6.0 hack that should be
// benign on everything else
delete const_cast<T *>(t);
}
template<class T>
static void construct(T * t){
// default is inplace invocation of default constructor
// Note the :: before the placement new. Required if the
// class doesn't have a class-specific placement new defined.
::new(t)T;
}
template<class T, class U>
static T & cast_reference(U & u){
return static_cast<T &>(u);
}
template<class T, class U>
static T * cast_pointer(U * u){
return static_cast<T *>(u);
}
};
} // namespace serialization
} // namespace boost
#endif // BOOST_SERIALIZATION_ACCESS_HPP
@@ -0,0 +1,95 @@
/*=============================================================================
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(BOOST_FUSION_SUPPORT_UNUSED_20070305_1038)
#define BOOST_FUSION_SUPPORT_UNUSED_20070305_1038
#include <boost/fusion/support/config.hpp>
#include <iosfwd>
#include <boost/config.hpp>
#if defined(BOOST_MSVC)
# pragma warning(push)
# pragma warning(disable: 4522) // multiple assignment operators specified warning
#endif
#define BOOST_FUSION_UNUSED_HAS_IO
namespace boost { namespace fusion
{
struct unused_type
{
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
unused_type() BOOST_NOEXCEPT
{
}
template <typename T>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
unused_type(T const&) BOOST_NOEXCEPT
{
}
template <typename T>
BOOST_FUSION_CONSTEXPR_THIS BOOST_FUSION_GPU_ENABLED
unused_type const&
operator=(T const&) const BOOST_NOEXCEPT
{
return *this;
}
template <typename T>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
unused_type&
operator=(T const&) BOOST_NOEXCEPT
{
return *this;
}
BOOST_FUSION_CONSTEXPR_THIS BOOST_FUSION_GPU_ENABLED
unused_type const&
operator=(unused_type const&) const BOOST_NOEXCEPT
{
return *this;
}
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
unused_type&
operator=(unused_type const&) BOOST_NOEXCEPT
{
return *this;
}
};
BOOST_CONSTEXPR_OR_CONST unused_type unused = unused_type();
namespace detail
{
struct unused_only
{
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
unused_only(unused_type const&) BOOST_NOEXCEPT {}
};
}
BOOST_CONSTEXPR
inline std::ostream& operator<<(std::ostream& out, detail::unused_only const&) BOOST_NOEXCEPT
{
return out;
}
BOOST_CONSTEXPR
inline std::istream& operator>>(std::istream& in, unused_type&) BOOST_NOEXCEPT
{
return in;
}
}}
#if defined(BOOST_MSVC)
# pragma warning(pop)
#endif
#endif
@@ -0,0 +1,166 @@
// Copyright Aleksey Gurtovoy 2001-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/inherit.hpp" header
// -- DO NOT modify by hand!
namespace boost { namespace mpl {
namespace aux {
template< bool C1, bool C2 >
struct inherit2_impl
{
template< typename Derived, typename T1, typename T2 > struct result_
: T1, T2
{
typedef Derived type_;
};
};
template<>
struct inherit2_impl< false,true >
{
template< typename Derived, typename T1, typename T2 > struct result_
: T1
{
typedef T1 type_;
};
};
template<>
struct inherit2_impl< true,false >
{
template< typename Derived, typename T1, typename T2 > struct result_
: T2
{
typedef T2 type_;
};
};
template<>
struct inherit2_impl< true,true >
{
template< typename Derived, typename T1, typename T2 > struct result_
{
typedef T1 type_;
};
};
} // namespace aux
template<
typename BOOST_MPL_AUX_NA_PARAM(T1)
, typename BOOST_MPL_AUX_NA_PARAM(T2)
>
struct inherit2
: aux::inherit2_impl<
is_empty_base<T1>::value
, is_empty_base<T2>::value
>::template result_< inherit2< T1,T2 >,T1, T2 >
{
typedef typename inherit2::type_ type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2))
};
BOOST_MPL_AUX_NA_SPEC(2, inherit2)
template<
typename T1 = na, typename T2 = na, typename T3 = na
>
struct inherit3
: inherit2<
typename inherit2<
T1, T2
>::type
, T3
>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(
3
, inherit3
, ( T1, T2, T3)
)
};
BOOST_MPL_AUX_NA_SPEC(3, inherit3)
template<
typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
>
struct inherit4
: inherit2<
typename inherit3<
T1, T2, T3
>::type
, T4
>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(
4
, inherit4
, ( T1, T2, T3, T4)
)
};
BOOST_MPL_AUX_NA_SPEC(4, inherit4)
template<
typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
, typename T5 = na
>
struct inherit5
: inherit2<
typename inherit4<
T1, T2, T3, T4
>::type
, T5
>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(
5
, inherit5
, ( T1, T2, T3, T4, T5)
)
};
BOOST_MPL_AUX_NA_SPEC(5, inherit5)
/// primary template
template<
typename T1 = empty_base, typename T2 = empty_base
, typename T3 = empty_base, typename T4 = empty_base
, typename T5 = empty_base
>
struct inherit
: inherit5< T1,T2,T3,T4,T5 >
{
};
template<>
struct inherit< na,na,na,na,na >
{
template<
typename T1 = empty_base, typename T2 = empty_base
, typename T3 = empty_base, typename T4 = empty_base
, typename T5 = empty_base
>
struct apply
: inherit< T1,T2,T3,T4,T5 >
{
};
};
BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit)
BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit)
BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit)
}}
@@ -0,0 +1,37 @@
/*
*
* Copyright (c) 1998-2002
* John Maddock
*
* 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)
*
*/
/*
* LOCATION: see http://www.boost.org/libs/regex for documentation.
* FILE regex.cpp
* VERSION see <boost/version.hpp>
* DESCRIPTION: Declares boost::basic_regex<> and associated
* functions and classes. This header is the main
* entry point for the template regex code.
*/
/* start with C compatibility API */
#ifndef BOOST_RE_REGEX_HPP
#define BOOST_RE_REGEX_HPP
#ifndef BOOST_REGEX_CONFIG_HPP
#include <boost/regex/config.hpp>
#endif
#include <boost/regex/v4/regex.hpp>
#endif // include
@@ -0,0 +1,145 @@
/*
#Sov Mil Order of Malta: 15: 28: EU: 41.90: -12.43: -1.0: 1A:
#1A;
#Spratly Islands: 26: 50: AS: 9.88: -114.23: -8.0: 1S:
#1S,9M0,BV9S;
#Monaco: 14: 27: EU: 43.73: -7.40: -1.0: 3A:
#3A;
#Heard Island: 39: 68: AF: -53.08: -73.50: -5.0: VK0H:
#=VK0IR;
#Macquarie Island: 30: 60: OC: -54.60: -158.88: -10.0: VK0M:
#=VK0KEV;
#Cocos-Keeling: 29: 54: OC: -12.15: -96.82: -6.5: VK9C:
#AX9C,AX9Y,VH9C,VH9Y,VI9C,VI9Y,VJ9C,VJ9Y,VK9C,VK9Y,VL9C,VL9Y,VM9C,VM9Y,
#VN9C,VN9Y,VZ9C,VZ9Y,=VK9AA;
*/
#include "countrydat.h"
#include <QFile>
#include <QTextStream>
void CountryDat::init(const QString filename)
{
_filename = filename;
_data.clear();
}
QString CountryDat::_extractName(const QString line) const
{
int s1 = line.indexOf(':');
if (s1>=0)
{
QString name = line.mid(0,s1);
return name;
}
return "";
}
void CountryDat::_removeBrackets(QString &line, const QString a, const QString b) const
{
int s1 = line.indexOf(a);
while (s1 >= 0)
{
int s2 = line.indexOf(b);
line = line.mid(0,s1) + line.mid(s2+1,-1);
s1 = line.indexOf(a);
}
}
QStringList CountryDat::_extractPrefix(QString &line, bool &more) const
{
line = line.remove(" \n");
line = line.replace("=","");
line = line.replace(" ","");
_removeBrackets(line,"(",")");
_removeBrackets(line,"[","]");
_removeBrackets(line,"<",">");
_removeBrackets(line,"~","~");
int s1 = line.indexOf(';');
more = true;
if (s1 >= 0)
{
line = line.mid(0,s1);
more = false;
}
QStringList r = line.split(',');
return r;
}
void CountryDat::load()
{
_data.clear();
_countryNames.clear(); //used by countriesWorked
QFile inputFile(_filename);
if (inputFile.open(QIODevice::ReadOnly))
{
QTextStream in(&inputFile);
while ( !in.atEnd() )
{
QString line1 = in.readLine();
if ( !in.atEnd() )
{
QString line2 = in.readLine();
QString name = _extractName(line1);
if (name.length()>0)
{
_countryNames << name;
bool more = true;
QStringList prefixs;
while (more)
{
QStringList p = _extractPrefix(line2,more);
prefixs += p;
if (more)
line2 = in.readLine();
}
QString p;
foreach(p,prefixs)
{
if (p.length() > 0)
_data.insert(p,name);
}
}
}
}
inputFile.close();
}
}
// return country name else ""
QString CountryDat::find(QString prefix) const
{
prefix = prefix.toUpper ();
auto pf = prefix;
while (pf.size () >= 1)
{
if (_data.contains (pf))
{
QString country {_data.value (pf)};
//
// deal with special rules that cty.dat does not cope with
//
// KG4 2x1 and 2x3 calls that map to Gitmo are mainland US not Gitmo
if (prefix.startsWith ("KG4") && prefix.size () != 5)
{
country.replace ("Guantanamo Bay", "United States");
}
return country;
}
pf = pf.left (pf.size () - 1);
}
return QString {};
}
@@ -0,0 +1,48 @@
// (C) Copyright John Maddock 2007.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// This file is machine generated, do not edit by hand
// Polynomial evaluation using second order Horners rule
#ifndef BOOST_MATH_TOOLS_POLY_EVAL_2_HPP
#define BOOST_MATH_TOOLS_POLY_EVAL_2_HPP
namespace boost{ namespace math{ namespace tools{ namespace detail{
template <class T, class V>
inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*) BOOST_MATH_NOEXCEPT(V)
{
return static_cast<V>(0);
}
template <class T, class V>
inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*) BOOST_MATH_NOEXCEPT(V)
{
return static_cast<V>(a[0]);
}
template <class T, class V>
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*) BOOST_MATH_NOEXCEPT(V)
{
return static_cast<V>(a[1] * x + a[0]);
}
template <class T, class V>
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*) BOOST_MATH_NOEXCEPT(V)
{
return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
}
template <class T, class V>
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*) BOOST_MATH_NOEXCEPT(V)
{
return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
}
}}}} // namespaces
#endif // include guard
@@ -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_PLANE_ANGLE_HPP
#define BOOST_UNITS_SI_PLANE_ANGLE_HPP
#include <boost/units/systems/si/base.hpp>
namespace boost {
namespace units {
namespace si {
typedef unit<plane_angle_dimension,si::system> plane_angle;
BOOST_UNITS_STATIC_CONSTANT(radian,plane_angle);
BOOST_UNITS_STATIC_CONSTANT(radians,plane_angle);
} // namespace si
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_SI_PLANE_ANGLE_HPP
@@ -0,0 +1,131 @@
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_ARG_HPP_INCLUDED
#define BOOST_MPL_ARG_HPP_INCLUDED
// Copyright Peter Dimov 2001-2002
// Copyright Aleksey Gurtovoy 2001-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/arg_fwd.hpp>
# include <boost/mpl/aux_/na.hpp>
# include <boost/mpl/aux_/na_assert.hpp>
# include <boost/mpl/aux_/arity_spec.hpp>
# include <boost/mpl/aux_/arg_typedef.hpp>
#endif
#include <boost/mpl/aux_/config/static_constant.hpp>
#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 arg.hpp
# include <boost/mpl/aux_/include_preprocessed.hpp>
#else
# include <boost/mpl/limits/arity.hpp>
# include <boost/mpl/aux_/preprocessor/default_params.hpp>
# include <boost/mpl/aux_/preprocessor/params.hpp>
# include <boost/mpl/aux_/config/lambda.hpp>
# include <boost/mpl/aux_/config/dtp.hpp>
# include <boost/mpl/aux_/nttp_decl.hpp>
# include <boost/preprocessor/iterate.hpp>
# include <boost/preprocessor/inc.hpp>
# include <boost/preprocessor/cat.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
// local macro, #undef-ined at the end of the header
#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
# define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \
BOOST_MPL_PP_DEFAULT_PARAMS( \
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
, param \
, value \
) \
/**/
#else
# define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \
BOOST_MPL_PP_PARAMS( \
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
, param \
) \
/**/
#endif
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/arg.hpp>))
#include BOOST_PP_ITERATE()
# undef AUX778076_ARG_N_DEFAULT_PARAMS
BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int,arg)
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_ARG_HPP_INCLUDED
///// iteration
#else
#define i_ BOOST_PP_FRAME_ITERATION(1)
#if i_ > 0
template<> struct arg<i_>
{
BOOST_STATIC_CONSTANT(int, value = i_);
typedef arg<BOOST_PP_INC(i_)> next;
BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
template<
AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na)
>
struct apply
{
typedef BOOST_PP_CAT(U,i_) type;
BOOST_MPL_AUX_ASSERT_NOT_NA(type);
};
};
#else
template<> struct arg<-1>
{
BOOST_STATIC_CONSTANT(int, value = -1);
BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
template<
AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na)
>
struct apply
{
typedef U1 type;
BOOST_MPL_AUX_ASSERT_NOT_NA(type);
};
};
#endif // i_ > 0
#undef i_
#endif // BOOST_PP_IS_ITERATING
@@ -0,0 +1,54 @@
:doctype: manpage
:man source: AsciiDoc
:man version: {VERSION}
:man manual: WSJT-X Manual
= wsjtx(1)
== NAME
message_aggregator - Reference example UDP server
== SYNOPSIS
*message_aggregator*
== DESCRIPTION
*message_aggregator* does not serve any useful purpose other than to
demonstrate the UDP message features of *WSJT-X*. It is a small GUI
application that interacts with any running *WSJT-X* instances.
Developers writing add on applications may find the source code of
message_aggregator contained in the *WSJT-X* code repository
useful. The files NetworkMessage.hpp, MessageServer.hpp,
MessageClient.hpp and their associated implementations along with the
application source MessageAggregator.cpp should cover all the required
areas. All these files can be found at:
https://sourceforge.net/p/wsjt/wsjt/HEAD/tree/branches/wsjtx/
*message_aggregator* may also be used as a multi-cast UDP server which
allows multiple instances of *message_aggregator* to be run
concurrently, to do this simply use a suitable multi-cast group
address in *message_aggregator* and in *WSJT-X* in the
"*Settings->Reporting->UDP Server*" pane e.g. 239.255.0.1 or ff03::1
for a local scope group.
Note that on some systems it may be necessary to add a static
multi-cast route to the routing table before multi-cast traffic can be
routed to sockets on the same host as the sender.
== AUTHOR
Bill Somerville, G4WJS.
== COPYING
*message_aggregator* is Copyright (C) 2015 by William Somerville, G4WJS,
with contributions from additional authors. *message_aggregator* is Open Source
software, licensed under the GNU General Public License (GPLv3).
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
@@ -0,0 +1,171 @@
// (C) Copyright David Abrahams 2002.
// (C) Copyright Jeremy Siek 2002.
// (C) Copyright Thomas Witt 2002.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_TRANSFORM_ITERATOR_23022003THW_HPP
#define BOOST_TRANSFORM_ITERATOR_23022003THW_HPP
#include <boost/iterator.hpp>
#include <boost/iterator/detail/enable_if.hpp>
#include <boost/iterator/iterator_adaptor.hpp>
#include <boost/iterator/iterator_categories.hpp>
#include <boost/mpl/not.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/type_traits/function_traits.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/is_class.hpp>
#include <boost/type_traits/is_function.hpp>
#include <boost/type_traits/is_reference.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/utility/result_of.hpp>
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
# include <boost/type_traits/is_base_and_derived.hpp>
#endif
#include <boost/iterator/detail/config_def.hpp>
namespace boost {
namespace iterators {
template <class UnaryFunction, class Iterator, class Reference = use_default, class Value = use_default>
class transform_iterator;
namespace detail
{
// Compute the iterator_adaptor instantiation to be used for transform_iterator
template <class UnaryFunc, class Iterator, class Reference, class Value>
struct transform_iterator_base
{
private:
// By default, dereferencing the iterator yields the same as
// the function.
typedef typename ia_dflt_help<
Reference
, result_of<const UnaryFunc(typename std::iterator_traits<Iterator>::reference)>
>::type reference;
// To get the default for Value: remove any reference on the
// result type, but retain any constness to signal
// non-writability. Note that if we adopt Thomas' suggestion
// to key non-writability *only* on the Reference argument,
// we'd need to strip constness here as well.
typedef typename ia_dflt_help<
Value
, remove_reference<reference>
>::type cv_value_type;
public:
typedef iterator_adaptor<
transform_iterator<UnaryFunc, Iterator, Reference, Value>
, Iterator
, cv_value_type
, use_default // Leave the traversal category alone
, reference
> type;
};
}
template <class UnaryFunc, class Iterator, class Reference, class Value>
class transform_iterator
: public boost::iterators::detail::transform_iterator_base<UnaryFunc, Iterator, Reference, Value>::type
{
typedef typename
boost::iterators::detail::transform_iterator_base<UnaryFunc, Iterator, Reference, Value>::type
super_t;
friend class iterator_core_access;
public:
transform_iterator() { }
transform_iterator(Iterator const& x, UnaryFunc f)
: super_t(x), m_f(f) { }
explicit transform_iterator(Iterator const& x)
: super_t(x)
{
// Pro8 is a little too aggressive about instantiating the
// body of this function.
#if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
// don't provide this constructor if UnaryFunc is a
// function pointer type, since it will be 0. Too dangerous.
BOOST_STATIC_ASSERT(is_class<UnaryFunc>::value);
#endif
}
template <
class OtherUnaryFunction
, class OtherIterator
, class OtherReference
, class OtherValue>
transform_iterator(
transform_iterator<OtherUnaryFunction, OtherIterator, OtherReference, OtherValue> const& t
, typename enable_if_convertible<OtherIterator, Iterator>::type* = 0
#if !BOOST_WORKAROUND(BOOST_MSVC, == 1310)
, typename enable_if_convertible<OtherUnaryFunction, UnaryFunc>::type* = 0
#endif
)
: super_t(t.base()), m_f(t.functor())
{}
UnaryFunc functor() const
{ return m_f; }
private:
typename super_t::reference dereference() const
{ return m_f(*this->base()); }
// Probably should be the initial base class so it can be
// optimized away via EBO if it is an empty class.
UnaryFunc m_f;
};
template <class UnaryFunc, class Iterator>
inline transform_iterator<UnaryFunc, Iterator>
make_transform_iterator(Iterator it, UnaryFunc fun)
{
return transform_iterator<UnaryFunc, Iterator>(it, fun);
}
// Version which allows explicit specification of the UnaryFunc
// type.
//
// This generator is not provided if UnaryFunc is a function
// pointer type, because it's too dangerous: the default-constructed
// function pointer in the iterator be 0, leading to a runtime
// crash.
template <class UnaryFunc, class Iterator>
inline typename iterators::enable_if<
is_class<UnaryFunc> // We should probably find a cheaper test than is_class<>
, transform_iterator<UnaryFunc, Iterator>
>::type
make_transform_iterator(Iterator it)
{
return transform_iterator<UnaryFunc, Iterator>(it, UnaryFunc());
}
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
template <class Return, class Argument, class Iterator>
inline transform_iterator< Return (*)(Argument), Iterator, Return>
make_transform_iterator(Iterator it, Return (*fun)(Argument))
{
return transform_iterator<Return (*)(Argument), Iterator, Return>(it, fun);
}
#endif
} // namespace iterators
using iterators::transform_iterator;
using iterators::make_transform_iterator;
} // namespace boost
#include <boost/iterator/detail/config_undef.hpp>
#endif // BOOST_TRANSFORM_ITERATOR_23022003THW_HPP