Compare commits

...

4 Commits

Author SHA1 Message Date
d97760f52d Merge from trunk.
[SVN r40260]
2007-10-21 07:28:23 +00:00
29910196eb Merge with the offending files removed.
[SVN r39995]
2007-10-13 23:18:35 +00:00
5d085424e8 Merge from trunk.
[SVN r39287]
2007-09-14 22:24:22 +00:00
6641f6a542 Create a development branch for the hash library.
[SVN r38869]
2007-08-23 19:28:19 +00:00
2 changed files with 18 additions and 7 deletions

View File

@ -21,6 +21,9 @@
#include <boost/range/iterator_range.hpp>
#include <boost/range/detail/str_types.hpp>
#include <boost/detail/workaround.hpp>
#include <cstring>
#include <cwchar>
@ -66,7 +69,7 @@ namespace boost
}
template< class T >
inline long is_char_ptr( T r )
inline long is_char_ptr( T /* r */ )
{
return 0L;
}
@ -104,15 +107,23 @@ namespace boost
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
}
template< class Char, std::size_t sz >
inline iterator_range<const Char*> as_literal( const Char (&arr)[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
}
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING

View File

@ -33,28 +33,28 @@ template< class T >
inline BOOST_DEDUCED_TYPENAME boost::range_iterator<T>::type
str_begin( T& r )
{
return boost::begin( as_literal(r) );
return boost::begin( boost::as_literal(r) );
}
template< class T >
inline BOOST_DEDUCED_TYPENAME boost::range_iterator<T>::type
str_end( T& r )
{
return boost::end( as_literal(r) );
return boost::end( boost::as_literal(r) );
}
template< class T >
inline BOOST_DEDUCED_TYPENAME boost::range_size<T>::type
str_size( const T& r )
{
return boost::size( as_literal(r) );
return boost::size( boost::as_literal(r) );
}
template< class T >
inline bool
str_empty( T& r )
{
return boost::empty( as_literal(r) );
return boost::empty( boost::as_literal(r) );
}
template< typename Container, typename T >