Boost logo

Boost-Commit :

From: nesotto_at_[hidden]
Date: 2008-05-05 02:41:57


Author: nesotto
Date: 2008-05-05 02:41:54 EDT (Mon, 05 May 2008)
New Revision: 45123
URL: http://svn.boost.org/trac/boost/changeset/45123

Log:
fix for as_literal()
Text files modified:
   trunk/boost/range/as_literal.hpp | 17 ++++-------------
   trunk/boost/range/detail/as_literal.hpp | 4 ++--
   2 files changed, 6 insertions(+), 15 deletions(-)

Modified: trunk/boost/range/as_literal.hpp
==============================================================================
--- trunk/boost/range/as_literal.hpp (original)
+++ trunk/boost/range/as_literal.hpp 2008-05-05 02:41:54 EDT (Mon, 05 May 2008)
@@ -8,8 +8,8 @@
 // For more information, see http://www.boost.org/libs/range/
 //
 
-#ifndef BOOST_RANGE_DETAIL_AS_LITERAL_HPP
-#define BOOST_RANGE_DETAIL_AS_LITERAL_HPP
+#ifndef BOOST_RANGE_AS_LITERAL_HPP
+#define BOOST_RANGE_AS_LITERAL_HPP
 
 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
 # pragma once
@@ -107,22 +107,13 @@
     template< class Char, std::size_t sz >
     inline iterator_range<Char*> as_literal( Char (&arr)[sz] )
     {
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x590)) && __BORLANDC__ >= 0x590
- return boost::make_iterator_range<Char*>( arr, arr + sz - 1 );
-#else
- return boost::make_iterator_range( arr, arr + sz - 1 );
-#endif
+ return range_detail::make_range( arr, range_detail::is_char_ptr(arr) );
     }
-
     
     template< class Char, std::size_t sz >
     inline iterator_range<const Char*> as_literal( const Char (&arr)[sz] )
     {
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x590)) && __BORLANDC__ >= 0x590
- return boost::make_iterator_range<const Char*>( arr, arr + sz - 1 );
-#else
- return boost::make_iterator_range( arr, arr + sz - 1 );
-#endif
+ return range_detail::make_range( arr, range_detail::is_char_ptr(arr) );
     }
 }
 

Modified: trunk/boost/range/detail/as_literal.hpp
==============================================================================
--- trunk/boost/range/detail/as_literal.hpp (original)
+++ trunk/boost/range/detail/as_literal.hpp 2008-05-05 02:41:54 EDT (Mon, 05 May 2008)
@@ -8,8 +8,8 @@
 // For more information, see http://www.boost.org/libs/range/
 //
 
-#ifndef BOOST_RANGE_AS_LITERAL_HPP
-#define BOOST_RANGE_AS_LITERAL_HPP
+#ifndef BOOST_RANGE_DETAIL_AS_LITERAL_HPP
+#define BOOST_RANGE_DETAIL_AS_LITERAL_HPP
 
 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
 # pragma once


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk