mirror of
https://github.com/boostorg/core.git
synced 2025-07-30 04:47:24 +02:00
Made the workaround for Oracle compiler more strict.
This commit is contained in:
@ -25,8 +25,8 @@ using std::distance;
|
|||||||
#if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
#if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
||||||
// std::distance from stlport with Oracle compiler 12.4 and 12.5 fails to deduce template parameters
|
// std::distance from stlport with Oracle compiler 12.4 and 12.5 fails to deduce template parameters
|
||||||
// when one of the arguments is an array and the other one is a pointer.
|
// when one of the arguments is an array and the other one is a pointer.
|
||||||
template< typename T, std::size_t N, typename U >
|
template< typename T, std::size_t N >
|
||||||
inline typename std::iterator_traits< T* >::difference_type distance(T (&left)[N], U* right)
|
inline typename std::iterator_traits< T* >::difference_type distance(T (&left)[N], T* right)
|
||||||
{
|
{
|
||||||
return std::distance(static_cast< T* >(left), right);
|
return std::distance(static_cast< T* >(left), right);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user