code:
//---------------------------------------------------------------------------//
// 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_DETAIL_VENDOR_HPP
#define BOOST_COMPUTE_DETAIL_VENDOR_HPP

#include <boost/compute/device.hpp>
#include <boost/compute/platform.hpp>

namespace boost {
namespace compute {
namespace detail {

// returns true if the device is an nvidia gpu
inline bool is_nvidia_device(const device &device)
{
    std::string nvidia("NVIDIA");
    return device.vendor().compare(0, nvidia.size(), nvidia) == 0;
}

// returns true if the device is an amd cpu or gpu
inline bool is_amd_device(const device &device)
{
    return device.platform().vendor() == "Advanced Micro Devices, Inc.";
}

// returns true if the platform is Apple OpenCL platform
inline bool is_apple_platform(const platform &platform)
{
    return platform.name() == "Apple";
}

// returns true if the device is from Apple OpenCL Platform
inline bool is_apple_platform_device(const device &device)
{
    return is_apple_platform(device.platform());
}

} // end detail namespace
} // end compute namespace
} // end boost namespace

#endif // BOOST_COMPUTE_DETAIL_VENDOR_HPP


code:
#ifndef WSPRD_UTILS_H
#define WSPRD_UTILS_H

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <stdint.h>
#include <time.h>
#include "nhash.h"

void unpack50( signed char *dat, int32_t *n1, int32_t *n2 );

int unpackcall( int32_t ncall, char *call );

int unpackgrid( int32_t ngrid, char *grid);

int unpackpfx( int32_t nprefix, char *call);

void deinterleave(unsigned char *sym);

// used by qsort
int doublecomp(const void* elem1, const void* elem2);
int floatcomp(const void* elem1, const void* elem2);

int unpk_( signed char *message, char* hashtab, char *call_loc_pow, char *callsign);

#endif

license: mit


code:
// Copyright 2005 Daniel Wallin.
// Copyright 2005 Joel de Guzman.
//
// 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)
//
// Modeled after range_ex, Copyright 2004 Eric Niebler
///////////////////////////////////////////////////////////////////////////////
//
// is_std_hash_set.hpp
//
/////////////////////////////////////////////////////////////////////////////

#ifndef BOOST_PHOENIX_IS_STD_HASH_SET_EN_16_12_2004
#define BOOST_PHOENIX_IS_STD_HASH_SET_EN_16_12_2004

#include <boost/mpl/bool.hpp>
#include "./std_hash_set_fwd.hpp"

namespace boost
{
    template<class T>
    struct is_std_hash_set
        : boost::mpl::false_
    {};

    template<class T>
    struct is_std_hash_multiset
        : boost::mpl::false_
    {};

#if defined(BOOST_HAS_HASH)

    template<
        class Kty
      , class Hash
      , class Cmp
      , class Alloc
    >
    struct is_std_hash_set< ::BOOST_STD_EXTENSION_NAMESPACE::hash_set<Kty,Hash,Cmp,Alloc> >
        : boost::mpl::true_
    {};

    template<
        class Kty
      , class Hash
      , class Cmp
      , class Alloc
    >
    struct is_std_hash_multiset< ::BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<Kty,Hash,Cmp,Alloc> >
        : boost::mpl::true_
    {};

#elif defined(BOOST_DINKUMWARE_STDLIB)

    template<
        class Kty
      , class Tr
      , class Alloc
    >
    struct is_std_hash_set< ::BOOST_STD_EXTENSION_NAMESPACE::hash_set<Kty,Tr,Alloc> >
        : boost::mpl::true_
    {};

    template<
        class Kty
      , class Tr
      , class Alloc
    >
    struct is_std_hash_multiset< ::BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<Kty,Tr,Alloc> >
        : boost::mpl::true_
    {};

#endif

}

#endif


code:
# /* **************************************************************************
#  *                                                                          *
#  *     (C) Copyright Paul Mensonides 2002.
#  *     Distributed under the Boost Software License, Version 1.0. (See
#  *     accompanying file LICENSE_1_0.txt or copy at
#  *     http://www.boost.org/LICENSE_1_0.txt)
#  *                                                                          *
#  ************************************************************************** */
#
# /* See http://www.boost.org for most recent version. */
#
# ifndef BOOST_PREPROCESSOR_SEQ_SIZE_HPP
# define BOOST_PREPROCESSOR_SEQ_SIZE_HPP
#
# include <boost/preprocessor/cat.hpp>
# include <boost/preprocessor/config/config.hpp>
#
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
#    define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_SEQ_SIZE_I((seq))
#    define BOOST_PP_SEQ_SIZE_I(par) BOOST_PP_SEQ_SIZE_II ## par
#    define BOOST_PP_SEQ_SIZE_II(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_SEQ_SIZE_0 ## seq)
# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() || BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
#    define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_SEQ_SIZE_I(seq)
#    define BOOST_PP_SEQ_SIZE_I(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_SEQ_SIZE_0 seq)
# elif defined(__IBMC__) || defined(__IBMCPP__)
#    define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_0, seq))
# else
#    define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_SEQ_SIZE_0 seq)
# endif
#
# define BOOST_PP_SEQ_SIZE_0(_) BOOST_PP_SEQ_SIZE_1
# define BOOST_PP_SEQ_SIZE_1(_) BOOST_PP_SEQ_SIZE_2
# define BOOST_PP_SEQ_SIZE_2(_) BOOST_PP_SEQ_SIZE_3
# define BOOST_PP_SEQ_SIZE_3(_) BOOST_PP_SEQ_SIZE_4
# define BOOST_PP_SEQ_SIZE_4(_) BOOST_PP_SEQ_SIZE_5
# define BOOST_PP_SEQ_SIZE_5(_) BOOST_PP_SEQ_SIZE_6
# define BOOST_PP_SEQ_SIZE_6(_) BOOST_PP_SEQ_SIZE_7
# define BOOST_PP_SEQ_SIZE_7(_) BOOST_PP_SEQ_SIZE_8
# define BOOST_PP_SEQ_SIZE_8(_) BOOST_PP_SEQ_SIZE_9
# define BOOST_PP_SEQ_SIZE_9(_) BOOST_PP_SEQ_SIZE_10
# define BOOST_PP_SEQ_SIZE_10(_) BOOST_PP_SEQ_SIZE_11
# define BOOST_PP_SEQ_SIZE_11(_) BOOST_PP_SEQ_SIZE_12
# define BOOST_PP_SEQ_SIZE_12(_) BOOST_PP_SEQ_SIZE_13
# define BOOST_PP_SEQ_SIZE_13(_) BOOST_PP_SEQ_SIZE_14
# define BOOST_PP_SEQ_SIZE_14(_) BOOST_PP_SEQ_SIZE_15
# define BOOST_PP_SEQ_SIZE_15(_) BOOST_PP_SEQ_SIZE_16
# define BOOST_PP_SEQ_SIZE_16(_) BOOST_PP_SEQ_SIZE_17
# define BOOST_PP_SEQ_SIZE_17(_) BOOST_PP_SEQ_SIZE_18
# define BOOST_PP_SEQ_SIZE_18(_) BOOST_PP_SEQ_SIZE_19
# define BOOST_PP_SEQ_SIZE_19(_) BOOST_PP_SEQ_SIZE_20
# define BOOST_PP_SEQ_SIZE_20(_) BOOST_PP_SEQ_SIZE_21
# define BOOST_PP_SEQ_SIZE_21(_) BOOST_PP_SEQ_SIZE_22
# define BOOST_PP_SEQ_SIZE_22(_) BOOST_PP_SEQ_SIZE_23
# define BOOST_PP_SEQ_SIZE_23(_) BOOST_PP_SEQ_SIZE_24
# define BOOST_PP_SEQ_SIZE_24(_) BOOST_PP_SEQ_SIZE_25
# define BOOST_PP_SEQ_SIZE_25(_) BOOST_PP_SEQ_SIZE_26
# define BOOST_PP_SEQ_SIZE_26(_) BOOST_PP_SEQ_SIZE_27
# define BOOST_PP_SEQ_SIZE_27(_) BOOST_PP_SEQ_SIZE_28
# define BOOST_PP_SEQ_SIZE_28(_) BOOST_PP_SEQ_SIZE_29
# define BOOST_PP_SEQ_SIZE_29(_) BOOST_PP_SEQ_SIZE_30
# define BOOST_PP_SEQ_SIZE_30(_) BOOST_PP_SEQ_SIZE_31
# define BOOST_PP_SEQ_SIZE_31(_) BOOST_PP_SEQ_SIZE_32
# define BOOST_PP_SEQ_SIZE_32(_) BOOST_PP_SEQ_SIZE_33
# define BOOST_PP_SEQ_SIZE_33(_) BOOST_PP_SEQ_SIZE_34
# define BOOST_PP_SEQ_SIZE_34(_) BOOST_PP_SEQ_SIZE_35
# define BOOST_PP_SEQ_SIZE_35(_) BOOST_PP_SEQ_SIZE_36
# define BOOST_PP_SEQ_SIZE_36(_) BOOST_PP_SEQ_SIZE_37
# define BOOST_PP_SEQ_SIZE_37(_) BOOST_PP_SEQ_SIZE_38
# define BOOST_PP_SEQ_SIZE_38(_) BOOST_PP_SEQ_SIZE_39
# define BOOST_PP_SEQ_SIZE_39(_) BOOST_PP_SEQ_SIZE_40
# define BOOST_PP_SEQ_SIZE_40(_) BOOST_PP_SEQ_SIZE_41
# define BOOST_PP_SEQ_SIZE_41(_) BOOST_PP_SEQ_SIZE_42
# define BOOST_PP_SEQ_SIZE_42(_) BOOST_PP_SEQ_SIZE_43
# define BOOST_PP_SEQ_SIZE_43(_) BOOST_PP_SEQ_SIZE_44
# define BOOST_PP_SEQ_SIZE_44(_) BOOST_PP_SEQ_SIZE_45
# define BOOST_PP_SEQ_SIZE_45(_) BOOST_PP_SEQ_SIZE_46
# define BOOST_PP_SEQ_SIZE_46(_) BOOST_PP_SEQ_SIZE_47
# define BOOST_PP_SEQ_SIZE_47(_) BOOST_PP_SEQ_SIZE_48
# define BOOST_PP_SEQ_SIZE_48(_) BOOST_PP_SEQ_SIZE_49
# define BOOST_PP_SEQ_SIZE_49(_) BOOST_PP_SEQ_SIZE_50
# define BOOST_PP_SEQ_SIZE_50(_) BOOST_PP_SEQ_SIZE_51
# define BOOST_PP_SEQ_SIZE_51(_) BOOST_PP_SEQ_SIZE_52
# define BOOST_PP_SEQ_SIZE_52(_) BOOST_PP_SEQ_SIZE_53
# define BOOST_PP_SEQ_SIZE_53(_) BOOST_PP_SEQ_SIZE_54
# define BOOST_PP_SEQ_SIZE_54(_) BOOST_PP_SEQ_SIZE_55
# define BOOST_PP_SEQ_SIZE_55(_) BOOST_PP_SEQ_SIZE_56
# define BOOST_PP_SEQ_SIZE_56(_) BOOST_PP_SEQ_SIZE_57
# define BOOST_PP_SEQ_SIZE_57(_) BOOST_PP_SEQ_SIZE_58
# define BOOST_PP_SEQ_SIZE_58(_) BOOST_PP_SEQ_SIZE_59
# define BOOST_PP_SEQ_SIZE_59(_) BOOST_PP_SEQ_SIZE_60
# define BOOST_PP_SEQ_SIZE_60(_) BOOST_PP_SEQ_SIZE_61
# define BOOST_PP_SEQ_SIZE_61(_) BOOST_PP_SEQ_SIZE_62
# define BOOST_PP_SEQ_SIZE_62(_) BOOST_PP_SEQ_SIZE_63
# define BOOST_PP_SEQ_SIZE_63(_) BOOST_PP_SEQ_SIZE_64
# define BOOST_PP_SEQ_SIZE_64(_) BOOST_PP_SEQ_SIZE_65
# define BOOST_PP_SEQ_SIZE_65(_) BOOST_PP_SEQ_SIZE_66
# define BOOST_PP_SEQ_SIZE_66(_) BOOST_PP_SEQ_SIZE_67
# define BOOST_PP_SEQ_SIZE_67(_) BOOST_PP_SEQ_SIZE_68
# define BOOST_PP_SEQ_SIZE_68(_) BOOST_PP_SEQ_SIZE_69
# define BOOST_PP_SEQ_SIZE_69(_) BOOST_PP_SEQ_SIZE_70
# define BOOST_PP_SEQ_SIZE_70(_) BOOST_PP_SEQ_SIZE_71
# define BOOST_PP_SEQ_SIZE_71(_) BOOST_PP_SEQ_SIZE_72
# define BOOST_PP_SEQ_SIZE_72(_) BOOST_PP_SEQ_SIZE_73
# define BOOST_PP_SEQ_SIZE_73(_) BOOST_PP_SEQ_SIZE_74
# define BOOST_PP_SEQ_SIZE_74(_) BOOST_PP_SEQ_SIZE_75
# define BOOST_PP_SEQ_SIZE_75(_) BOOST_PP_SEQ_SIZE_76
# define BOOST_PP_SEQ_SIZE_76(_) BOOST_PP_SEQ_SIZE_77
# define BOOST_PP_SEQ_SIZE_77(_) BOOST_PP_SEQ_SIZE_78
# define BOOST_PP_SEQ_SIZE_78(_) BOOST_PP_SEQ_SIZE_79
# define BOOST_PP_SEQ_SIZE_79(_) BOOST_PP_SEQ_SIZE_80
# define BOOST_PP_SEQ_SIZE_80(_) BOOST_PP_SEQ_SIZE_81
# define BOOST_PP_SEQ_SIZE_81(_) BOOST_PP_SEQ_SIZE_82
# define BOOST_PP_SEQ_SIZE_82(_) BOOST_PP_SEQ_SIZE_83
# define BOOST_PP_SEQ_SIZE_83(_) BOOST_PP_SEQ_SIZE_84
# define BOOST_PP_SEQ_SIZE_84(_) BOOST_PP_SEQ_SIZE_85
# define BOOST_PP_SEQ_SIZE_85(_) BOOST_PP_SEQ_SIZE_86
# define BOOST_PP_SEQ_SIZE_86(_) BOOST_PP_SEQ_SIZE_87
# define BOOST_PP_SEQ_SIZE_87(_) BOOST_PP_SEQ_SIZE_88
# define BOOST_PP_SEQ_SIZE_88(_) BOOST_PP_SEQ_SIZE_89
# define BOOST_PP_SEQ_SIZE_89(_) BOOST_PP_SEQ_SIZE_90
# define BOOST_PP_SEQ_SIZE_90(_) BOOST_PP_SEQ_SIZE_91
# define BOOST_PP_SEQ_SIZE_91(_) BOOST_PP_SEQ_SIZE_92
# define BOOST_PP_SEQ_SIZE_92(_) BOOST_PP_SEQ_SIZE_93
# define BOOST_PP_SEQ_SIZE_93(_) BOOST_PP_SEQ_SIZE_94
# define BOOST_PP_SEQ_SIZE_94(_) BOOST_PP_SEQ_SIZE_95
# define BOOST_PP_SEQ_SIZE_95(_) BOOST_PP_SEQ_SIZE_96
# define BOOST_PP_SEQ_SIZE_96(_) BOOST_PP_SEQ_SIZE_97
# define BOOST_PP_SEQ_SIZE_97(_) BOOST_PP_SEQ_SIZE_98
# define BOOST_PP_SEQ_SIZE_98(_) BOOST_PP_SEQ_SIZE_99
# define BOOST_PP_SEQ_SIZE_99(_) BOOST_PP_SEQ_SIZE_100
# define BOOST_PP_SEQ_SIZE_100(_) BOOST_PP_SEQ_SIZE_101
# define BOOST_PP_SEQ_SIZE_101(_) BOOST_PP_SEQ_SIZE_102
# define BOOST_PP_SEQ_SIZE_102(_) BOOST_PP_SEQ_SIZE_103
# define BOOST_PP_SEQ_SIZE_103(_) BOOST_PP_SEQ_SIZE_104
# define BOOST_PP_SEQ_SIZE_104(_) BOOST_PP_SEQ_SIZE_105
# define BOOST_PP_SEQ_SIZE_105(_) BOOST_PP_SEQ_SIZE_106
# define BOOST_PP_SEQ_SIZE_106(_) BOOST_PP_SEQ_SIZE_107
# define BOOST_PP_SEQ_SIZE_107(_) BOOST_PP_SEQ_SIZE_108
# define BOOST_PP_SEQ_SIZE_108(_) BOOST_PP_SEQ_SIZE_109
# define BOOST_PP_SEQ_SIZE_109(_) BOOST_PP_SEQ_SIZE_110
# define BOOST_PP_SEQ_SIZE_110(_) BOOST_PP_SEQ_SIZE_111
# define BOOST_PP_SEQ_SIZE_111(_) BOOST_PP_SEQ_SIZE_112
# define BOOST_PP_SEQ_SIZE_112(_) BOOST_PP_SEQ_SIZE_113
# define BOOST_PP_SEQ_SIZE_113(_) BOOST_PP_SEQ_SIZE_114
# define BOOST_PP_SEQ_SIZE_114(_) BOOST_PP_SEQ_SIZE_115
# define BOOST_PP_SEQ_SIZE_115(_) BOOST_PP_SEQ_SIZE_116
# define BOOST_PP_SEQ_SIZE_116(_) BOOST_PP_SEQ_SIZE_117
# define BOOST_PP_SEQ_SIZE_117(_) BOOST_PP_SEQ_SIZE_118
# define BOOST_PP_SEQ_SIZE_118(_) BOOST_PP_SEQ_SIZE_119
# define BOOST_PP_SEQ_SIZE_119(_) BOOST_PP_SEQ_SIZE_120
# define BOOST_PP_SEQ_SIZE_120(_) BOOST_PP_SEQ_SIZE_121
# define BOOST_PP_SEQ_SIZE_121(_) BOOST_PP_SEQ_SIZE_122
# define BOOST_PP_SEQ_SIZE_122(_) BOOST_PP_SEQ_SIZE_123
# define BOOST_PP_SEQ_SIZE_123(_) BOOST_PP_SEQ_SIZE_124
# define BOOST_PP_SEQ_SIZE_124(_) BOOST_PP_SEQ_SIZE_125
# define BOOST_PP_SEQ_SIZE_125(_) BOOST_PP_SEQ_SIZE_126
# define BOOST_PP_SEQ_SIZE_126(_) BOOST_PP_SEQ_SIZE_127
# define BOOST_PP_SEQ_SIZE_127(_) BOOST_PP_SEQ_SIZE_128
# define BOOST_PP_SEQ_SIZE_128(_) BOOST_PP_SEQ_SIZE_129
# define BOOST_PP_SEQ_SIZE_129(_) BOOST_PP_SEQ_SIZE_130
# define BOOST_PP_SEQ_SIZE_130(_) BOOST_PP_SEQ_SIZE_131
# define BOOST_PP_SEQ_SIZE_131(_) BOOST_PP_SEQ_SIZE_132
# define BOOST_PP_SEQ_SIZE_132(_) BOOST_PP_SEQ_SIZE_133
# define BOOST_PP_SEQ_SIZE_133(_) BOOST_PP_SEQ_SIZE_134
# define BOOST_PP_SEQ_SIZE_134(_) BOOST_PP_SEQ_SIZE_135
# define BOOST_PP_SEQ_SIZE_135(_) BOOST_PP_SEQ_SIZE_136
# define BOOST_PP_SEQ_SIZE_136(_) BOOST_PP_SEQ_SIZE_137
# define BOOST_PP_SEQ_SIZE_137(_) BOOST_PP_SEQ_SIZE_138
# define BOOST_PP_SEQ_SIZE_138(_) BOOST_PP_SEQ_SIZE_139
# define BOOST_PP_SEQ_SIZE_139(_) BOOST_PP_SEQ_SIZE_140
# define BOOST_PP_SEQ_SIZE_140(_) BOOST_PP_SEQ_SIZE_141
# define BOOST_PP_SEQ_SIZE_141(_) BOOST_PP_SEQ_SIZE_142
# define BOOST_PP_SEQ_SIZE_142(_) BOOST_PP_SEQ_SIZE_143
# define BOOST_PP_SEQ_SIZE_143(_) BOOST_PP_SEQ_SIZE_144
# define BOOST_PP_SEQ_SIZE_144(_) BOOST_PP_SEQ_SIZE_145
# define BOOST_PP_SEQ_SIZE_145(_) BOOST_PP_SEQ_SIZE_146
# define BOOST_PP_SEQ_SIZE_146(_) BOOST_PP_SEQ_SIZE_147
# define BOOST_PP_SEQ_SIZE_147(_) BOOST_PP_SEQ_SIZE_148
# define BOOST_PP_SEQ_SIZE_148(_) BOOST_PP_SEQ_SIZE_149
# define BOOST_PP_SEQ_SIZE_149(_) BOOST_PP_SEQ_SIZE_150
# define BOOST_PP_SEQ_SIZE_150(_) BOOST_PP_SEQ_SIZE_151
# define BOOST_PP_SEQ_SIZE_151(_) BOOST_PP_SEQ_SIZE_152
# define BOOST_PP_SEQ_SIZE_152(_) BOOST_PP_SEQ_SIZE_153
# define BOOST_PP_SEQ_SIZE_153(_) BOOST_PP_SEQ_SIZE_154
# define BOOST_PP_SEQ_SIZE_154(_) BOOST_PP_SEQ_SIZE_155
# define BOOST_PP_SEQ_SIZE_155(_) BOOST_PP_SEQ_SIZE_156
# define BOOST_PP_SEQ_SIZE_156(_) BOOST_PP_SEQ_SIZE_157
# define BOOST_PP_SEQ_SIZE_157(_) BOOST_PP_SEQ_SIZE_158
# define BOOST_PP_SEQ_SIZE_158(_) BOOST_PP_SEQ_SIZE_159
# define BOOST_PP_SEQ_SIZE_159(_) BOOST_PP_SEQ_SIZE_160
# define BOOST_PP_SEQ_SIZE_160(_) BOOST_PP_SEQ_SIZE_161
# define BOOST_PP_SEQ_SIZE_161(_) BOOST_PP_SEQ_SIZE_162
# define BOOST_PP_SEQ_SIZE_162(_) BOOST_PP_SEQ_SIZE_163
# define BOOST_PP_SEQ_SIZE_163(_) BOOST_PP_SEQ_SIZE_164
# define BOOST_PP_SEQ_SIZE_164(_) BOOST_PP_SEQ_SIZE_165
# define BOOST_PP_SEQ_SIZE_165(_) BOOST_PP_SEQ_SIZE_166
# define BOOST_PP_SEQ_SIZE_166(_) BOOST_PP_SEQ_SIZE_167
# define BOOST_PP_SEQ_SIZE_167(_) BOOST_PP_SEQ_SIZE_168
# define BOOST_PP_SEQ_SIZE_168(_) BOOST_PP_SEQ_SIZE_169
# define BOOST_PP_SEQ_SIZE_169(_) BOOST_PP_SEQ_SIZE_170
# define BOOST_PP_SEQ_SIZE_170(_) BOOST_PP_SEQ_SIZE_171
# define BOOST_PP_SEQ_SIZE_171(_) BOOST_PP_SEQ_SIZE_172
# define BOOST_PP_SEQ_SIZE_172(_) BOOST_PP_SEQ_SIZE_173
# define BOOST_PP_SEQ_SIZE_173(_) BOOST_PP_SEQ_SIZE_174
# define BOOST_PP_SEQ_SIZE_174(_) BOOST_PP_SEQ_SIZE_175
# define BOOST_PP_SEQ_SIZE_175(_) BOOST_PP_SEQ_SIZE_176
# define BOOST_PP_SEQ_SIZE_176(_) BOOST_PP_SEQ_SIZE_177
# define BOOST_PP_SEQ_SIZE_177(_) BOOST_PP_SEQ_SIZE_178
# define BOOST_PP_SEQ_SIZE_178(_) BOOST_PP_SEQ_SIZE_179
# define BOOST_PP_SEQ_SIZE_179(_) BOOST_PP_SEQ_SIZE_180
# define BOOST_PP_SEQ_SIZE_180(_) BOOST_PP_SEQ_SIZE_181
# define BOOST_PP_SEQ_SIZE_181(_) BOOST_PP_SEQ_SIZE_182
# define BOOST_PP_SEQ_SIZE_182(_) BOOST_PP_SEQ_SIZE_183
# define BOOST_PP_SEQ_SIZE_183(_) BOOST_PP_SEQ_SIZE_184
# define BOOST_PP_SEQ_SIZE_184(_) BOOST_PP_SEQ_SIZE_185
# define BOOST_PP_SEQ_SIZE_185(_) BOOST_PP_SEQ_SIZE_186
# define BOOST_PP_SEQ_SIZE_186(_) BOOST_PP_SEQ_SIZE_187
# define BOOST_PP_SEQ_SIZE_187(_) BOOST_PP_SEQ_SIZE_188
# define BOOST_PP_SEQ_SIZE_188(_) BOOST_PP_SEQ_SIZE_189
# define BOOST_PP_SEQ_SIZE_189(_) BOOST_PP_SEQ_SIZE_190
# define BOOST_PP_SEQ_SIZE_190(_) BOOST_PP_SEQ_SIZE_191
# define BOOST_PP_SEQ_SIZE_191(_) BOOST_PP_SEQ_SIZE_192
# define BOOST_PP_SEQ_SIZE_192(_) BOOST_PP_SEQ_SIZE_193
# define BOOST_PP_SEQ_SIZE_193(_) BOOST_PP_SEQ_SIZE_194
# define BOOST_PP_SEQ_SIZE_194(_) BOOST_PP_SEQ_SIZE_195
# define BOOST_PP_SEQ_SIZE_195(_) BOOST_PP_SEQ_SIZE_196
# define BOOST_PP_SEQ_SIZE_196(_) BOOST_PP_SEQ_SIZE_197
# define BOOST_PP_SEQ_SIZE_197(_) BOOST_PP_SEQ_SIZE_198
# define BOOST_PP_SEQ_SIZE_198(_) BOOST_PP_SEQ_SIZE_199
# define BOOST_PP_SEQ_SIZE_199(_) BOOST_PP_SEQ_SIZE_200
# define BOOST_PP_SEQ_SIZE_200(_) BOOST_PP_SEQ_SIZE_201
# define BOOST_PP_SEQ_SIZE_201(_) BOOST_PP_SEQ_SIZE_202
# define BOOST_PP_SEQ_SIZE_202(_) BOOST_PP_SEQ_SIZE_203
# define BOOST_PP_SEQ_SIZE_203(_) BOOST_PP_SEQ_SIZE_204
# define BOOST_PP_SEQ_SIZE_204(_) BOOST_PP_SEQ_SIZE_205
# define BOOST_PP_SEQ_SIZE_205(_) BOOST_PP_SEQ_SIZE_206
# define BOOST_PP_SEQ_SIZE_206(_) BOOST_PP_SEQ_SIZE_207
# define BOOST_PP_SEQ_SIZE_207(_) BOOST_PP_SEQ_SIZE_208
# define BOOST_PP_SEQ_SIZE_208(_) BOOST_PP_SEQ_SIZE_209
# define BOOST_PP_SEQ_SIZE_209(_) BOOST_PP_SEQ_SIZE_210
# define BOOST_PP_SEQ_SIZE_210(_) BOOST_PP_SEQ_SIZE_211
# define BOOST_PP_SEQ_SIZE_211(_) BOOST_PP_SEQ_SIZE_212
# define BOOST_PP_SEQ_SIZE_212(_) BOOST_PP_SEQ_SIZE_213
# define BOOST_PP_SEQ_SIZE_213(_) BOOST_PP_SEQ_SIZE_214
# define BOOST_PP_SEQ_SIZE_214(_) BOOST_PP_SEQ_SIZE_215
# define BOOST_PP_SEQ_SIZE_215(_) BOOST_PP_SEQ_SIZE_216
# define BOOST_PP_SEQ_SIZE_216(_) BOOST_PP_SEQ_SIZE_217
# define BOOST_PP_SEQ_SIZE_217(_) BOOST_PP_SEQ_SIZE_218
# define BOOST_PP_SEQ_SIZE_218(_) BOOST_PP_SEQ_SIZE_219
# define BOOST_PP_SEQ_SIZE_219(_) BOOST_PP_SEQ_SIZE_220
# define BOOST_PP_SEQ_SIZE_220(_) BOOST_PP_SEQ_SIZE_221
# define BOOST_PP_SEQ_SIZE_221(_) BOOST_PP_SEQ_SIZE_222
# define BOOST_PP_SEQ_SIZE_222(_) BOOST_PP_SEQ_SIZE_223
# define BOOST_PP_SEQ_SIZE_223(_) BOOST_PP_SEQ_SIZE_224
# define BOOST_PP_SEQ_SIZE_224(_) BOOST_PP_SEQ_SIZE_225
# define BOOST_PP_SEQ_SIZE_225(_) BOOST_PP_SEQ_SIZE_226
# define BOOST_PP_SEQ_SIZE_226(_) BOOST_PP_SEQ_SIZE_227
# define BOOST_PP_SEQ_SIZE_227(_) BOOST_PP_SEQ_SIZE_228
# define BOOST_PP_SEQ_SIZE_228(_) BOOST_PP_SEQ_SIZE_229
# define BOOST_PP_SEQ_SIZE_229(_) BOOST_PP_SEQ_SIZE_230
# define BOOST_PP_SEQ_SIZE_230(_) BOOST_PP_SEQ_SIZE_231
# define BOOST_PP_SEQ_SIZE_231(_) BOOST_PP_SEQ_SIZE_232
# define BOOST_PP_SEQ_SIZE_232(_) BOOST_PP_SEQ_SIZE_233
# define BOOST_PP_SEQ_SIZE_233(_) BOOST_PP_SEQ_SIZE_234
# define BOOST_PP_SEQ_SIZE_234(_) BOOST_PP_SEQ_SIZE_235
# define BOOST_PP_SEQ_SIZE_235(_) BOOST_PP_SEQ_SIZE_236
# define BOOST_PP_SEQ_SIZE_236(_) BOOST_PP_SEQ_SIZE_237
# define BOOST_PP_SEQ_SIZE_237(_) BOOST_PP_SEQ_SIZE_238
# define BOOST_PP_SEQ_SIZE_238(_) BOOST_PP_SEQ_SIZE_239
# define BOOST_PP_SEQ_SIZE_239(_) BOOST_PP_SEQ_SIZE_240
# define BOOST_PP_SEQ_SIZE_240(_) BOOST_PP_SEQ_SIZE_241
# define BOOST_PP_SEQ_SIZE_241(_) BOOST_PP_SEQ_SIZE_242
# define BOOST_PP_SEQ_SIZE_242(_) BOOST_PP_SEQ_SIZE_243
# define BOOST_PP_SEQ_SIZE_243(_) BOOST_PP_SEQ_SIZE_244
# define BOOST_PP_SEQ_SIZE_244(_) BOOST_PP_SEQ_SIZE_245
# define BOOST_PP_SEQ_SIZE_245(_) BOOST_PP_SEQ_SIZE_246
# define BOOST_PP_SEQ_SIZE_246(_) BOOST_PP_SEQ_SIZE_247
# define BOOST_PP_SEQ_SIZE_247(_) BOOST_PP_SEQ_SIZE_248
# define BOOST_PP_SEQ_SIZE_248(_) BOOST_PP_SEQ_SIZE_249
# define BOOST_PP_SEQ_SIZE_249(_) BOOST_PP_SEQ_SIZE_250
# define BOOST_PP_SEQ_SIZE_250(_) BOOST_PP_SEQ_SIZE_251
# define BOOST_PP_SEQ_SIZE_251(_) BOOST_PP_SEQ_SIZE_252
# define BOOST_PP_SEQ_SIZE_252(_) BOOST_PP_SEQ_SIZE_253
# define BOOST_PP_SEQ_SIZE_253(_) BOOST_PP_SEQ_SIZE_254
# define BOOST_PP_SEQ_SIZE_254(_) BOOST_PP_SEQ_SIZE_255
# define BOOST_PP_SEQ_SIZE_255(_) BOOST_PP_SEQ_SIZE_256
# define BOOST_PP_SEQ_SIZE_256(_) BOOST_PP_SEQ_SIZE_257
#
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_0 0
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_1 1
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_2 2
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_3 3
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_4 4
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_5 5
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_6 6
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_7 7
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_8 8
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_9 9
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_10 10
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_11 11
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_12 12
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_13 13
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_14 14
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_15 15
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_16 16
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_17 17
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_18 18
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_19 19
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_20 20
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_21 21
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_22 22
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_23 23
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_24 24
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_25 25
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_26 26
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_27 27
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_28 28
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_29 29
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_30 30
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_31 31
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_32 32
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_33 33
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_34 34
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_35 35
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_36 36
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_37 37
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_38 38
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_39 39
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_40 40
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_41 41
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_42 42
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_43 43
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_44 44
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_45 45
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_46 46
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_47 47
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_48 48
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_49 49
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_50 50
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_51 51
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_52 52
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_53 53
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_54 54
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_55 55
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_56 56
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_57 57
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_58 58
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_59 59
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_60 60
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_61 61
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_62 62
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_63 63
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_64 64
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_65 65
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_66 66
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_67 67
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_68 68
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_69 69
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_70 70
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_71 71
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_72 72
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_73 73
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_74 74
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_75 75
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_76 76
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_77 77
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_78 78
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_79 79
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_80 80
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_81 81
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_82 82
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_83 83
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_84 84
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_85 85
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_86 86
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_87 87
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_88 88
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_89 89
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_90 90
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_91 91
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_92 92
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_93 93
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_94 94
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_95 95
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_96 96
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_97 97
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_98 98
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_99 99
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_100 100
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_101 101
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_102 102
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_103 103
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_104 104
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_105 105
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_106 106
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_107 107
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_108 108
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_109 109
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_110 110
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_111 111
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_112 112
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_113 113
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_114 114
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_115 115
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_116 116
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_117 117
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_118 118
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_119 119
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_120 120
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_121 121
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_122 122
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_123 123
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_124 124
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_125 125
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_126 126
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_127 127
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_128 128
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_129 129
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_130 130
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_131 131
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_132 132
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_133 133
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_134 134
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_135 135
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_136 136
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_137 137
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_138 138
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_139 139
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_140 140
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_141 141
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_142 142
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_143 143
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_144 144
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_145 145
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_146 146
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_147 147
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_148 148
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_149 149
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_150 150
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_151 151
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_152 152
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_153 153
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_154 154
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_155 155
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_156 156
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_157 157
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_158 158
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_159 159
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_160 160
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_161 161
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_162 162
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_163 163
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_164 164
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_165 165
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_166 166
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_167 167
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_168 168
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_169 169
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_170 170
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_171 171
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_172 172
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_173 173
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_174 174
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_175 175
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_176 176
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_177 177
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_178 178
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_179 179
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_180 180
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_181 181
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_182 182
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_183 183
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_184 184
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_185 185
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_186 186
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_187 187
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_188 188
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_189 189
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_190 190
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_191 191
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_192 192
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_193 193
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_194 194
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_195 195
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_196 196
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_197 197
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_198 198
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_199 199
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_200 200
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_201 201
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_202 202
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_203 203
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_204 204
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_205 205
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_206 206
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_207 207
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_208 208
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_209 209
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_210 210
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_211 211
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_212 212
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_213 213
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_214 214
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_215 215
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_216 216
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_217 217
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_218 218
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_219 219
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_220 220
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_221 221
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_222 222
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_223 223
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_224 224
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_225 225
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_226 226
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_227 227
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_228 228
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_229 229
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_230 230
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_231 231
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_232 232
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_233 233
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_234 234
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_235 235
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_236 236
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_237 237
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_238 238
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_239 239
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_240 240
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_241 241
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_242 242
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_243 243
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_244 244
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_245 245
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_246 246
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_247 247
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_248 248
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_249 249
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_250 250
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_251 251
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_252 252
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_253 253
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_254 254
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_255 255
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_256 256
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_257 257
#
# endif


