blob: 8b219ea24630c8e1941b48765c77c27ebc0aced9 [file] [log] [blame]
Brian Silverman598d0292018-08-04 23:56:47 -07001// Boost.Range library
2//
3// Copyright Thorsten Ottosen 2006. Use, modification and
4// distribution is subject to the Boost Software License, Version
5// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6// http://www.boost.org/LICENSE_1_0.txt)
7//
8// For more information, see http://www.boost.org/libs/range/
9//
10
11#ifndef BOOST_RANGE_DETAIL_AS_LITERAL_HPP
12#define BOOST_RANGE_DETAIL_AS_LITERAL_HPP
13
14#if defined(_MSC_VER)
15# pragma once
16#endif
17
18#include <boost/range/detail/detail_str.hpp>
19#include <boost/range/iterator_range.hpp>
20
21namespace boost
22{
23 template< class Range >
24 inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<Range>::type>
25 as_literal( Range& r )
26 {
27 return ::boost::make_iterator_range( ::boost::range_detail::str_begin(r),
28 ::boost::range_detail::str_end(r) );
29 }
30
31}
32
33#endif