* an STL container (as wrapper) for arrays of constant size.
*
* See
- * http://www.josuttis.com/cppcode
- * for details and the latest version.
- * See
- * http://www.boost.org/libs/array for Documentation.
+ * http://www.boost.org/libs/array/
* for documentation.
*
+ * The original author site is at: http://www.josuttis.com/
+ *
* (C) Copyright Nicolai M. Josuttis 2001.
+ *
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
#if (__HP_aCC <= 33900) || !defined(BOOST_STRICT_CONFIG)
# define BOOST_NO_UNREACHABLE_RETURN_DETECTION
# define BOOST_NO_TEMPLATE_TEMPLATES
-# define BOOST_NO_SWPRINTF
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
# define BOOST_NO_IS_ABSTRACT
// std lib config should set this one already:
// (C) Copyright Jens Maurer 2001 - 2003.
// (C) Copyright David Abrahams 2002.
// (C) Copyright Toon Knapen 2003.
+// (C) Copyright Boris Gubenko 2006.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// In principle, HP-UX has a nice <stdint.h> under the name <inttypes.h>
// However, it has the following problem:
// Use of UINT32_C(0) results in "0u l" for the preprocessed source
-// (verifyable with gcc 2.95.3, assumed for HP aCC)
-// #define BOOST_HAS_STDINT_H
+// (verifyable with gcc 2.95.3)
+#if (defined(__GNUC__) && (__GNUC__ >= 3)) || defined(__HP_aCC)
+# define BOOST_HAS_STDINT_H
+#endif
-#define BOOST_NO_SWPRINTF
-#define BOOST_NO_CWCTYPE
+#if !(defined(__HP_aCC) || !defined(_INCLUDE__STDC_A1_SOURCE))
+# define BOOST_NO_SWPRINTF
+# define BOOST_NO_CWCTYPE
+#endif
#if defined(__GNUC__)
# if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3))
#ifndef BOOST_HAS_SIGACTION
# define BOOST_HAS_SIGACTION
#endif
+#ifndef BOOST_HAS_NRVO
+# define BOOST_HAS_NRVO
+#endif
+#ifndef BOOST_HAS_LOG1P
+# define BOOST_HAS_LOG1P
+#endif
+#ifndef BOOST_HAS_EXPM1
+# define BOOST_HAS_EXPM1
+#endif
// boost/format/exceptions.hpp
// ----------------------------------------------------------------------------
-// Copyright Samuel Krempp 2003. 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/libs/format for library home page
+// Copyright Samuel Krempp 2003.
+//
+// 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/format/ for library home page
// ----------------------------------------------------------------------------
std::size_t get_expected() const { return expected_; }
virtual const char *what() const throw() {
return "boost::too_few_args: "
- "format-string refered to more arguments than were passed";
+ "format-string referred to more arguments than were passed";
}
};
std::size_t get_expected() const { return expected_; }
virtual const char *what() const throw() {
return "boost::too_many_args: "
- "format-string refered to less arguments than were passed";
+ "format-string referred to less arguments than were passed";
}
};
virtual const char *what() const throw() {
return "boost::out_of_range: "
"tried to refer to an argument (or item) number which"
- " is out of range, according to the format string.";
+ " is out of range, according to the format string";
}
};
//template <typename T>
//void implicit_cast (...);
-// Macro for when you need a constant expression (Gennaro Prota)
-#define BOOST_IMPLICIT_CAST(dst_type, expr) \
- ( sizeof( implicit_cast<dst_type>(expr) ) \
- , \
- static_cast<dst_type>(expr) \
- )
} // namespace boost
namespace boost { namespace iostreams {
// Dinkumware that comes with QNX Momentics 6.3.0, 4.0.2, incorrectly defines the
-// EOF and WEOF macros to not std:: qualify the wint_t type.
-// Fix by placing the def in this scope.
-#if defined(__QNX__) && defined(BOOST_DINKUMWARE_STDLIB)
+// EOF and WEOF macros to not std:: qualify the wint_t type (and so does
+// Sun C++ 5.8 + STLport 4). Fix by placing the def in this scope.
+// NOTE: Use BOOST_WORKAROUND?
+#if (defined(__QNX__) && defined(BOOST_DINKUMWARE_STDLIB)) \
+ || defined(__SUNPRO_CC)
using ::std::wint_t;
#endif
# pragma once
#endif
+#include <boost/config.hpp>
#include <boost/cstdint.hpp>
#include <boost/integer_traits.hpp>
#include <boost/iostreams/detail/config/codecvt.hpp> // mbstate_t.
// Must come last.
#include <boost/iostreams/detail/config/disable_warnings.hpp>
+#ifdef BOOST_NO_STDC_NAMESPACE
+namespace std { using ::fpos_t; }
+#endif
+
namespace boost { namespace iostreams {
typedef boost::intmax_t stream_offset;
// operator->() needs special support for input iterators to strictly meet the
// standard's requirements. If *i is not a reference type, we must still
- // produce a (constant) lvalue to which a pointer can be formed. We do that by
+ // produce a lvalue to which a pointer can be formed. We do that by
// returning an instantiation of this special proxy class template.
template <class T>
struct operator_arrow_proxy
{
operator_arrow_proxy(T const* px) : m_value(*px) {}
- const T* operator->() const { return &m_value; }
+ T* operator->() const { return &m_value; }
// This function is needed for MWCW and BCC, which won't call operator->
// again automatically per 13.3.1.2 para 8
- operator const T*() const { return &m_value; }
- T m_value;
+ operator T*() const { return &m_value; }
+ mutable T m_value;
};
// A metafunction that gets the result type for operator->. Also
class object_cache
{
public:
- typedef std::pair< ::boost::shared_ptr<Object>, Key const*> value_type;
+ typedef std::pair< ::boost::shared_ptr<Object const>, Key const*> value_type;
typedef std::list<value_type> list_type;
typedef typename list_type::iterator list_iterator;
typedef std::map<Key, list_iterator> map_type;
typedef typename map_type::iterator map_iterator;
typedef typename list_type::size_type size_type;
- static boost::shared_ptr<Object> get(const Key& k, size_type max_cache_size);
+ static boost::shared_ptr<Object const> get(const Key& k, size_type max_cache_size);
private:
- static boost::shared_ptr<Object> do_get(const Key& k, size_type max_cache_size);
+ static boost::shared_ptr<Object const> do_get(const Key& k, size_type max_cache_size);
struct data
{
};
template <class Key, class Object>
-boost::shared_ptr<Object> object_cache<Key, Object>::get(const Key& k, size_type max_cache_size)
+boost::shared_ptr<Object const> object_cache<Key, Object>::get(const Key& k, size_type max_cache_size)
{
#ifdef BOOST_HAS_THREADS
static boost::static_mutex mut = BOOST_STATIC_MUTEX_INIT;
}
template <class Key, class Object>
-boost::shared_ptr<Object> object_cache<Key, Object>::do_get(const Key& k, size_type max_cache_size)
+boost::shared_ptr<Object const> object_cache<Key, Object>::do_get(const Key& k, size_type max_cache_size)
{
typedef typename object_cache<Key, Object>::data object_data;
typedef typename map_type::size_type map_size_type;
// if we get here then the item is not in the cache,
// so create it:
//
- boost::shared_ptr<Object> result(new Object(k));
+ boost::shared_ptr<Object const> result(new Object(k));
//
// Add it to the list, and index it:
//
* Copyright (c) 1998-2004
* John Maddock
*
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ * 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)
*
*/
/*
- * LOCATION: see http://www.boost.org for most recent version.
+ * LOCATION: see http://www.boost.org/ for most recent version.
* FILE basic_regex.cpp
* VERSION see <boost/version.hpp>
* DESCRIPTION: Declares template class basic_regex.
//
// getflags:
// retained for backwards compatibility only, "flags"
- // is now the prefered name:
+ // is now the preferred name:
flag_type BOOST_REGEX_CALL getflags()const
{
return flags();
unsigned id = static_cast<re_repeat*>(pt)->id;
if(id > sizeof(m_bad_repeats) * CHAR_BIT)
return true; // run out of bits, assume we can't traverse this one.
- static const boost::uintmax_t one = 1uL;
+ static const boost::uintmax_t one = 1uL;
return m_bad_repeats & (one << id);
}
default:
case syntax_element_long_set_rep:
{
unsigned id = static_cast<re_repeat*>(pt)->id;
- static const boost::uintmax_t one = 1uL;
+ static const boost::uintmax_t one = 1uL;
if(id <= sizeof(m_bad_repeats) * CHAR_BIT)
m_bad_repeats |= (one << id);
}
char_set.add_range(start_range, end_range);
if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_dash)
{
- if(m_end == ++m_position)
- {
- fail(regex_constants::error_brack, m_position - m_base);
- return;
- }
- if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_set)
- {
+ if(m_end == ++m_position)
+ {
+ fail(regex_constants::error_brack, m_position - m_base);
+ return;
+ }
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_set)
+ {
// trailing - :
--m_position;
return;
- }
+ }
fail(regex_constants::error_range, m_position - m_base);
return;
}
typedef charT char_type;
//cpp_regex_traits_implementation();
cpp_regex_traits_implementation(const std::locale& l)
- : cpp_regex_traits_char_layer<charT>(l), m_is(&m_sbuf)
+ : cpp_regex_traits_char_layer<charT>(l)
{
init();
}
cpp_regex_traits_implementation(const cpp_regex_traits_base<charT>& l)
- : cpp_regex_traits_char_layer<charT>(l), m_is(&m_sbuf)
+ : cpp_regex_traits_char_layer<charT>(l)
{
init();
}
string_type lookup_collatename(const charT* p1, const charT* p2) const;
string_type transform_primary(const charT* p1, const charT* p2) const;
string_type transform(const charT* p1, const charT* p2) const;
- re_detail::parser_buf<charT> m_sbuf; // buffer for parsing numbers.
- std::basic_istream<charT> m_is; // stream for parsing numbers.
private:
std::map<int, std::string> m_error_strings; // error messages indexed by numberic ID
std::map<string_type, char_class_type> m_custom_class_names; // character class names
template <class charT>
-inline boost::shared_ptr<cpp_regex_traits_implementation<charT> > create_cpp_regex_traits(const std::locale& l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT))
+inline boost::shared_ptr<const cpp_regex_traits_implementation<charT> > create_cpp_regex_traits(const std::locale& l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT))
{
cpp_regex_traits_base<charT> key(l);
return ::boost::object_cache<cpp_regex_traits_base<charT>, cpp_regex_traits_implementation<charT> >::get(key, 5);
static std::string get_catalog_name();
private:
- boost::shared_ptr<re_detail::cpp_regex_traits_implementation<charT> > m_pimpl;
+ boost::shared_ptr<const re_detail::cpp_regex_traits_implementation<charT> > m_pimpl;
//
// catalog name handler:
//
template <class charT>
int cpp_regex_traits<charT>::toi(const charT*& first, const charT* last, int radix)const
{
+ re_detail::parser_buf<charT> sbuf; // buffer for parsing numbers.
+ std::basic_istream<charT> is(&sbuf); // stream for parsing numbers.
+
// we do NOT want to parse any thousands separators inside the stream:
- last = std::find(first, last, BOOST_USE_FACET(std::numpunct<charT>, m_pimpl->m_is.getloc()).thousands_sep());
- m_pimpl->m_sbuf.pubsetbuf(const_cast<charT*>(static_cast<const charT*>(first)), static_cast<std::streamsize>(last-first));
- m_pimpl->m_is.clear();
- if(std::abs(radix) == 16) m_pimpl->m_is >> std::hex;
- else if(std::abs(radix) == 8) m_pimpl->m_is >> std::oct;
- else m_pimpl->m_is >> std::dec;
+ last = std::find(first, last, BOOST_USE_FACET(std::numpunct<charT>, is.getloc()).thousands_sep());
+
+ sbuf.pubsetbuf(const_cast<charT*>(static_cast<const charT*>(first)), static_cast<std::streamsize>(last-first));
+ is.clear();
+ if(std::abs(radix) == 16) is >> std::hex;
+ else if(std::abs(radix) == 8) is >> std::oct;
+ else is >> std::dec;
int val;
- if(m_pimpl->m_is >> val)
+ if(is >> val)
{
- first = first + ((last - first) - m_pimpl->m_sbuf.in_avail());
+ first = first + ((last - first) - sbuf.in_avail());
return val;
}
else
return true;
if(count >= rep->max)
return false;
- if(position == last)
+ if(save_pos == last)
return false;
position = ++save_pos;
++count;
return true;
if(count >= rep->max)
return false;
+ position = save_pos;
if(position == last)
return false;
- position = save_pos;
if(traits_inst.translate(*position, icase) == what)
{
++position;
return true;
if(count >= rep->max)
return false;
+ position = save_pos;
if(position == last)
return false;
- position = save_pos;
if(map[static_cast<unsigned char>(traits_inst.translate(*position, icase))])
{
++position;
return true;
if(count >= rep->max)
return false;
+ position = save_pos;
if(position == last)
return false;
- position = save_pos;
if(position != re_is_set_member(position, last, set, re.get_data(), icase))
{
++position;
: end(last), re(*p), flags(f){ subs.push_back(sub); }
regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector<int>& v, match_flag_type f)
: end(last), re(*p), flags(f), subs(v){}
-#if !BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(55500))
+#if !BOOST_WORKAROUND(__HP_aCC, < 60700)
#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
|| BOOST_WORKAROUND(BOOST_MSVC, < 1300) \
|| BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \
- || BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(55500))
+ || BOOST_WORKAROUND(__HP_aCC, < 60700)
template <class T>
regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const T& submatches, match_flag_type f)
: end(last), re(*p), flags(f)
result.first = first;
result.second = end;
result.matched = (first != end);
+ N = -1;
return true;
}
return false;
if(!pdata->init(a))
pdata.reset();
}
-#if !BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(55500))
+#if !BOOST_WORKAROUND(__HP_aCC, < 60700)
#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
|| BOOST_WORKAROUND(BOOST_MSVC, < 1300) \
|| BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \
- || BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(55500))
+ || BOOST_WORKAROUND(__HP_aCC, < 60700)
template <class T>
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
const T& submatches, match_flag_type m = match_default)
{
return ::boost::re_detail::w32_tolower(c, this->m_locale);
}
- bool isctype(boost::uint32_t mask, charT c)
+ bool isctype(boost::uint32_t mask, charT c)const
{
return ::boost::re_detail::w32_is(this->m_locale, mask, c);
}
{
return m_lower_map[static_cast<unsigned char>(c)];
}
- bool isctype(boost::uint32_t mask, char c)
+ bool isctype(boost::uint32_t mask, char c)const
{
return m_type_map[static_cast<unsigned char>(c)] & mask;
}
template <class charT>
-boost::shared_ptr<w32_regex_traits_implementation<charT> > create_w32_regex_traits(::boost::re_detail::lcid_type l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT))
+boost::shared_ptr<const w32_regex_traits_implementation<charT> > create_w32_regex_traits(::boost::re_detail::lcid_type l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT))
{
// TODO: create a cache for previously constructed objects.
return boost::object_cache< ::boost::re_detail::lcid_type, w32_regex_traits_implementation<charT> >::get(l, 5);
static std::string get_catalog_name();
private:
- boost::shared_ptr<re_detail::w32_regex_traits_implementation<charT> > m_pimpl;
+ boost::shared_ptr<const re_detail::w32_regex_traits_implementation<charT> > m_pimpl;
//
// catalog name handler:
//
#include <boost/detail/shared_array_nmt.hpp>
#else
+#include <memory> // TR1 cyclic inclusion fix
+
#include <boost/assert.hpp>
#include <boost/checked_delete.hpp>
template <typename T>
struct unary_operator<logical_not_op, T> {
- typedef bool result_type;
+ typedef T const result_type;
static result_type eval(T const& v)
{ return !v; }
};
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-// See http://www.boost.org/libs/tokenizer for documentation.
+// See http://www.boost.org/libs/tokenizer/ for documentation.
// Revision History:
// 01 Oct 2004 Joaquín M López Muñoz
// character (backslash \), can be assigned to other characters.
struct escaped_list_error : public std::runtime_error{
- escaped_list_error(const std::string& what):std::runtime_error(what) { }
+ escaped_list_error(const std::string& what_arg):std::runtime_error(what_arg) { }
};
-// (C) John Maddock 2005.
+// Copyright (C) John Maddock 2005.
// 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).
# define BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED
# include <boost/aligned_storage.hpp>
#endif // BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED
+
// http://www.boost.org/LICENSE_1_0.txt)
// $Source: /cvsroot/boost/boost/boost/type_traits/detail/bool_trait_def.hpp,v $
-// $Date: 2005/08/25 16:27:26 $
-// $Revision: 1.19 $
+// $Date: 2006/07/12 11:10:22 $
+// $Revision: 1.19.4.1 $
#include <boost/type_traits/detail/template_arity_spec.hpp>
#include <boost/type_traits/integral_constant.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/config.hpp>
+//
+// Unfortunately some libraries have started using this header without
+// cleaning up afterwards: so we'd better undef the macros just in case
+// they've been defined already....
+//
+#ifdef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL
+#undef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL
+#undef BOOST_TT_AUX_BOOL_C_BASE
+#undef BOOST_TT_AUX_BOOL_TRAIT_DEF1
+#undef BOOST_TT_AUX_BOOL_TRAIT_DEF2
+#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC1
+#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC2
+#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1
+#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2
+#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1
+#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2
+#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1
+#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2
+#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1
+#undef BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1
+#endif
+
#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x570)
# define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
typedef ::boost::integral_constant<bool,C> type; \
This version detects ambiguous base classes and private base classes
correctly, and was devised by Rani Sharoni.
-Explanation by Terje Slettebø and Rani Sharoni.
+Explanation by Terje Slettebo and Rani Sharoni.
Let's take the multiple base class below as an example, and the following
will also show why there's not a problem with private or ambiguous base
// Copyright 2002-2005 Beman Dawes
// Copyright 2001 Dietmar Kuehl
-// 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 library home page at http://www.boost.org/libs/filesystem
+// 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 library home page at http://www.boost.org/libs/filesystem/
//----------------------------------------------------------------------------//
if ( result == 0 ) return dir_itr_close( handle, buffer );
target = entry->d_name;
# ifdef BOOST_FILESYSTEM_STATUS_CACHE
- if ( entry->d_type == DT_UNKNOWN ) // filesystem does not supply d_type value
+ if ( entry->d_type == DT_UNKNOWN ) // filesystem does not supply d_type value
{
sf = symlink_sf = fs::file_status(fs::status_unknown);
}
- else // filesystem supplies d_type value
- {
+ else // filesystem supplies d_type value
+ {
if ( entry->d_type == DT_DIR )
sf = symlink_sf = fs::file_status( fs::directory_file );
else if ( entry->d_type == DT_REG )
symlink_sf = fs::file_status( fs::symlink_file );
}
else sf = symlink_sf = fs::file_status( fs::status_unknown );
- }
+ }
# else
sf = symlink_sf = fs::file_status( fs::status_unknown );
# endif