code:
// 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_IMPL_HPP
#define BOOST_UNITS_DIMENSION_IMPL_HPP

#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/deref.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/list.hpp>
#include <boost/mpl/next.hpp>
#include <boost/mpl/size.hpp>
#include <boost/mpl/less.hpp>

#include <boost/units/config.hpp>
#include <boost/units/dimensionless_type.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/units_fwd.hpp>
#include <boost/units/detail/dimension_list.hpp>
#include <boost/units/detail/push_front_if.hpp>
#include <boost/units/detail/push_front_or_add.hpp>

/// \file
/// \brief Core class and metaprogramming utilities for compile-time dimensional analysis.

namespace boost {

namespace units {

namespace detail {

template<int N>
struct insertion_sort_dims_insert;

template<bool is_greater>
struct insertion_sort_dims_comparison_impl;

// have to recursively add the element to the next sequence.
template<>
struct insertion_sort_dims_comparison_impl<true> {
    template<class Begin, int N, class T>
    struct apply {
        typedef list<
            typename Begin::item,
            typename insertion_sort_dims_insert<N - 1>::template apply<
                typename Begin::next,
                T
            >::type
        > type;
    };
};

// either prepend the current element or join it to
// the first remaining element of the sequence.
template<>
struct insertion_sort_dims_comparison_impl<false> {
    template<class Begin, int N, class T>
    struct apply {
        typedef typename push_front_or_add<Begin, T>::type type;
    };
};

template<int N>
struct insertion_sort_dims_insert {
    template<class Begin, class T>
    struct apply {
        typedef typename insertion_sort_dims_comparison_impl<mpl::less<typename Begin::item, T>::value>::template apply<
            Begin,
            N,
            T
        >::type type;
    };
};

template<>
struct insertion_sort_dims_insert<0> {
    template<class Begin, class T>
    struct apply {
        typedef list<T, dimensionless_type> type;
    };
};

template<int N>
struct insertion_sort_dims_mpl_sequence {
    template<class Begin>
    struct apply {
        typedef typename insertion_sort_dims_mpl_sequence<N - 1>::template apply<typename mpl::next<Begin>::type>::type next;
        typedef typename insertion_sort_dims_insert<(next::size::value)>::template apply<next, typename mpl::deref<Begin>::type>::type type;
    };
};

template<>
struct insertion_sort_dims_mpl_sequence<0> {
    template<class Begin>
    struct apply {
        typedef dimensionless_type type;
    };
};

template<int N>
struct insertion_sort_dims_impl {
    template<class Begin>
    struct apply {
        typedef typename insertion_sort_dims_impl<N - 1>::template apply<typename Begin::next>::type next;
        typedef typename insertion_sort_dims_insert<(next::size::value)>::template apply<next, typename Begin::item>::type type;
    };
};

template<>
struct insertion_sort_dims_impl<0> {
    template<class Begin>
    struct apply {
        typedef dimensionless_type type;
    };
};

template<class T>
struct sort_dims
{
    typedef typename insertion_sort_dims_mpl_sequence<mpl::size<T>::value>::template apply<typename mpl::begin<T>::type>::type type;
};

template<class T, class Next>
struct sort_dims<list<T, Next> >
{
    typedef typename insertion_sort_dims_impl<list<T, Next>::size::value>::template apply<list<T, Next> >::type type;
};

/// sorted sequences can be merged in linear time
template<bool less, bool greater>
struct merge_dimensions_func;

template<int N1, int N2>
struct merge_dimensions_impl;

template<>
struct merge_dimensions_func<true, false>
{
    template<typename Begin1, typename Begin2, int N1, int N2>
    struct apply
    {
        typedef list<
            typename Begin1::item,
            typename merge_dimensions_impl<N1 - 1, N2>::template apply<
                typename Begin1::next,
                Begin2
            >::type
        > type;
    };
};

template<>
struct merge_dimensions_func<false, true> {
    template<typename Begin1, typename Begin2, int N1, int N2>
    struct apply
    {
        typedef list<
            typename Begin2::item,
            typename merge_dimensions_impl<N2 - 1, N1>::template apply<
                typename Begin2::next,
                Begin1
            >::type
        > type;
    };
};

template<>
struct merge_dimensions_func<false, false> {
    template<typename Begin1, typename Begin2, int N1, int N2>
    struct apply
    {
        typedef typename mpl::plus<typename Begin1::item, typename Begin2::item>::type combined;
        typedef typename push_front_if<!is_empty_dim<combined>::value>::template apply<
            typename merge_dimensions_impl<N1 - 1, N2 - 1>::template apply<
                typename Begin1::next,
                typename Begin2::next
            >::type,
            combined
        >::type type;
    };
};

template<int N1, int N2>
struct merge_dimensions_impl {
    template<typename Begin1, typename Begin2>
    struct apply
    {
        typedef typename Begin1::item dim1;
        typedef typename Begin2::item dim2;

