os/ossrv/ossrv_pub/boost_apis/boost/regex/pattern_except.hpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/regex/pattern_except.hpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,83 @@
     1.4 +/*
     1.5 + *
     1.6 + * Copyright (c) 1998-2002
     1.7 + * John Maddock
     1.8 + *
     1.9 + * Use, modification and distribution are subject to the 
    1.10 + * Boost Software License, Version 1.0. (See accompanying file 
    1.11 + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    1.12 + *
    1.13 + */
    1.14 + 
    1.15 + /*
    1.16 +  *   LOCATION:    see http://www.boost.org for most recent version.
    1.17 +  *   FILE         pattern_except.hpp
    1.18 +  *   VERSION      see <boost/version.hpp>
    1.19 +  *   DESCRIPTION: Declares pattern-matching exception classes.
    1.20 +  */
    1.21 +
    1.22 +#ifndef BOOST_RE_PAT_EXCEPT_HPP
    1.23 +#define BOOST_RE_PAT_EXCEPT_HPP
    1.24 +
    1.25 +#ifndef BOOST_REGEX_CONFIG_HPP
    1.26 +#include <boost/regex/config.hpp>
    1.27 +#endif
    1.28 +
    1.29 +#include <stdexcept>
    1.30 +#include <cstddef>
    1.31 +#include <boost/regex/v4/error_type.hpp>
    1.32 +
    1.33 +namespace boost{
    1.34 +
    1.35 +#ifdef BOOST_HAS_ABI_HEADERS
    1.36 +#  include BOOST_ABI_PREFIX
    1.37 +#endif
    1.38 +
    1.39 +#ifdef BOOST_MSVC
    1.40 +#pragma warning(push)
    1.41 +#pragma warning(disable : 4275)
    1.42 +#endif
    1.43 +   class BOOST_REGEX_DECL regex_error : public std::runtime_error
    1.44 +{
    1.45 +public:
    1.46 +   explicit regex_error(const std::string& s, regex_constants::error_type err = regex_constants::error_unknown, std::ptrdiff_t pos = 0);
    1.47 +   explicit regex_error(regex_constants::error_type err);
    1.48 +   ~regex_error() throw();
    1.49 +   regex_constants::error_type code()const
    1.50 +   { return m_error_code; }
    1.51 +   std::ptrdiff_t position()const
    1.52 +   { return m_position; }
    1.53 +   void raise()const;
    1.54 +private:
    1.55 +   regex_constants::error_type m_error_code;
    1.56 +   std::ptrdiff_t m_position;
    1.57 +};
    1.58 +
    1.59 +typedef regex_error bad_pattern;
    1.60 +typedef regex_error bad_expression;
    1.61 +
    1.62 +namespace re_detail{
    1.63 +
    1.64 +BOOST_REGEX_DECL void BOOST_REGEX_CALL raise_runtime_error(const std::runtime_error& ex);
    1.65 +
    1.66 +template <class traits>
    1.67 +void raise_error(const traits& t, regex_constants::error_type code)
    1.68 +{
    1.69 +   (void)t;  // warning suppression
    1.70 +   std::runtime_error e(t.error_string(code));
    1.71 +   ::boost::re_detail::raise_runtime_error(e);
    1.72 +}
    1.73 +
    1.74 +}
    1.75 +
    1.76 +
    1.77 +#ifdef BOOST_HAS_ABI_HEADERS
    1.78 +#  include BOOST_ABI_SUFFIX
    1.79 +#endif
    1.80 +
    1.81 +} // namespace boost
    1.82 +
    1.83 +#endif
    1.84 +
    1.85 +
    1.86 +