forked from boostorg/range
fixes from Trac
[SVN r46346]
This commit is contained in:
@ -25,7 +25,9 @@
|
|||||||
#include <boost/detail/workaround.hpp>
|
#include <boost/detail/workaround.hpp>
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#ifndef BOOST_NO_CWCHAR
|
||||||
#include <cwchar>
|
#include <cwchar>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
{
|
{
|
||||||
@ -36,10 +38,12 @@ namespace boost
|
|||||||
return strlen( s );
|
return strlen( s );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
|
||||||
inline std::size_t length( const wchar_t* s )
|
inline std::size_t length( const wchar_t* s )
|
||||||
{
|
{
|
||||||
return wcslen( s );
|
return wcslen( s );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Remark: the compiler cannot choose between T* and T[sz]
|
// Remark: the compiler cannot choose between T* and T[sz]
|
||||||
@ -57,7 +61,7 @@ namespace boost
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
|
||||||
inline bool is_char_ptr( wchar_t* )
|
inline bool is_char_ptr( wchar_t* )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
@ -67,6 +71,7 @@ namespace boost
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
template< class T >
|
template< class T >
|
||||||
inline long is_char_ptr( T /* r */ )
|
inline long is_char_ptr( T /* r */ )
|
||||||
|
8
include/boost/range/begin.hpp
Executable file → Normal file
8
include/boost/range/begin.hpp
Executable file → Normal file
@ -73,15 +73,15 @@ namespace range_detail
|
|||||||
// May this be discarded? Or is it needed for bad compilers?
|
// May this be discarded? Or is it needed for bad compilers?
|
||||||
//
|
//
|
||||||
template< typename T, std::size_t sz >
|
template< typename T, std::size_t sz >
|
||||||
inline const T* range_begin( const T (&array)[sz] )
|
inline const T* range_begin( const T (&a)[sz] )
|
||||||
{
|
{
|
||||||
return array;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
template< typename T, std::size_t sz >
|
template< typename T, std::size_t sz >
|
||||||
inline T* range_begin( T (&array)[sz] )
|
inline T* range_begin( T (&a)[sz] )
|
||||||
{
|
{
|
||||||
return array;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
8
include/boost/range/end.hpp
Executable file → Normal file
8
include/boost/range/end.hpp
Executable file → Normal file
@ -71,15 +71,15 @@ namespace range_detail
|
|||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
template< typename T, std::size_t sz >
|
template< typename T, std::size_t sz >
|
||||||
inline const T* range_end( const T (&array)[sz] )
|
inline const T* range_end( const T (&a)[sz] )
|
||||||
{
|
{
|
||||||
return range_detail::array_end<T,sz>( array );
|
return range_detail::array_end<T,sz>( a );
|
||||||
}
|
}
|
||||||
|
|
||||||
template< typename T, std::size_t sz >
|
template< typename T, std::size_t sz >
|
||||||
inline T* range_end( T (&array)[sz] )
|
inline T* range_end( T (&a)[sz] )
|
||||||
{
|
{
|
||||||
return range_detail::array_end<T,sz>( array );
|
return range_detail::array_end<T,sz>( a );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
|
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
|
||||||
|
Reference in New Issue
Block a user