        typedef typename merge_dimensions_func<(mpl::less<dim1,dim2>::value == true),
                (mpl::less<dim2,dim1>::value == true)>::template apply<
            Begin1,
            Begin2,
            N1,
            N2
        >::type type;
    };
};

template<typename Sequence1, typename Sequence2>
struct merge_dimensions
{
    typedef typename detail::merge_dimensions_impl<Sequence1::size::value,
                                                   Sequence2::size::value>::template
        apply<
            Sequence1,
            Sequence2
        >::type type;
};

template<int N>
struct iterator_to_list
{
    template<typename Begin>
    struct apply
    {
        typedef list<
            typename Begin::item,
            typename iterator_to_list<N - 1>::template apply<
                typename Begin::next
            >::type
        > type;
    };
};

template<>
struct iterator_to_list<0>
{
    template<typename Begin>
    struct apply {
        typedef dimensionless_type type;
    };
};

template<int N>
struct merge_dimensions_impl<N, 0>
{
    template<typename Begin1, typename Begin2>
    struct apply
    {
        typedef typename iterator_to_list<N>::template apply<Begin1>::type type;
    };
};

template<int N>
struct merge_dimensions_impl<0, N>
{
    template<typename Begin1, typename Begin2>
    struct apply
    {
        typedef typename iterator_to_list<N>::template apply<Begin2>::type type;
    };
};

template<>
struct merge_dimensions_impl<0, 0>
{
    template<typename Begin1, typename Begin2>
    struct apply
    {
        typedef dimensionless_type type;
    };
};

template<int N>
struct static_inverse_impl
{
    template<typename Begin>
    struct apply {
        typedef list<
            typename mpl::negate<typename Begin::item>::type,
            typename static_inverse_impl<N - 1>::template apply<
                typename Begin::next
            >::type
        > type;
    };
};

template<>
struct static_inverse_impl<0>
{
    template<typename Begin>
    struct apply
    {
        typedef dimensionless_type type;
    };
};

template<int N>
struct static_power_impl
{
    template<typename Begin, typename Ex>
    struct apply
    {
        typedef list<
            typename mpl::times<typename Begin::item, Ex>::type,
            typename detail::static_power_impl<N - 1>::template apply<typename Begin::next, Ex>::type
        > type;
    };
};

template<>
struct static_power_impl<0>
{
    template<typename Begin, typename Ex>
    struct apply
    {
        typedef dimensionless_type type;
    };
};

template<int N>
struct static_root_impl {
    template<class Begin, class Ex>
    struct apply {
        typedef list<
            typename mpl::divides<typename Begin::item, Ex>::type,
            typename detail::static_root_impl<N - 1>::template apply<typename Begin::next, Ex>::type
        > type;
    };
};

template<>
struct static_root_impl<0> {
    template<class Begin, class Ex>
    struct apply
    {
        typedef dimensionless_type type;
    };
};

} // namespace detail

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_DIMENSION_IMPL_HPP


code:
#ifndef BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED
#define BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED

// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.

// $Id$
// $Date$
// $Revision$

#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>

namespace boost {  namespace mpl {

template<
      typename BOOST_MPL_AUX_NA_PARAM(Iterator)
    >
struct iterator_category
{
    typedef typename Iterator::category type;
    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,iterator_category,(Iterator))
};

BOOST_MPL_AUX_NA_SPEC(1, iterator_category)

}}

#endif // BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED


code:
/* boost random/exponential_distribution.hpp header file
 *
 * Copyright Jens Maurer 2000-2001
 * Copyright Steven Watanabe 2011
 * Distributed under the Boost Software License, Version 1.0. (See
 * accompanying file LICENSE_1_0.txt or copy at
 * http://www.boost.org/LICENSE_1_0.txt)
 *
 * See http://www.boost.org for most recent version including documentation.
 *
 * $Id$
 *
 * Revision history
 *  2001-02-18  moved to individual header files
 */

#ifndef BOOST_RANDOM_EXPONENTIAL_DISTRIBUTION_HPP
#define BOOST_RANDOM_EXPONENTIAL_DISTRIBUTION_HPP

#include <boost/config/no_tr1/cmath.hpp>
#include <iosfwd>
#include <boost/assert.hpp>
#include <boost/limits.hpp>
#include <boost/random/detail/config.hpp>
#include <boost/random/detail/operators.hpp>
#include <boost/random/uniform_01.hpp>

namespace boost {
namespace random {

/**
 * The exponential distribution is a model of \random_distribution with
 * a single parameter lambda.
 *
 * It has \f$\displaystyle p(x) = \lambda e^{-\lambda x}\f$
 */
template<class RealType = double>
class exponential_distribution
{
public:
    typedef RealType input_type;
    typedef RealType result_type;

    class param_type
    {
    public:

        typedef exponential_distribution distribution_type;

        /**
         * Constructs parameters with a given lambda.
         *
         * Requires: lambda > 0
         */
        param_type(RealType lambda_arg = RealType(1.0))
          : _lambda(lambda_arg) { BOOST_ASSERT(_lambda > RealType(0)); }

        /** Returns the lambda parameter of the distribution. */
        RealType lambda() const { return _lambda; }

        /** Writes the parameters to a @c std::ostream. */
        BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, param_type, parm)
        {
            os << parm._lambda;
            return os;
        }

        /** Reads the parameters from a @c std::istream. */
        BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, param_type, parm)
        {
            is >> parm._lambda;
            return is;
        }

        /** Returns true if the two sets of parameters are equal. */
        BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(param_type, lhs, rhs)
        { return lhs._lambda == rhs._lambda; }

        /** Returns true if the two sets of parameters are different. */
        BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(param_type)

    private:
        RealType _lambda;
    };

    /**
     * Constructs an exponential_distribution with a given lambda.
     *
     * Requires: lambda > 0
     */
    explicit exponential_distribution(RealType lambda_arg = RealType(1.0))
      : _lambda(lambda_arg) { BOOST_ASSERT(_lambda > RealType(0)); }

    /**
     * Constructs an exponential_distribution from its parameters
     */
    explicit exponential_distribution(const param_type& parm)
      : _lambda(parm.lambda()) {}

    // compiler-generated copy ctor and assignment operator are fine

