summaryrefslogtreecommitdiffstats
path: root/contrib/src/boost/algorithm/string/detail/util.hpp
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2017-06-27 11:11:13 (GMT)
committerGitHub <noreply@github.com>2017-06-27 11:11:13 (GMT)
commite24393f41834f116038faf6c6d5012575a67136a (patch)
treea1e83679e55781bc92849a07c5acda7b5c09908c /contrib/src/boost/algorithm/string/detail/util.hpp
parentb3a2d91805feb81f79ee52c30a077521912b0bf9 (diff)
parent3a5692f40663282640775f8ff497c4860d265a2a (diff)
downloaduscxml-e24393f41834f116038faf6c6d5012575a67136a.zip
uscxml-e24393f41834f116038faf6c6d5012575a67136a.tar.gz
uscxml-e24393f41834f116038faf6c6d5012575a67136a.tar.bz2
Merge pull request #149 from tklab-tud/sradomski
remerge
Diffstat (limited to 'contrib/src/boost/algorithm/string/detail/util.hpp')
-rw-r--r--contrib/src/boost/algorithm/string/detail/util.hpp212
1 files changed, 106 insertions, 106 deletions
diff --git a/contrib/src/boost/algorithm/string/detail/util.hpp b/contrib/src/boost/algorithm/string/detail/util.hpp
index 4954fc2..cf4a8b1 100644
--- a/contrib/src/boost/algorithm/string/detail/util.hpp
+++ b/contrib/src/boost/algorithm/string/detail/util.hpp
@@ -1,106 +1,106 @@
-// Boost string_algo library util.hpp header file ---------------------------//
-
-// Copyright Pavol Droba 2002-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/ for updates, documentation, and revision history.
-
-#ifndef BOOST_STRING_UTIL_DETAIL_HPP
-#define BOOST_STRING_UTIL_DETAIL_HPP
-
-#include <boost/algorithm/string/config.hpp>
-#include <functional>
-#include <boost/range/iterator_range_core.hpp>
-
-namespace boost {
- namespace algorithm {
- namespace detail {
-
-// empty container -----------------------------------------------//
-
- // empty_container
- /*
- This class represents always empty container,
- containing elements of type CharT.
-
- It is supposed to be used in a const version only
- */
- template< typename CharT >
- struct empty_container
- {
- typedef empty_container<CharT> type;
- typedef CharT value_type;
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
- typedef const value_type& reference;
- typedef const value_type& const_reference;
- typedef const value_type* iterator;
- typedef const value_type* const_iterator;
-
-
- // Operations
- const_iterator begin() const
- {
- return reinterpret_cast<const_iterator>(0);
- }
-
- const_iterator end() const
- {
- return reinterpret_cast<const_iterator>(0);
- }
-
- bool empty() const
- {
- return false;
- }
-
- size_type size() const
- {
- return 0;
- }
- };
-
-// bounded copy algorithm -----------------------------------------------//
-
- // Bounded version of the std::copy algorithm
- template<typename InputIteratorT, typename OutputIteratorT>
- inline OutputIteratorT bounded_copy(
- InputIteratorT First,
- InputIteratorT Last,
- OutputIteratorT DestFirst,
- OutputIteratorT DestLast )
- {
- InputIteratorT InputIt=First;
- OutputIteratorT OutputIt=DestFirst;
- for(; InputIt!=Last && OutputIt!=DestLast; InputIt++, OutputIt++ )
- {
- *OutputIt=*InputIt;
- }
-
- return OutputIt;
- }
-
-// iterator range utilities -----------------------------------------//
-
- // copy range functor
- template<
- typename SeqT,
- typename IteratorT=BOOST_STRING_TYPENAME SeqT::const_iterator >
- struct copy_iterator_rangeF :
- public std::unary_function< iterator_range<IteratorT>, SeqT >
- {
- SeqT operator()( const iterator_range<IteratorT>& Range ) const
- {
- return copy_range<SeqT>(Range);
- }
- };
-
- } // namespace detail
- } // namespace algorithm
-} // namespace boost
-
-
-#endif // BOOST_STRING_UTIL_DETAIL_HPP
+// Boost string_algo library util.hpp header file ---------------------------//
+
+// Copyright Pavol Droba 2002-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/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_UTIL_DETAIL_HPP
+#define BOOST_STRING_UTIL_DETAIL_HPP
+
+#include <boost/algorithm/string/config.hpp>
+#include <functional>
+#include <boost/range/iterator_range_core.hpp>
+
+namespace boost {
+ namespace algorithm {
+ namespace detail {
+
+// empty container -----------------------------------------------//
+
+ // empty_container
+ /*
+ This class represents always empty container,
+ containing elements of type CharT.
+
+ It is supposed to be used in a const version only
+ */
+ template< typename CharT >
+ struct empty_container
+ {
+ typedef empty_container<CharT> type;
+ typedef CharT value_type;
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef const value_type& reference;
+ typedef const value_type& const_reference;
+ typedef const value_type* iterator;
+ typedef const value_type* const_iterator;
+
+
+ // Operations
+ const_iterator begin() const
+ {
+ return reinterpret_cast<const_iterator>(0);
+ }
+
+ const_iterator end() const
+ {
+ return reinterpret_cast<const_iterator>(0);
+ }
+
+ bool empty() const
+ {
+ return false;
+ }
+
+ size_type size() const
+ {
+ return 0;
+ }
+ };
+
+// bounded copy algorithm -----------------------------------------------//
+
+ // Bounded version of the std::copy algorithm
+ template<typename InputIteratorT, typename OutputIteratorT>
+ inline OutputIteratorT bounded_copy(
+ InputIteratorT First,
+ InputIteratorT Last,
+ OutputIteratorT DestFirst,
+ OutputIteratorT DestLast )
+ {
+ InputIteratorT InputIt=First;
+ OutputIteratorT OutputIt=DestFirst;
+ for(; InputIt!=Last && OutputIt!=DestLast; InputIt++, OutputIt++ )
+ {
+ *OutputIt=*InputIt;
+ }
+
+ return OutputIt;
+ }
+
+// iterator range utilities -----------------------------------------//
+
+ // copy range functor
+ template<
+ typename SeqT,
+ typename IteratorT=BOOST_STRING_TYPENAME SeqT::const_iterator >
+ struct copy_iterator_rangeF :
+ public std::unary_function< iterator_range<IteratorT>, SeqT >
+ {
+ SeqT operator()( const iterator_range<IteratorT>& Range ) const
+ {
+ return copy_range<SeqT>(Range);
+ }
+ };
+
+ } // namespace detail
+ } // namespace algorithm
+} // namespace boost
+
+
+#endif // BOOST_STRING_UTIL_DETAIL_HPP