view release on metacpan or search on metacpan
src/boost/archive/add_facet.hpp view on Meta::CPAN
#ifndef BOOST_ARCHIVE_ADD_FACET_HPP
#define BOOST_ARCHIVE_ADD_FACET_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// add_facet.hpp
// (C) Copyright 2003 Robert Ramey - http://www.rrsd.com .
src/boost/archive/add_facet.hpp view on Meta::CPAN
// standard compatible
new std::locale(l, f);
#endif
}
} // namespace archive
} // namespace boost
#undef BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT
#endif // BOOST_ARCHIVE_ADD_FACET_HPP
src/boost/archive/detail/utf8_codecvt_facet.hpp view on Meta::CPAN
// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu)
// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu).
// 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_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP
#define BOOST_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP
#define BOOST_UTF8_BEGIN_NAMESPACE \
namespace boost { namespace archive { namespace detail {
#define BOOST_UTF8_DECL
#define BOOST_UTF8_END_NAMESPACE }}}
#include <boost/detail/utf8_codecvt_facet.hpp>
#undef BOOST_UTF8_END_NAMESPACE
#undef BOOST_UTF8_DECL
#undef BOOST_UTF8_BEGIN_NAMESPACE
#endif // BOOST_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP
src/boost/config/compiler/borland.hpp view on Meta::CPAN
#define BOOST_NO_SFINAE_EXPR
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
#define BOOST_NO_CXX11_UNICODE_LITERALS // UTF-8 still not supported
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_CXX11_NOEXCEPT
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#if __BORLANDC__ >= 0x590
# define BOOST_HAS_TR1_HASH
# define BOOST_HAS_MACRO_USE_FACET
#endif
//
// Post 0x561 we have long long and stdint.h:
#if __BORLANDC__ >= 0x561
# ifndef __NO_LONG_LONG
# define BOOST_HAS_LONG_LONG
# else
# define BOOST_NO_LONG_LONG
# endif
src/boost/config/compiler/codegear.hpp view on Meta::CPAN
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
//
// TR1 macros:
//
#define BOOST_HAS_TR1_HASH
#define BOOST_HAS_TR1_TYPE_TRAITS
#define BOOST_HAS_TR1_UNORDERED_MAP
#define BOOST_HAS_TR1_UNORDERED_SET
#define BOOST_HAS_MACRO_USE_FACET
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
// On non-Win32 platforms let the platform config figure this out:
#ifdef _WIN32
# define BOOST_HAS_STDINT_H
#endif
//
// __int64:
src/boost/config/stdlib/dinkumware.hpp view on Meta::CPAN
// fully conforming provided the compiler supports it:
# if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(__BORLANDC__) && !defined(_STD) && !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h
# define BOOST_NO_STDC_NAMESPACE
# endif
# if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND+0 > 0)) && !(defined(_MSC_VER) && (_MSC_VER > 1300)) && defined(BOOST_MSVC)
# define BOOST_NO_STD_ALLOCATOR
# endif
# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
# if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
// if this lib version is set up for vc6 then there is no std::use_facet:
# define BOOST_NO_STD_USE_FACET
# define BOOST_HAS_TWO_ARG_USE_FACET
// C lib functions aren't in namespace std either:
# define BOOST_NO_STDC_NAMESPACE
// and nor is <exception>
# define BOOST_NO_EXCEPTION_STD_NAMESPACE
# endif
// There's no numeric_limits<long long> support unless _LONGLONG is defined:
# if !defined(_LONGLONG) && (_CPPLIB_VER <= 310)
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
# endif
// 3.06 appears to have (non-sgi versions of) <hash_set> & <hash_map>,
// and no <slist> at all
#else
# define BOOST_MSVC_STD_ITERATOR 1
# define BOOST_NO_STD_ITERATOR
# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
# define BOOST_NO_STD_ALLOCATOR
# define BOOST_NO_STDC_NAMESPACE
# define BOOST_NO_STD_USE_FACET
# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN
# define BOOST_HAS_MACRO_USE_FACET
# ifndef _CPPLIB_VER
// Updated Dinkum library defines this, and provides
// its own min and max definitions, as does MTA version.
# ifndef __MTA__
# define BOOST_NO_STD_MIN_MAX
# endif
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
# endif
#endif
src/boost/config/stdlib/msl.hpp view on Meta::CPAN
# endif
// boilerplate code:
# include <boost/config/posix_features.hpp>
#endif
#if defined(_MWMT) || _MSL_THREADSAFE
# define BOOST_HAS_THREADS
#endif
#ifdef _MSL_NO_EXPLICIT_FUNC_TEMPLATE_ARG
# define BOOST_NO_STD_USE_FACET
# define BOOST_HAS_TWO_ARG_USE_FACET
#endif
// C++0x headers not yet implemented
//
# define BOOST_NO_CXX11_HDR_ARRAY
# define BOOST_NO_CXX11_HDR_CHRONO
# define BOOST_NO_CXX11_HDR_CODECVT
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
# define BOOST_NO_CXX11_HDR_FORWARD_LIST
# define BOOST_NO_CXX11_HDR_FUTURE
src/boost/config/stdlib/roguewave.hpp view on Meta::CPAN
// on HP aCC systems even though the allocator is in fact broken):
//
#if !defined(_RWSTD_ALLOCATOR) || (defined(__HP_aCC) && __HP_aCC <= 33100)
# define BOOST_NO_STD_ALLOCATOR
#endif
//
// If we have a std::locale, we still may not have std::use_facet:
//
#if defined(_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE) && !defined(BOOST_NO_STD_LOCALE)
# define BOOST_NO_STD_USE_FACET
# define BOOST_HAS_TWO_ARG_USE_FACET
#endif
//
// There's no std::distance prior to version 2, or without
// partial specialization support:
//
#if (BOOST_RWSTD_VER < 0x020000) || defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
#define BOOST_NO_STD_DISTANCE
#endif
src/boost/config/stdlib/stlport.hpp view on Meta::CPAN
#endif
#ifdef _STLP_VENDOR_CSTD
namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; }
#endif
#endif
//
// std::use_facet may be non-standard, uses a class instead:
//
#if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)
# define BOOST_NO_STD_USE_FACET
# define BOOST_HAS_STLP_USE_FACET
#endif
//
// If STLport thinks there are no wide functions, <cwchar> etc. is not working; but
// only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import
// into std:: ourselves).
//
#if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE)
# define BOOST_NO_CWCHAR
# define BOOST_NO_CWCTYPE
src/boost/config/stdlib/vacpp.hpp view on Meta::CPAN
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for most recent version.
#if __IBMCPP__ <= 501
# define BOOST_NO_STD_ALLOCATOR
#endif
#define BOOST_HAS_MACRO_USE_FACET
#define BOOST_NO_STD_MESSAGES
// Apple doesn't seem to reliably defined a *unix* macro
#if !defined(CYGWIN) && ( defined(__unix__) \
|| defined(__unix) \
|| defined(unix) \
|| defined(__APPLE__) \
|| defined(__APPLE) \
|| defined(APPLE))
# include <unistd.h>
src/boost/config/suffix.hpp view on Meta::CPAN
//
// If we have a standard allocator, then we have a partial one as well:
//
#if !defined(BOOST_NO_STD_ALLOCATOR)
# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
#endif
//
// We can't have a working std::use_facet if there is no std::locale:
//
# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET)
# define BOOST_NO_STD_USE_FACET
# endif
//
// We can't have a std::messages facet if there is no std::locale:
//
# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES)
# define BOOST_NO_STD_MESSAGES
# endif
//
src/boost/config/suffix.hpp view on Meta::CPAN
// constant members, we must use enums as a workaround if we want the constants
// to be available at compile-time. This macro gives us a convenient way to
// declare such constants.
# ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
# define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment }
# else
# define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment
# endif
// BOOST_USE_FACET / HAS_FACET workaround ----------------------------------//
// When the standard library does not have a conforming std::use_facet there
// are various workarounds available, but they differ from library to library.
// The same problem occurs with has_facet.
// These macros provide a consistent way to access a locale's facets.
// Usage:
// replace
// std::use_facet<Type>(loc);
// with
// BOOST_USE_FACET(Type, loc);
// Note do not add a std:: prefix to the front of BOOST_USE_FACET!
// Use for BOOST_HAS_FACET is analogous.
#if defined(BOOST_NO_STD_USE_FACET)
# ifdef BOOST_HAS_TWO_ARG_USE_FACET
# define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast<Type*>(0))
# define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast<Type*>(0))
# elif defined(BOOST_HAS_MACRO_USE_FACET)
# define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type)
# define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type)
# elif defined(BOOST_HAS_STLP_USE_FACET)
# define BOOST_USE_FACET(Type, loc) (*std::_Use_facet<Type >(loc))
# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
# endif
#else
# define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc)
# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
#endif
// BOOST_NESTED_TEMPLATE workaround ------------------------------------------//
// Member templates are supported by some compilers even though they can't use
// the A::template member<U> syntax, as a workaround replace:
//
// typedef typename A::template rebind<U> binder;
//
// with:
//
src/boost/detail/utf8_codecvt_facet.hpp view on Meta::CPAN
// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu)
// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu).
// Distributed under the Boost Software License, Version 1.0. (See accompany-
// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UTF8_CODECVT_FACET_HPP
#define BOOST_UTF8_CODECVT_FACET_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// utf8_codecvt_facet.hpp
// This header defines class utf8_codecvt_facet, derived fro
src/boost/detail/utf8_codecvt_facet.hpp view on Meta::CPAN
#endif
// Largest possible value do_length(state,from,from_end,1) could return.
virtual int do_max_length() const throw () {
return 6; // largest UTF-8 encoding of a UCS-4 character
}
};
BOOST_UTF8_END_NAMESPACE
#endif // BOOST_UTF8_CODECVT_FACET_HPP
src/boost/dynamic_bitset/config.hpp view on Meta::CPAN
#define BOOST_DYNAMIC_BITSET_PRIVATE private
#endif
// A couple of macros to cope with libraries without locale
// support. The first macro must be used to declare a reference
// to a ctype facet. The second one to widen a char by using
// that ctype object. If facets and locales aren't available
// the first macro is a no-op and the second one just expands
// to its parameter c.
//
#if defined (BOOST_USE_FACET)
#define BOOST_DYNAMIC_BITSET_CTYPE_FACET(ch, name, loc) \
const std::ctype<ch> & name = \
BOOST_USE_FACET(std::ctype<ch>, loc) /**/
#define BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, c) \
(fac.widen(c))
#else
#define BOOST_DYNAMIC_BITSET_CTYPE_FACET(ch, name, loc) /**/
#define BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, c) c
#endif
#endif // include guard
src/boost/dynamic_bitset/dynamic_bitset.hpp view on Meta::CPAN
typedef typename std::basic_string<CharT, Traits, Alloc> StrT;
typedef typename StrT::traits_type Tr;
const typename StrT::size_type rlen = (std::min)(n, s.size() - pos);
const size_type sz = ( num_bits != npos? num_bits : rlen);
m_bits.resize(calc_num_blocks(sz));
m_num_bits = sz;
BOOST_DYNAMIC_BITSET_CTYPE_FACET(CharT, fac, std::locale());
const CharT one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1');
const size_type m = num_bits < rlen ? num_bits : rlen;
typename StrT::size_type i = 0;
for( ; i < m; ++i) {
const CharT c = s[(pos + m - 1) - i];
assert( Tr::eq(c, one)
|| Tr::eq(c, BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0')) );
src/boost/dynamic_bitset/dynamic_bitset.hpp view on Meta::CPAN
// conversions
template <typename B, typename A, typename stringT>
void to_string_helper(const dynamic_bitset<B, A> & b, stringT & s,
bool dump_all)
{
typedef typename stringT::traits_type Tr;
typedef typename stringT::value_type Ch;
BOOST_DYNAMIC_BITSET_CTYPE_FACET(Ch, fac, std::locale());
const Ch zero = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0');
const Ch one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1');
// Note that this function may access (when
// dump_all == true) bits beyond position size() - 1
typedef typename dynamic_bitset<B, A>::size_type size_type;
const size_type len = dump_all?
dynamic_bitset<B, A>::bits_per_block * b.num_blocks():
src/boost/dynamic_bitset/dynamic_bitset.hpp view on Meta::CPAN
{
using namespace std;
const ios_base::iostate ok = ios_base::goodbit;
ios_base::iostate err = ok;
typename basic_ostream<Ch, Tr>::sentry cerberos(os);
if (cerberos) {
BOOST_DYNAMIC_BITSET_CTYPE_FACET(Ch, fac, os.getloc());
const Ch zero = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0');
const Ch one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1');
try {
typedef typename dynamic_bitset<Block, Alloc>::size_type bitsetsize_type;
typedef basic_streambuf<Ch, Tr> buffer_type;
buffer_type * buf = os.rdbuf();
size_t npad = os.width() <= 0 // careful: os.width() is signed (and can be < 0)
src/boost/dynamic_bitset/dynamic_bitset.hpp view on Meta::CPAN
const streamsize w = is.width();
const size_type limit = 0 < w && static_cast<size_type>(w) < b.max_size()?
w : b.max_size();
ios_base::iostate err = ios_base::goodbit;
typename basic_istream<Ch, Tr>::sentry cerberos(is); // skips whitespaces
if(cerberos) {
// in accordance with prop. resol. of lib DR 303 [last checked 4 Feb 2004]
BOOST_DYNAMIC_BITSET_CTYPE_FACET(Ch, fac, is.getloc());
const Ch zero = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0');
const Ch one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1');
b.clear();
try {
typename bitset_type::bit_appender appender(b);
basic_streambuf <Ch, Tr> * buf = is.rdbuf();
typename Tr::int_type c = buf->sgetc();
for( ; appender.get_count() < limit; c = buf->snextc() ) {
src/boost/format/format_implementation.hpp view on Meta::CPAN
unsigned char basic_format<Ch,Tr, Alloc>:: exceptions(unsigned char newexcept) {
unsigned char swp = exceptions_;
exceptions_ = newexcept;
return swp;
}
template<class Ch, class Tr, class Alloc>
void basic_format<Ch, Tr, Alloc>::
make_or_reuse_data (std::size_t nbitems) {
#if !defined(BOOST_NO_STD_LOCALE)
Ch fill = ( BOOST_USE_FACET(std::ctype<Ch>, getloc()) ). widen(' ');
#else
Ch fill = ' ';
#endif
if(items_.size() == 0)
items_.assign( nbitems, format_item_t(fill) );
else {
if(nbitems>items_.size())
items_.resize(nbitems, format_item_t(fill));
bound_.resize(0);
for(std::size_t i=0; i < nbitems; ++i)
src/boost/format/parsing.hpp view on Meta::CPAN
// -----------------------------------------------
// format :: parse(..)
template<class Ch, class Tr, class Alloc>
basic_format<Ch, Tr, Alloc>& basic_format<Ch, Tr, Alloc>::
parse (const string_type& buf) {
// parse the format-string
using namespace std;
#if !defined(BOOST_NO_STD_LOCALE)
const std::ctype<Ch> & fac = BOOST_USE_FACET( std::ctype<Ch>, getloc());
#else
io::basic_oaltstringstream<Ch, Tr, Alloc> fac;
//has widen and narrow even on compilers without locale
#endif
const Ch arg_mark = io::detail::const_or_not(fac).widen( '%');
bool ordered_args=true;
int max_argN=-1;
// A: find upper_bound on num_items and allocates arrays
src/boost/lexical_cast.hpp view on Meta::CPAN
BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
(sizeof(int_type) > sizeof(T))
, int_type
, T
>::type n = n_param;
#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
std::locale loc;
if (loc != std::locale::classic()) {
typedef std::numpunct<CharT> numpunct;
numpunct const& np = BOOST_USE_FACET(numpunct, loc);
std::string const grouping = np.grouping();
std::string::size_type const grouping_size = grouping.size();
if ( grouping_size && grouping[0] > 0 )
{
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
// Check that ulimited group is unreachable:
BOOST_STATIC_ASSERT(std::numeric_limits<T>::digits10 < CHAR_MAX);
#endif
src/boost/lexical_cast.hpp view on Meta::CPAN
return false;
value = *end - czero;
--end;
T multiplier = 1;
bool multiplier_overflowed = false;
#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
std::locale loc;
if (loc != std::locale::classic()) {
typedef std::numpunct<CharT> numpunct;
numpunct const& np = BOOST_USE_FACET(numpunct, loc);
std::string const& grouping = np.grouping();
std::string::size_type const grouping_size = grouping.size();
/* According to Programming languages - C++
* we MUST check for correct grouping
*/
if (grouping_size && grouping[0] > 0)
{
unsigned char current_grouping = 0;
CharT const thousands_sep = np.thousands_sep();
src/boost/lexical_cast.hpp view on Meta::CPAN
#endif
};
template<class Traits, class T, class CharT>
inline bool lcast_ret_float(T& value, const CharT* begin, const CharT* end)
{
#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
std::locale loc;
typedef std::numpunct<CharT> numpunct;
numpunct const& np = BOOST_USE_FACET(numpunct, loc);
std::string const grouping(
(loc == std::locale::classic())
? std::string()
: np.grouping()
);
std::string::size_type const grouping_size = grouping.size();
CharT const thousands_sep = grouping_size ? np.thousands_sep() : 0;
CharT const decimal_point = np.decimal_point();
bool found_grouping = false;
std::string::size_type last_grouping_pos = grouping_size - 1;
src/boost/lexical_cast.hpp view on Meta::CPAN
#ifndef BOOST_LCAST_NO_WCHAR_T
template <class T>
bool shl_char(T ch)
{
BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)) ,
"boost::lexical_cast does not support narrowing of char types."
"Use boost::locale instead" );
#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
std::locale loc;
CharT const w = BOOST_USE_FACET(std::ctype<CharT>, loc).widen(ch);
#else
CharT const w = static_cast<CharT>(ch);
#endif
Traits::assign(*start, w);
finish = start + 1;
return true;
}
#endif
bool shl_char_array(CharT const* str) BOOST_NOEXCEPT
src/boost/program_options/detail/utf8_codecvt_facet.hpp view on Meta::CPAN
// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu)
// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu). Permission to copy,
// use, modify, sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided "as is"
// without express or implied warranty, and with no claim as to its suitability
// for any purpose.
#ifndef BOOST_PROGRAM_OPTIONS_UTF8_CODECVT_FACET_HPP
#define BOOST_PROGRAM_OPTIONS_UTF8_CODECVT_FACET_HPP
#include <boost/program_options/config.hpp>
#define BOOST_UTF8_BEGIN_NAMESPACE \
namespace boost { namespace program_options { namespace detail {
#define BOOST_UTF8_END_NAMESPACE }}}
#define BOOST_UTF8_DECL BOOST_PROGRAM_OPTIONS_DECL
#include <boost/detail/utf8_codecvt_facet.hpp>