    /** Returns the lambda parameter of the distribution. */
    RealType lambda() const { return _lambda; }

    /** Returns the smallest value that the distribution can produce. */
    RealType min BOOST_PREVENT_MACRO_SUBSTITUTION () const
    { return RealType(0); }
    /** Returns the largest value that the distribution can produce. */
    RealType max BOOST_PREVENT_MACRO_SUBSTITUTION () const
    { return (std::numeric_limits<RealType>::infinity)(); }

    /** Returns the parameters of the distribution. */
    param_type param() const { return param_type(_lambda); }
    /** Sets the parameters of the distribution. */
    void param(const param_type& parm) { _lambda = parm.lambda(); }

    /**
     * Effects: Subsequent uses of the distribution do not depend
     * on values produced by any engine prior to invoking reset.
     */
    void reset() { }

    /**
     * Returns a random variate distributed according to the
     * exponential distribution.
     */
    template<class Engine>
    result_type operator()(Engine& eng) const
    {
        using std::log;
        return -result_type(1) /
            _lambda * log(result_type(1)-uniform_01<RealType>()(eng));
    }

    /**
     * Returns a random variate distributed according to the exponential
     * distribution with parameters specified by param.
     */
    template<class Engine>
    result_type operator()(Engine& eng, const param_type& parm) const
    {
        return exponential_distribution(parm)(eng);
    }

    /** Writes the distribution to a std::ostream. */
    BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, exponential_distribution, ed)
    {
        os << ed._lambda;
        return os;
    }

    /** Reads the distribution from a std::istream. */
    BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, exponential_distribution, ed)
    {
        is >> ed._lambda;
        return is;
    }

    /**
     * Returns true iff the two distributions will produce identical
     * sequences of values given equal generators.
     */
    BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(exponential_distribution, lhs, rhs)
    { return lhs._lambda == rhs._lambda; }

    /**
     * Returns true iff the two distributions will produce different
     * sequences of values given equal generators.
     */
    BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(exponential_distribution)

private:
    result_type _lambda;
};

} // namespace random

using random::exponential_distribution;

} // namespace boost

#endif // BOOST_RANDOM_EXPONENTIAL_DISTRIBUTION_HPP


code:
program msksim

! Simulate characteristics of a potential "MSK10" mode using LDPC (168,84)
! code, OQPDK modulation, and 30 s T/R sequences.

! Reception and Demodulation algorithm:
!   1. Compute coarse spectrum; find fc1 = approx carrier freq
!   2. Mix from fc1 to 0; LPF at +/- 0.75*R
!   3. Square, FFT; find peaks near -R/2 and +R/2 to get fc2
!   4. Mix from fc2 to 0
!   5. Fit cb13 (central part of csync) to c -> lag, phase
!   6. Fit complex ploynomial for channel equalization
!   7. Get soft bits from equalized data

  parameter (KK=84)                     !Information bits (72 + CRC12)
  parameter (ND=168)                    !Data symbols: LDPC (168,84), r=1/2
  parameter (NS=65)                     !Sync symbols (2 x 26 + Barker 13)
  parameter (NR=3)                      !Ramp up/down
  parameter (NN=NR+NS+ND)               !Total symbols (236)
  parameter (NSPS=1152/72)              !Samples per MSK symbol (16)
  parameter (N2=2*NSPS)                 !Samples per OQPSK symbol (32)
  parameter (N13=13*N2)                 !Samples in central sync vector (416)
  parameter (NZ=NSPS*NN)                !Samples in baseband waveform (3776)
  parameter (NFFT1=4*NSPS,NH1=NFFT1/2)

  character*8 arg
  complex cbb(0:NZ-1)                   !Complex baseband waveform
  complex csync(0:NZ-1)                 !Sync symbols only, from cbb
  complex cb13(0:N13-1)                 !Barker 13 waveform
  complex c(0:NZ-1)                     !Complex waveform
  complex c0(0:NZ-1)                    !Complex waveform
  complex zz(NS+ND)                     !Complex symbol values (intermediate)
  complex z
  real xnoise(0:NZ-1)                   !Generated random noise
  real ynoise(0:NZ-1)                   !Generated random noise
  real rxdata(ND),llr(ND)               !Soft symbols
  real pp(2*NSPS)                       !Shaped pulse for OQPSK
  real a(5)                             !For twkfreq1
  real aa(20),bb(20)                    !Fitted polyco's
  integer id(NS+ND)                     !NRZ values (+/-1) for Sync and Data
  integer ierror(NS+ND)
  integer icw(NN)
  integer*1 msgbits(KK),decoded(KK),apmask(ND),cw(ND)
!  integer*1 codeword(ND)
  data msgbits/0,0,1,0,0,1,1,1,1,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,1,1,0,0,0,1, &
       1,1,1,0,1,1,1,1,1,1,1,0,0,1,0,0,1,1,0,1,0,1,1,1,0,1,1,0,1,1,         &
       1,1,0,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,1,0/

  nargs=iargc()
  if(nargs.ne.6) then
     print*,'Usage:   mskhfsim f0(Hz) delay(ms) fspread(Hz) maxn iters snr(dB)'
     print*,'Example: mskhfsim 0 0 0 5 10 -20'
     print*,'Set snr=0 to cycle through a range'
     go to 999
  endif
  call getarg(1,arg)
  read(arg,*) f0                         !Generated carrier frequency
  call getarg(2,arg)
  read(arg,*) delay                      !Delta_t (ms) for Watterson model
  call getarg(3,arg)
  read(arg,*) fspread                    !Fspread (Hz) for Watterson model
  call getarg(4,arg)
  read(arg,*) maxn                       !Max nterms for polyfit
  call getarg(5,arg)
  read(arg,*) iters                      !Iterations at each SNR
  call getarg(6,arg)
  read(arg,*) snrdb                      !Specified SNR_2500

  twopi=8.0*atan(1.0)
  fs=12000.0/72.0                        !Sample rate = 166.6666667 Hz
  dt=1.0/fs                              !Sample interval (s)
  tt=NSPS*dt                             !Duration of "itone" symbols (s)
  ts=2*NSPS*dt                           !Duration of OQPSK symbols (s)
  baud=1.0/tt                            !Keying rate for "itone" symbols (baud)
  txt=NZ*dt                              !Transmission length (s)
  bandwidth_ratio=2500.0/(fs/2.0)
  write(*,1000) f0,delay,fspread,maxn,iters,baud,3*baud,txt
1000 format('f0:',f5.1,'  Delay:',f4.1,'  fSpread:',f5.2,'  maxn:',i3,   &
          '  Iters:',i6/'Baud:',f7.3,'  BW:',f5.1,'  TxT:',f5.1,f5.2/)
  write(*,1004)
1004 format(/'  SNR     err    ber    fer   fsigma'/37('-'))

  do i=1,N2                              !Half-sine pulse shape
     pp(i)=sin(0.5*(i-1)*twopi/(2*NSPS))
  enddo

  call genmskhf(msgbits,id,icw,cbb,csync)!Generate baseband waveform and csync
  cb13=csync(1680:2095)                  !Copy the Barker 13 waveform
  a=0.
  a(1)=f0
  call twkfreq1(cbb,NZ,fs,a,cbb)         !Mix to specified frequency

  isna=-10
  isnb=-30
  if(snrdb.ne.0.0) then
     isna=nint(snrdb)
     isnb=isna
  endif
  do isnr=isna,isnb,-1                   !Loop over SNR range
     snrdb=isnr
     sig=sqrt(bandwidth_ratio) * 10.0**(0.05*snrdb)
     if(snrdb.gt.90.0) sig=1.0
     nhard=0
     nhardsync=0
     nfe=0
     sqf=0.
     do iter=1,iters                     !Loop over requested iterations
        c=cbb
        if(delay.ne.0.0 .or. fspread.ne.0.0) then
           call watterson(c,NZ,fs,delay,fspread)
        endif
        c=sig*c                          !Scale to requested SNR
        if(snrdb.lt.90) then
           do i=0,NZ-1                   !Generate gaussian noise
              xnoise(i)=gran()
              ynoise(i)=gran()
           enddo
           c=c + cmplx(xnoise,ynoise)    !Add AWGN noise
        endif

        call getfc1(c,fc1)               !First approx for freq
        call getfc2(c,csync,fc1,fc2,fc3) !Refined freq
        sqf=sqf + (fc1+fc2-f0)**2

!NB: Measured performance is about equally good using fc2 or fc3 here:
        a(1)=-(fc1+fc2)
        a(2:5)=0.
        call twkfreq1(c,NZ,fs,a,c)       !Mix c down by fc1+fc2

! The following may not be necessary?
!        z=sum(c(1680:2095)*cb13)/208.0     !Get phase from Barker 13 vector
!        z0=z/abs(z)
!        c=c*conjg(z0)

!---------------------------------------------------------------- DT
! Not presently used:
        amax=0.
        jpk=0
        do j=-20*NSPS,20*NSPS            !Get jpk
           z=sum(c(1680+j:2095+j)*cb13)/208.0
           if(abs(z).gt.amax) then
              amax=abs(z)
              jpk=j
           endif
        enddo
        xdt=jpk/fs

        nterms=maxn
        c0=c
        do itry=1,10
           idf=itry/2
           if(mod(itry,2).eq.0) idf=-idf
           nhard0=0
           nhardsync0=0
           ifer=1
           a(1)=idf*0.01
           a(2:5)=0.
           call twkfreq1(c0,NZ,fs,a,c)       !Mix c0 into c
           call cpolyfit(c,pp,id,maxn,aa,bb,zz,nhs)
           call msksoftsym(zz,aa,bb,id,nterms,ierror,rxdata,nhard0,nhardsync0)
           if(nhardsync0.gt.12) cycle
           rxav=sum(rxdata)/ND
           rx2av=sum(rxdata*rxdata)/ND
           rxsig=sqrt(rx2av-rxav*rxav)
           rxdata=rxdata/rxsig
           ss=0.84
           llr=2.0*rxdata/(ss*ss)
           apmask=0
           max_iterations=40
           ifer=0
           call bpdecode168(llr,apmask,max_iterations,decoded,niterations,cw)
           nbadcrc=0
           if(niterations.ge.0) call chkcrc12(decoded,nbadcrc)
           if(niterations.lt.0 .or. count(msgbits.ne.decoded).gt.0 .or.        &
                nbadcrc.ne.0) ifer=1
!           if(ifer.eq.0) write(67,1301) snrdb,itry,idf,niterations,    &
!                nhardsync0,nhard0
!1301       format(f6.1,5i6)
           if(ifer.eq.0) exit
        enddo                                !Freq dither loop
        nhard=nhard+nhard0
        nhardsync=nharsdync+nhardsync0
        nfe=nfe+ifer
     enddo

     fsigma=sqrt(sqf/iters)
     ber=float(nhard)/((NS+ND)*iters)
     fer=float(nfe)/iters
     write(*,1050)  snrdb,nhard,ber,fer,fsigma
!     write(60,1050)  snrdb,nhard,ber,fer,fsigma
1050 format(f6.1,i7,f8.4,f7.3,f8.2)
  enddo

999 end program msksim


code:
//  filesystem path.hpp  ---------------------------------------------------------------//

//  Copyright Beman Dawes 2002-2005, 2009
//  Copyright Vladimir Prus 2002

//  Distributed under the Boost Software License, Version 1.0.
//  See http://www.boost.org/LICENSE_1_0.txt

//  Library home page: http://www.boost.org/libs/filesystem

//  path::stem(), extension(), and replace_extension() are based on
//  basename(), extension(), and change_extension() from the original
//  filesystem/convenience.hpp header by Vladimir Prus.

#ifndef BOOST_FILESYSTEM_PATH_HPP
#define BOOST_FILESYSTEM_PATH_HPP

#include <boost/config.hpp>

# if defined( BOOST_NO_STD_WSTRING )
#   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
# endif

