From 8286ac511144e4f17d34eac9affb97e50646344a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 23 Jul 2014 15:25:44 +0200 Subject: Imported Upstream version 4.0.0 --- .../details/boost/regex/v4/iterator_traits.hpp | 135 +++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 libcutl/cutl/details/boost/regex/v4/iterator_traits.hpp (limited to 'libcutl/cutl/details/boost/regex/v4/iterator_traits.hpp') diff --git a/libcutl/cutl/details/boost/regex/v4/iterator_traits.hpp b/libcutl/cutl/details/boost/regex/v4/iterator_traits.hpp new file mode 100644 index 0000000..146db8a --- /dev/null +++ b/libcutl/cutl/details/boost/regex/v4/iterator_traits.hpp @@ -0,0 +1,135 @@ +/* + * + * Copyright (c) 1998-2002 + * John Maddock + * + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + */ + + /* + * LOCATION: see http://www.boost.org for most recent version. + * FILE iterator_traits.cpp + * VERSION see + * DESCRIPTION: Declares iterator traits workarounds. + */ + +#ifndef BOOST_REGEX_V4_ITERATOR_TRAITS_HPP +#define BOOST_REGEX_V4_ITERATOR_TRAITS_HPP + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable: 4103) +#endif +#ifdef BOOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX +#endif +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +namespace cutl_details_boost{ +namespace re_detail{ + +#if defined(BOOST_NO_STD_ITERATOR_TRAITS) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template +struct regex_iterator_traits +{ + typedef typename T::iterator_category iterator_category; + typedef typename T::value_type value_type; +#if !defined(BOOST_NO_STD_ITERATOR) + typedef typename T::difference_type difference_type; + typedef typename T::pointer pointer; + typedef typename T::reference reference; +#else + typedef std::ptrdiff_t difference_type; + typedef value_type* pointer; + typedef value_type& reference; +#endif +}; + +template +struct pointer_iterator_traits +{ + typedef std::ptrdiff_t difference_type; + typedef T value_type; + typedef T* pointer; + typedef T& reference; + typedef std::random_access_iterator_tag iterator_category; +}; +template +struct const_pointer_iterator_traits +{ + typedef std::ptrdiff_t difference_type; + typedef T value_type; + typedef const T* pointer; + typedef const T& reference; + typedef std::random_access_iterator_tag iterator_category; +}; + +template<> +struct regex_iterator_traits : pointer_iterator_traits{}; +template<> +struct regex_iterator_traits : const_pointer_iterator_traits{}; +template<> +struct regex_iterator_traits : pointer_iterator_traits{}; +template<> +struct regex_iterator_traits : const_pointer_iterator_traits{}; +// +// the follwoing are needed for ICU support: +// +template<> +struct regex_iterator_traits : pointer_iterator_traits{}; +template<> +struct regex_iterator_traits : const_pointer_iterator_traits{}; +template<> +struct regex_iterator_traits : pointer_iterator_traits{}; +template<> +struct regex_iterator_traits : const_pointer_iterator_traits{}; + +#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T +template<> +struct regex_iterator_traits : pointer_iterator_traits{}; +template<> +struct regex_iterator_traits : const_pointer_iterator_traits{}; +#endif + +#if defined(__SGI_STL_PORT) && defined(__STL_DEBUG) +template<> +struct regex_iterator_traits : pointer_iterator_traits{}; +template<> +struct regex_iterator_traits : const_pointer_iterator_traits{}; +#ifndef BOOST_NO_STD_WSTRING +template<> +struct regex_iterator_traits : pointer_iterator_traits{}; +template<> +struct regex_iterator_traits : const_pointer_iterator_traits{}; +#endif // BOOST_NO_WSTRING +#endif // stport + +#else + +template +struct regex_iterator_traits : public std::iterator_traits {}; + +#endif + +} // namespace re_detail +} // namespace cutl_details_boost + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable: 4103) +#endif +#ifdef BOOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX +#endif +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#endif + -- cgit v1.2.3