#include <boost/filesystem/config.hpp>
#include <boost/filesystem/path_traits.hpp>  // includes <cwchar>
#include <boost/system/error_code.hpp>
#include <boost/system/system_error.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/io/detail/quoted_manip.hpp>
#include <boost/static_assert.hpp>
#include <boost/functional/hash_fwd.hpp>
#include <boost/type_traits/is_integral.hpp>
#include <string>
#include <iterator>
#include <cstring>
#include <iosfwd>
#include <stdexcept>
#include <cassert>
#include <locale>
#include <algorithm>

#include <boost/config/abi_prefix.hpp> // must be the last #include

namespace boost
{
namespace filesystem
{

  //------------------------------------------------------------------------------------//
  //                                                                                //
  //                                    class path                                      //
  //                                                                                //
  //------------------------------------------------------------------------------------//

  class BOOST_FILESYSTEM_DECL path
  {
  public:

    //  value_type is the character type used by the operating system API to
    //  represent paths.

# ifdef BOOST_WINDOWS_API
    typedef wchar_t                        value_type;
    BOOST_STATIC_CONSTEXPR value_type      separator = L'/';
    BOOST_STATIC_CONSTEXPR value_type      preferred_separator = L'\\';
    BOOST_STATIC_CONSTEXPR value_type      dot = L'.';
# else
    typedef char                           value_type;
    BOOST_STATIC_CONSTEXPR value_type      separator = '/';
    BOOST_STATIC_CONSTEXPR value_type      preferred_separator = '/';
    BOOST_STATIC_CONSTEXPR value_type      dot = '.';
# endif
    typedef std::basic_string<value_type>  string_type;
    typedef std::codecvt<wchar_t, char,
                         std::mbstate_t>   codecvt_type;

    //  ----- character encoding conversions -----

    //  Following the principle of least astonishment, path input arguments
    //  passed to or obtained from the operating system via objects of
    //  class path behave as if they were directly passed to or
    //  obtained from the O/S API, unless conversion is explicitly requested.
    //
    //  POSIX specfies that path strings are passed unchanged to and from the
    //  API. Note that this is different from the POSIX command line utilities,
    //  which convert according to a locale.
    //
    //  Thus for POSIX, char strings do not undergo conversion.  wchar_t strings
    //  are converted to/from char using the path locale or, if a conversion
    //  argument is given, using a conversion object modeled on
    //  std::wstring_convert.
    //
    //  The path locale, which is global to the thread, can be changed by the
    //  imbue() function. It is initialized to an implementation defined locale.
    //
    //  For Windows, wchar_t strings do not undergo conversion. char strings
    //  are converted using the "ANSI" or "OEM" code pages, as determined by
    //  the AreFileApisANSI() function, or, if a conversion argument is given,
    //  using a conversion object modeled on std::wstring_convert.
    //
    //  See m_pathname comments for further important rationale.

    //  TODO: rules needed for operating systems that use / or .
    //  differently, or format directory paths differently from file paths.
    //
    //  **********************************************************************************
    //
    //  More work needed: How to handle an operating system that may have
    //  slash characters or dot characters in valid filenames, either because
    //  it doesn't follow the POSIX standard, or because it allows MBCS
    //  filename encodings that may contain slash or dot characters. For
    //  example, ISO/IEC 2022 (JIS) encoding which allows switching to
    //  JIS x0208-1983 encoding. A valid filename in this set of encodings is
    //  0x1B 0x24 0x42 [switch to X0208-1983] 0x24 0x2F [U+304F Kiragana letter KU]
    //                                             ^^^^
    //  Note that 0x2F is the ASCII slash character
    //
    //  **********************************************************************************

    //  Supported source arguments: half-open iterator range, container, c-array,
    //  and single pointer to null terminated string.

    //  All source arguments except pointers to null terminated byte strings support
    //  multi-byte character strings which may have embedded nulls. Embedded null
    //  support is required for some Asian languages on Windows.

    //  "const codecvt_type& cvt=codecvt()" default arguments are not used because this
    //  limits the impact of locale("") initialization failures on POSIX systems to programs
    //  that actually depend on locale(""). It further ensures that exceptions thrown
    //  as a result of such failues occur after main() has started, so can be caught.

    //  -----  constructors  -----

    path() BOOST_NOEXCEPT {}
    path(const path& p) : m_pathname(p.m_pathname) {}

    template <class Source>
    path(Source const& source,
      typename boost::enable_if<path_traits::is_pathable<
        typename boost::decay<Source>::type> >::type* =0)
    {
      path_traits::dispatch(source, m_pathname);
    }

    path(const value_type* s) : m_pathname(s) {}
    path(value_type* s) : m_pathname(s) {}
    path(const string_type& s) : m_pathname(s) {}
    path(string_type& s) : m_pathname(s) {}

  //  As of October 2015 the interaction between noexcept and =default is so troublesome
  //  for VC++, GCC, and probably other compilers, that =default is not used with noexcept
  //  functions. GCC is not even consistent for the same release on different platforms.

# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
    path(path&& p) BOOST_NOEXCEPT { m_pathname = std::move(p.m_pathname); }
    path& operator=(path&& p) BOOST_NOEXCEPT
      { m_pathname = std::move(p.m_pathname); return *this; }
# endif

    template <class Source>
    path(Source const& source, const codecvt_type& cvt)
    {
      path_traits::dispatch(source, m_pathname, cvt);
    }

    template <class InputIterator>
    path(InputIterator begin, InputIterator end)
    {
      if (begin != end)
      {
        // convert requires contiguous string, so copy
        std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
          seq(begin, end);
        path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname);
      }
    }

    template <class InputIterator>
    path(InputIterator begin, InputIterator end, const codecvt_type& cvt)
    {
      if (begin != end)
      {
        // convert requires contiguous string, so copy
        std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
          seq(begin, end);
        path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt);
      }
    }

    //  -----  assignments  -----

    path& operator=(const path& p)
    {
      m_pathname = p.m_pathname;
      return *this;
    }

    template <class Source>
      typename boost::enable_if<path_traits::is_pathable<
        typename boost::decay<Source>::type>, path&>::type
    operator=(Source const& source)
    {
      m_pathname.clear();
      path_traits::dispatch(source, m_pathname);
      return *this;
    }

    //  value_type overloads

    path& operator=(const value_type* ptr)  // required in case ptr overlaps *this
                                          {m_pathname = ptr; return *this;}
    path& operator=(value_type* ptr)  // required in case ptr overlaps *this
                                          {m_pathname = ptr; return *this;}
    path& operator=(const string_type& s) {m_pathname = s; return *this;}
    path& operator=(string_type& s)       {m_pathname = s; return *this;}

    path& assign(const value_type* ptr, const codecvt_type&)  // required in case ptr overlaps *this
                                          {m_pathname = ptr; return *this;}
    template <class Source>
    path& assign(Source const& source, const codecvt_type& cvt)
    {
      m_pathname.clear();
      path_traits::dispatch(source, m_pathname, cvt);
      return *this;
    }

    template <class InputIterator>
    path& assign(InputIterator begin, InputIterator end)
    {
      m_pathname.clear();
      if (begin != end)
      {
        std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
          seq(begin, end);
        path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname);
      }
      return *this;
    }

    template <class InputIterator>
    path& assign(InputIterator begin, InputIterator end, const codecvt_type& cvt)
    {
      m_pathname.clear();
      if (begin != end)
      {
        std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
          seq(begin, end);
        path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt);
      }
      return *this;
    }

    //  -----  concatenation  -----

    template <class Source>
      typename boost::enable_if<path_traits::is_pathable<
        typename boost::decay<Source>::type>, path&>::type
    operator+=(Source const& source)
    {
      return concat(source);
    }

    //  value_type overloads. Same rationale as for constructors above
    path& operator+=(const path& p)         { m_pathname += p.m_pathname; return *this; }
    path& operator+=(const value_type* ptr) { m_pathname += ptr; return *this; }
    path& operator+=(value_type* ptr)       { m_pathname += ptr; return *this; }
    path& operator+=(const string_type& s)  { m_pathname += s; return *this; }
    path& operator+=(string_type& s)        { m_pathname += s; return *this; }
    path& operator+=(value_type c)          { m_pathname += c; return *this; }

    template <class CharT>
      typename boost::enable_if<is_integral<CharT>, path&>::type
    operator+=(CharT c)
    {
      CharT tmp[2];
      tmp[0] = c;
      tmp[1] = 0;
      return concat(tmp);
    }

    template <class Source>
    path& concat(Source const& source)
    {
      path_traits::dispatch(source, m_pathname);
      return *this;
    }

    template <class Source>
    path& concat(Source const& source, const codecvt_type& cvt)
    {
      path_traits::dispatch(source, m_pathname, cvt);
      return *this;
    }

    template <class InputIterator>
    path& concat(InputIterator begin, InputIterator end)
    {
      if (begin == end)
        return *this;
      std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
        seq(begin, end);
      path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname);
      return *this;
    }

    template <class InputIterator>
    path& concat(InputIterator begin, InputIterator end, const codecvt_type& cvt)
    {
      if (begin == end)
        return *this;
      std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
        seq(begin, end);
      path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt);
      return *this;
    }

    //  -----  appends  -----

    //  if a separator is added, it is the preferred separator for the platform;
    //  slash for POSIX, backslash for Windows

    path& operator/=(const path& p);

    template <class Source>
      typename boost::enable_if<path_traits::is_pathable<
        typename boost::decay<Source>::type>, path&>::type
    operator/=(Source const& source)
    {
      return append(source);
    }

    path& operator/=(const value_type* ptr);
    path& operator/=(value_type* ptr)
    {
      return this->operator/=(const_cast<const value_type*>(ptr));
    }
    path& operator/=(const string_type& s) { return this->operator/=(path(s)); }
    path& operator/=(string_type& s)       { return this->operator/=(path(s)); }

    path& append(const value_type* ptr)  // required in case ptr overlaps *this
    {
      this->operator/=(ptr);
      return *this;
    }

    path& append(const value_type* ptr, const codecvt_type&)  // required in case ptr overlaps *this
    {
      this->operator/=(ptr);
      return *this;
    }

    template <class Source>
    path& append(Source const& source);

    template <class Source>
    path& append(Source const& source, const codecvt_type& cvt);

    template <class InputIterator>
    path& append(InputIterator begin, InputIterator end);

    template <class InputIterator>
    path& append(InputIterator begin, InputIterator end, const codecvt_type& cvt);

    //  -----  modifiers  -----

    void   clear() BOOST_NOEXCEPT             { m_pathname.clear(); }
    path&  make_preferred()
#   ifdef BOOST_POSIX_API
      { return *this; }  // POSIX no effect
#   else // BOOST_WINDOWS_API
      ;  // change slashes to backslashes
#   endif
    path&  remove_filename();
    path&  remove_trailing_separator();
    path&  replace_extension(const path& new_extension = path());
    void   swap(path& rhs) BOOST_NOEXCEPT     { m_pathname.swap(rhs.m_pathname); }

    //  -----  observers  -----

    //  For operating systems that format file paths differently than directory
    //  paths, return values from observers are formatted as file names unless there
    //  is a trailing separator, in which case returns are formatted as directory
    //  paths. POSIX and Windows make no such distinction.

    //  Implementations are permitted to return const values or const references.

    //  The string or path returned by an observer are specified as being formatted
    //  as "native" or "generic".
    //
    //  For POSIX, these are all the same format; slashes and backslashes are as input and
    //  are not modified.
    //
    //  For Windows,   native:    as input; slashes and backslashes are not modified;
    //                            this is the format of the internally stored string.
    //                 generic:   backslashes are converted to slashes

    //  -----  native format observers  -----

    const string_type&  native() const BOOST_NOEXCEPT  { return m_pathname; }
    const value_type*   c_str() const BOOST_NOEXCEPT   { return m_pathname.c_str(); }
    string_type::size_type size() const BOOST_NOEXCEPT { return m_pathname.size(); }

    template <class String>
    String string() const;

    template <class String>
    String string(const codecvt_type& cvt) const;

#   ifdef BOOST_WINDOWS_API
    const std::string string() const
    {
      std::string tmp;
      if (!m_pathname.empty())
        path_traits::convert(&*m_pathname.begin(), &*m_pathname.begin()+m_pathname.size(),
        tmp);
      return tmp;
    }
    const std::string string(const codecvt_type& cvt) const
    {
      std::string tmp;
      if (!m_pathname.empty())
        path_traits::convert(&*m_pathname.begin(), &*m_pathname.begin()+m_pathname.size(),
          tmp, cvt);
      return tmp;
    }

    //  string_type is std::wstring, so there is no conversion
    const std::wstring&  wstring() const { return m_pathname; }
    const std::wstring&  wstring(const codecvt_type&) const { return m_pathname; }

#   else   // BOOST_POSIX_API
    //  string_type is std::string, so there is no conversion
    const std::string&  string() const { return m_pathname; }
    const std::string&  string(const codecvt_type&) const { return m_pathname; }

    const std::wstring  wstring() const
    {
      std::wstring tmp;
      if (!m_pathname.empty())
        path_traits::convert(&*m_pathname.begin(), &*m_pathname.begin()+m_pathname.size(),
          tmp);
      return tmp;
    }
    const std::wstring  wstring(const codecvt_type& cvt) const
    {
      std::wstring tmp;
      if (!m_pathname.empty())
        path_traits::convert(&*m_pathname.begin(), &*m_pathname.begin()+m_pathname.size(),
          tmp, cvt);
      return tmp;
    }

#   endif

    //  -----  generic format observers  -----

    //  Experimental generic function returning generic formatted path (i.e. separators
    //  are forward slashes). Motivation: simpler than a family of generic_*string
    //  functions.
    path generic_path() const
    {
#   ifdef BOOST_WINDOWS_API
      path tmp;
      std::replace_copy(m_pathname.begin(), m_pathname.end(),
        std::back_inserter(tmp.m_pathname), L'\\', L'/');
      return tmp;
#   else
      return path(*this);
#   endif
    }

    template <class String>
    String generic_string() const;

    template <class String>
    String generic_string(const codecvt_type& cvt) const;

#   ifdef BOOST_WINDOWS_API
    const std::string   generic_string() const;
    const std::string   generic_string(const codecvt_type& cvt) const;
    const std::wstring  generic_wstring() const;
    const std::wstring  generic_wstring(const codecvt_type&) const { return generic_wstring(); };

#   else // BOOST_POSIX_API
    //  On POSIX-like systems, the generic format is the same as the native format
    const std::string&  generic_string() const  { return m_pathname; }
    const std::string&  generic_string(const codecvt_type&) const  { return m_pathname; }
    const std::wstring  generic_wstring() const { return wstring(); }
    const std::wstring  generic_wstring(const codecvt_type& cvt) const { return wstring(cvt); }

#   endif

    //  -----  compare  -----

    int compare(const path& p) const BOOST_NOEXCEPT;  // generic, lexicographical
    int compare(const std::string& s) const { return compare(path(s)); }
    int compare(const value_type* s) const  { return compare(path(s)); }

    //  -----  decomposition  -----

    path  root_path() const;
    path  root_name() const;         // returns 0 or 1 element path
                                     // even on POSIX, root_name() is non-empty() for network paths
    path  root_directory() const;    // returns 0 or 1 element path
    path  relative_path() const;
    path  parent_path() const;
    path  filename() const;          // returns 0 or 1 element path
    path  stem() const;              // returns 0 or 1 element path
    path  extension() const;         // returns 0 or 1 element path

    //  -----  query  -----

    bool empty() const BOOST_NOEXCEPT{ return m_pathname.empty(); }
    bool filename_is_dot() const;
    bool filename_is_dot_dot() const;
    bool has_root_path() const       { return has_root_directory() || has_root_name(); }
    bool has_root_name() const       { return !root_name().empty(); }
    bool has_root_directory() const  { return !root_directory().empty(); }
    bool has_relative_path() const   { return !relative_path().empty(); }
    bool has_parent_path() const     { return !parent_path().empty(); }
    bool has_filename() const        { return !m_pathname.empty(); }
    bool has_stem() const            { return !stem().empty(); }
    bool has_extension() const       { return !extension().empty(); }
    bool is_relative() const         { return !is_absolute(); }
    bool is_absolute() const
    {
#     ifdef BOOST_WINDOWS_API
      return has_root_name() && has_root_directory();
#     else
      return has_root_directory();
#     endif
    }

    //  -----  lexical operations  -----

    path  lexically_normal() const;
    path  lexically_relative(const path& base) const;
    path  lexically_proximate(const path& base) const
    {
      path tmp(lexically_relative(base));
      return tmp.empty() ? *this : tmp;
    }

    //  -----  iterators  -----

    class iterator;
    typedef iterator const_iterator;
    class reverse_iterator;
    typedef reverse_iterator const_reverse_iterator;

    iterator begin() const;
    iterator end() const;
    reverse_iterator rbegin() const;
    reverse_iterator rend() const;

    //  -----  static member functions  -----

    static std::locale          imbue(const std::locale& loc);
    static const codecvt_type&  codecvt();

    //  -----  deprecated functions  -----

# if defined(BOOST_FILESYSTEM_DEPRECATED) && defined(BOOST_FILESYSTEM_NO_DEPRECATED)
#   error both BOOST_FILESYSTEM_DEPRECATED and BOOST_FILESYSTEM_NO_DEPRECATED are defined
# endif

# if !defined(BOOST_FILESYSTEM_NO_DEPRECATED)
    //  recently deprecated functions supplied by default
    path&  normalize()              {
                                      path tmp(lexically_normal());
                                      m_pathname.swap(tmp.m_pathname);
                                      return *this;
                                    }
    path&  remove_leaf()            { return remove_filename(); }
    path   leaf() const             { return filename(); }
    path   branch_path() const      { return parent_path(); }
    path   generic() const          { return generic_path(); }
    bool   has_leaf() const         { return !m_pathname.empty(); }
    bool   has_branch_path() const  { return !parent_path().empty(); }
    bool   is_complete() const      { return is_absolute(); }
# endif

# if defined(BOOST_FILESYSTEM_DEPRECATED)
    //  deprecated functions with enough signature or semantic changes that they are
    //  not supplied by default
    const std::string file_string() const               { return string(); }
    const std::string directory_string() const          { return string(); }
    const std::string native_file_string() const        { return string(); }
    const std::string native_directory_string() const   { return string(); }
    const string_type external_file_string() const      { return native(); }
    const string_type external_directory_string() const { return native(); }

    //  older functions no longer supported
    //typedef bool (*name_check)(const std::string & name);
    //basic_path(const string_type& str, name_check) { operator/=(str); }
    //basic_path(const typename string_type::value_type* s, name_check)
    //  { operator/=(s);}
    //static bool default_name_check_writable() { return false; }
    //static void default_name_check(name_check) {}
    //static name_check default_name_check() { return 0; }
    //basic_path& canonize();
# endif

//--------------------------------------------------------------------------------------//
//                            class path private members                                //
//--------------------------------------------------------------------------------------//

  private:

#   if defined(_MSC_VER)
#     pragma warning(push) // Save warning settings
#     pragma warning(disable : 4251) // disable warning: class 'std::basic_string<_Elem,_Traits,_Ax>'
#   endif                            // needs to have dll-interface...
/*
      m_pathname has the type, encoding, and format required by the native
      operating system. Thus for POSIX and Windows there is no conversion for
      passing m_pathname.c_str() to the O/S API or when obtaining a path from the
      O/S API. POSIX encoding is unspecified other than for dot and slash
      characters; POSIX just treats paths as a sequence of bytes. Windows
      encoding is UCS-2 or UTF-16 depending on the version.
*/
    string_type  m_pathname;  // Windows: as input; backslashes NOT converted to slashes,
                              // slashes NOT converted to backslashes
#   if defined(_MSC_VER)
#     pragma warning(pop) // restore warning settings.
#   endif

    string_type::size_type m_append_separator_if_needed();
    //  Returns: If separator is to be appended, m_pathname.size() before append. Otherwise 0.
    //  Note: An append is never performed if size()==0, so a returned 0 is unambiguous.

    void m_erase_redundant_separator(string_type::size_type sep_pos);
    string_type::size_type m_parent_path_end() const;

    path& m_normalize();

    // Was qualified; como433beta8 reports:
    //    warning #427-D: qualified name is not allowed in member declaration
    friend class iterator;
    friend bool operator<(const path& lhs, const path& rhs);

    // see path::iterator::increment/decrement comment below
    static void m_path_iterator_increment(path::iterator & it);
    static void m_path_iterator_decrement(path::iterator & it);

  };  // class path

  namespace detail
  {
    BOOST_FILESYSTEM_DECL
      int lex_compare(path::iterator first1, path::iterator last1,
        path::iterator first2, path::iterator last2);
    BOOST_FILESYSTEM_DECL
      const path&  dot_path();
    BOOST_FILESYSTEM_DECL
      const path&  dot_dot_path();
  }

# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
  typedef path wpath;
# endif

  //------------------------------------------------------------------------------------//
  //                             class path::iterator                                   //
  //------------------------------------------------------------------------------------//

  class path::iterator
    : public boost::iterator_facade<
      path::iterator,
      path const,
      boost::bidirectional_traversal_tag >
  {
  private:
    friend class boost::iterator_core_access;
    friend class boost::filesystem::path;
    friend class boost::filesystem::path::reverse_iterator;
    friend void m_path_iterator_increment(path::iterator & it);
    friend void m_path_iterator_decrement(path::iterator & it);

    const path& dereference() const { return m_element; }

    bool equal(const iterator & rhs) const
    {
      return m_path_ptr == rhs.m_path_ptr && m_pos == rhs.m_pos;
    }

    // iterator_facade derived classes don't seem to like implementations in
    // separate translation unit dll's, so forward to class path static members
    void increment() { m_path_iterator_increment(*this); }
    void decrement() { m_path_iterator_decrement(*this); }

    path                    m_element;   // current element
    const path*             m_path_ptr;  // path being iterated over
    string_type::size_type  m_pos;       // position of m_element in
                                         // m_path_ptr->m_pathname.
                                         // if m_element is implicit dot, m_pos is the
                                         // position of the last separator in the path.
                                         // end() iterator is indicated by
                                         // m_pos == m_path_ptr->m_pathname.size()
  }; // path::iterator

  //------------------------------------------------------------------------------------//
  //                         class path::reverse_iterator                               //
  //------------------------------------------------------------------------------------//

  class path::reverse_iterator
    : public boost::iterator_facade<
      path::reverse_iterator,
      path const,
      boost::bidirectional_traversal_tag >
  {
  public:

    explicit reverse_iterator(iterator itr) : m_itr(itr)
    {
      if (itr != itr.m_path_ptr->begin())
        m_element = *--itr;
    }
  private:
    friend class boost::iterator_core_access;
    friend class boost::filesystem::path;

    const path& dereference() const { return m_element; }
    bool equal(const reverse_iterator& rhs) const { return m_itr == rhs.m_itr; }
    void increment()
    {
      --m_itr;
      if (m_itr != m_itr.m_path_ptr->begin())
      {
        iterator tmp = m_itr;
        m_element = *--tmp;
      }
    }
    void decrement()
    {
      m_element = *m_itr;
      ++m_itr;
    }

    iterator m_itr;
    path     m_element;

  }; // path::reverse_iterator

  //------------------------------------------------------------------------------------//
  //                                                                                //
  //                              non-member functions                                  //
  //                                                                                //
  //------------------------------------------------------------------------------------//

  //  std::lexicographical_compare would infinately recurse because path iterators
  //  yield paths, so provide a path aware version
  inline bool lexicographical_compare(path::iterator first1, path::iterator last1,
    path::iterator first2, path::iterator last2)
    { return detail::lex_compare(first1, last1, first2, last2) < 0; }

  inline bool operator==(const path& lhs, const path& rhs)              {return lhs.compare(rhs) == 0;}
  inline bool operator==(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) == 0;}
  inline bool operator==(const path::string_type& lhs, const path& rhs) {return rhs.compare(lhs) == 0;}
  inline bool operator==(const path& lhs, const path::value_type* rhs)  {return lhs.compare(rhs) == 0;}
  inline bool operator==(const path::value_type* lhs, const path& rhs)  {return rhs.compare(lhs) == 0;}

  inline bool operator!=(const path& lhs, const path& rhs)              {return lhs.compare(rhs) != 0;}
  inline bool operator!=(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) != 0;}
  inline bool operator!=(const path::string_type& lhs, const path& rhs) {return rhs.compare(lhs) != 0;}
  inline bool operator!=(const path& lhs, const path::value_type* rhs)  {return lhs.compare(rhs) != 0;}
  inline bool operator!=(const path::value_type* lhs, const path& rhs)  {return rhs.compare(lhs) != 0;}

  // TODO: why do == and != have additional overloads, but the others don't?

  inline bool operator<(const path& lhs, const path& rhs)  {return lhs.compare(rhs) < 0;}
  inline bool operator<=(const path& lhs, const path& rhs) {return !(rhs < lhs);}
  inline bool operator> (const path& lhs, const path& rhs) {return rhs < lhs;}
  inline bool operator>=(const path& lhs, const path& rhs) {return !(lhs < rhs);}

  inline std::size_t hash_value(const path& x)
  {
# ifdef BOOST_WINDOWS_API
    std::size_t seed = 0;
    for(const path::value_type* it = x.c_str(); *it; ++it)
      hash_combine(seed, *it == '/' ? L'\\' : *it);
    return seed;
# else   // BOOST_POSIX_API
    return hash_range(x.native().begin(), x.native().end());
# endif
  }

  inline void swap(path& lhs, path& rhs)                   { lhs.swap(rhs); }

  inline path operator/(const path& lhs, const path& rhs)  { return path(lhs) /= rhs; }

  //  inserters and extractors
  //    use boost::io::quoted() to handle spaces in paths
  //    use '&' as escape character to ease use for Windows paths

  template <class Char, class Traits>
  inline std::basic_ostream<Char, Traits>&
  operator<<(std::basic_ostream<Char, Traits>& os, const path& p)
  {
    return os
      << boost::io::quoted(p.template string<std::basic_string<Char> >(), static_cast<Char>('&'));
  }

  template <class Char, class Traits>
  inline std::basic_istream<Char, Traits>&
  operator>>(std::basic_istream<Char, Traits>& is, path& p)
  {
    std::basic_string<Char> str;
    is >> boost::io::quoted(str, static_cast<Char>('&'));
    p = str;
    return is;
  }

  //  name_checks

  //  These functions are holdovers from version 1. It isn't clear they have much
  //  usefulness, or how to generalize them for later versions.

  BOOST_FILESYSTEM_DECL bool portable_posix_name(const std::string & name);
  BOOST_FILESYSTEM_DECL bool windows_name(const std::string & name);
  BOOST_FILESYSTEM_DECL bool portable_name(const std::string & name);
  BOOST_FILESYSTEM_DECL bool portable_directory_name(const std::string & name);
  BOOST_FILESYSTEM_DECL bool portable_file_name(const std::string & name);
  BOOST_FILESYSTEM_DECL bool native(const std::string & name);

  namespace detail
  {
    //  For POSIX, is_directory_separator() and is_element_separator() are identical since
    //  a forward slash is the only valid directory separator and also the only valid
    //  element separator. For Windows, forward slash and back slash are the possible
    //  directory separators, but colon (example: "c:foo") is also an element separator.

    inline bool is_directory_separator(path::value_type c) BOOST_NOEXCEPT
    {
      return c == path::separator
#     ifdef BOOST_WINDOWS_API
        || c == path::preferred_separator
#     endif
      ;
    }
    inline bool is_element_separator(path::value_type c) BOOST_NOEXCEPT
    {
      return c == path::separator
#     ifdef BOOST_WINDOWS_API
        || c == path::preferred_separator || c == L':'
#     endif
      ;
    }
  }  // namespace detail

  //------------------------------------------------------------------------------------//
  //                  class path miscellaneous function implementations                 //
  //------------------------------------------------------------------------------------//

  inline path::reverse_iterator path::rbegin() const { return reverse_iterator(end()); }
  inline path::reverse_iterator path::rend() const   { return reverse_iterator(begin()); }

  inline bool path::filename_is_dot() const
  {
    // implicit dot is tricky, so actually call filename(); see path::filename() example
    // in reference.html
    path p(filename());
    return p.size() == 1 && *p.c_str() == dot;
  }

  inline bool path::filename_is_dot_dot() const
  {
    return size() >= 2 && m_pathname[size()-1] == dot && m_pathname[size()-2] == dot
      && (m_pathname.size() == 2 || detail::is_element_separator(m_pathname[size()-3]));
      // use detail::is_element_separator() rather than detail::is_directory_separator
      // to deal with "c:.." edge case on Windows when ':' acts as a separator
  }

//--------------------------------------------------------------------------------------//
//                     class path member template implementation                        //
//--------------------------------------------------------------------------------------//

  template <class InputIterator>
  path& path::append(InputIterator begin, InputIterator end)
  {
    if (begin == end)
      return *this;
    string_type::size_type sep_pos(m_append_separator_if_needed());
    std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
      seq(begin, end);
    path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname);
    if (sep_pos)
      m_erase_redundant_separator(sep_pos);
    return *this;
  }

  template <class InputIterator>
  path& path::append(InputIterator begin, InputIterator end, const codecvt_type& cvt)
  {
    if (begin == end)
      return *this;
    string_type::size_type sep_pos(m_append_separator_if_needed());
    std::basic_string<typename std::iterator_traits<InputIterator>::value_type>
      seq(begin, end);
    path_traits::convert(seq.c_str(), seq.c_str()+seq.size(), m_pathname, cvt);
    if (sep_pos)
      m_erase_redundant_separator(sep_pos);
    return *this;
  }

  template <class Source>
  path& path::append(Source const& source)
  {
    if (path_traits::empty(source))
      return *this;
    string_type::size_type sep_pos(m_append_separator_if_needed());
    path_traits::dispatch(source, m_pathname);
    if (sep_pos)
      m_erase_redundant_separator(sep_pos);
    return *this;
  }

  template <class Source>
  path& path::append(Source const& source, const codecvt_type& cvt)
  {
    if (path_traits::empty(source))
      return *this;
    string_type::size_type sep_pos(m_append_separator_if_needed());
    path_traits::dispatch(source, m_pathname, cvt);
    if (sep_pos)
      m_erase_redundant_separator(sep_pos);
    return *this;
  }

//--------------------------------------------------------------------------------------//
//                     class path member template specializations                       //
//--------------------------------------------------------------------------------------//

  template <> inline
  std::string path::string<std::string>() const
    { return string(); }

  template <> inline
  std::wstring path::string<std::wstring>() const
    { return wstring(); }

  template <> inline
  std::string path::string<std::string>(const codecvt_type& cvt) const
    { return string(cvt); }

  template <> inline
  std::wstring path::string<std::wstring>(const codecvt_type& cvt) const
    { return wstring(cvt); }

  template <> inline
  std::string path::generic_string<std::string>() const
    { return generic_string(); }

  template <> inline
  std::wstring path::generic_string<std::wstring>() const
    { return generic_wstring(); }

  template <> inline
  std::string path::generic_string<std::string>(const codecvt_type& cvt) const
    { return generic_string(cvt); }

  template <> inline
  std::wstring path::generic_string<std::wstring>(const codecvt_type& cvt) const
    { return generic_wstring(cvt); }

  //--------------------------------------------------------------------------------------//
  //                     path_traits convert function implementations                     //
  //                        requiring path::codecvt() be visable                          //
  //--------------------------------------------------------------------------------------//

namespace path_traits
{  //  without codecvt

  inline
    void convert(const char* from,
    const char* from_end,    // 0 for null terminated MBCS
    std::wstring & to)
  {
    convert(from, from_end, to, path::codecvt());
  }

  inline
    void convert(const wchar_t* from,
    const wchar_t* from_end,  // 0 for null terminated MBCS
    std::string & to)
  {
    convert(from, from_end, to, path::codecvt());
  }

  inline
    void convert(const char* from,
    std::wstring & to)
  {
    BOOST_ASSERT(from);
    convert(from, 0, to, path::codecvt());
  }

  inline
    void convert(const wchar_t* from,
    std::string & to)
  {
    BOOST_ASSERT(from);
    convert(from, 0, to, path::codecvt());
  }
}  // namespace path_traits
}  // namespace filesystem
}  // namespace boost

//----------------------------------------------------------------------------//

#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas

#endif  // BOOST_FILESYSTEM_PATH_HPP


code:
#ifndef BOOST_ARCHIVE_ITERATORS_OSTREAM_ITERATOR_HPP
#define BOOST_ARCHIVE_ITERATORS_OSTREAM_ITERATOR_HPP

// MS compatible compilers support #pragma once
#if defined(_MSC_VER)
# pragma once
#endif

/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// ostream_iterator.hpp

// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

//  See http://www.boost.org for updates, documentation, and revision history.

// note: this is a custom version of the standard ostream_iterator.
// This is necessary as the standard version doesn't work as expected
// for wchar_t based streams on systems for which wchar_t not a true
// type but rather a synonym for some integer type.

#include <ostream>
#include <boost/iterator/iterator_facade.hpp>

namespace boost {
namespace archive {
namespace iterators {

// given a type, make an input iterator based on a pointer to that type
template<class Elem>
class ostream_iterator :
    public boost::iterator_facade<
        ostream_iterator<Elem>,
        Elem,
        std::output_iterator_tag,
        ostream_iterator<Elem> &
    >
{
    friend class boost::iterator_core_access;
    typedef ostream_iterator this_t ;
    typedef Elem char_type;
    typedef std::basic_ostream<char_type> ostream_type;

    //emulate the behavior of std::ostream
    ostream_iterator & dereference() const {
        return const_cast<ostream_iterator &>(*this);
    }
    bool equal(const this_t & rhs) const {
        return m_ostream == rhs.m_ostream;
    }
    void increment(){}
protected:
    ostream_type *m_ostream;
    void put_val(char_type e){
        if(NULL != m_ostream){
            m_ostream->put(e);
            if(! m_ostream->good())
                m_ostream = NULL;
        }
    }
public:
    this_t & operator=(char_type c){
        put_val(c);
        return *this;
    }
    ostream_iterator(ostream_type & os) :
        m_ostream (& os)
    {}
    ostream_iterator() :
        m_ostream (NULL)
    {}
    ostream_iterator(const ostream_iterator & rhs) :
        m_ostream (rhs.m_ostream)
    {}
};

} // namespace iterators
} // namespace archive
} // namespace boost

#endif // BOOST_ARCHIVE_ITERATORS_OSTREAM_ITERATOR_HPP


code:
#ifndef BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED
#define BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED

// Copyright Aleksey Gurtovoy 2002-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.

// $Id$
// $Date$
// $Revision$

#include <boost/mpl/aux_/config/adl.hpp>
#include <boost/mpl/aux_/config/gcc.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>

#if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE)

#   define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE mpl_
#   define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace mpl_ {
#   define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE }
#   define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) \
    namespace boost { namespace mpl { \
    using ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::type; \
    } } \
/**/

#if !defined(BOOST_MPL_PREPROCESSING_MODE)
namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE { namespace aux {} }
namespace boost { namespace mpl { using namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE;
namespace aux { using namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux; }
}}
#endif

#else // BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE

#   define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE boost::mpl
#   define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace boost { namespace mpl {
#   define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE }}
#   define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) /**/

#endif

#endif // BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED