mirror of
https://github.com/boostorg/range.git
synced 2025-07-19 15:42:14 +02:00
Remove tabs in file.
[SVN r24043]
This commit is contained in:
@ -30,7 +30,7 @@ namespace boost
|
|||||||
struct range_begin<std_container_>
|
struct range_begin<std_container_>
|
||||||
{
|
{
|
||||||
template< typename C >
|
template< typename C >
|
||||||
static BOOST_RANGE_DEDUCED_TYPENAME result_iterator_of<C>::type fun( C& c )
|
static BOOST_RANGE_DEDUCED_TYPENAME result_iterator_of<C>::type fun( C& c )
|
||||||
{
|
{
|
||||||
return c.begin();
|
return c.begin();
|
||||||
};
|
};
|
||||||
|
@ -45,7 +45,7 @@ namespace boost
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct range_value_type_<array_>
|
struct range_value_type_<array_>
|
||||||
{
|
{
|
||||||
template< typename T >
|
template< typename T >
|
||||||
|
@ -55,7 +55,7 @@ namespace boost {
|
|||||||
public:
|
public:
|
||||||
//! this type
|
//! this type
|
||||||
typedef iterator_range<IteratorT> type;
|
typedef iterator_range<IteratorT> type;
|
||||||
//BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(value_type);
|
//BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(value_type);
|
||||||
|
|
||||||
//! Encapsulated value type
|
//! Encapsulated value type
|
||||||
typedef BOOST_DEDUCED_TYPENAME boost::
|
typedef BOOST_DEDUCED_TYPENAME boost::
|
||||||
|
84
test/Jamfile
84
test/Jamfile
@ -8,71 +8,71 @@ DEPENDS all : test ;
|
|||||||
test-suite range
|
test-suite range
|
||||||
: [ run
|
: [ run
|
||||||
array.cpp
|
array.cpp
|
||||||
: :
|
: :
|
||||||
:
|
:
|
||||||
: array_test
|
: array_test
|
||||||
]
|
]
|
||||||
[ run
|
[ run
|
||||||
iterator_pair.cpp
|
iterator_pair.cpp
|
||||||
: :
|
: :
|
||||||
:
|
:
|
||||||
: iterator_pair_test
|
: iterator_pair_test
|
||||||
]
|
]
|
||||||
[ run
|
[ run
|
||||||
std_container.cpp
|
std_container.cpp
|
||||||
: :
|
: :
|
||||||
:
|
:
|
||||||
: std_container_test
|
: std_container_test
|
||||||
]
|
]
|
||||||
[ run
|
[ run
|
||||||
string.cpp
|
string.cpp
|
||||||
: :
|
: :
|
||||||
:
|
:
|
||||||
: string_test
|
: string_test
|
||||||
]
|
]
|
||||||
[ run
|
[ run
|
||||||
iterator_range.cpp
|
iterator_range.cpp
|
||||||
: :
|
: :
|
||||||
:
|
:
|
||||||
: iterator_range
|
: iterator_range
|
||||||
]
|
]
|
||||||
|
|
||||||
[ run
|
[ run
|
||||||
partial_workaround.cpp
|
partial_workaround.cpp
|
||||||
: :
|
: :
|
||||||
:
|
:
|
||||||
: workaround_test
|
: workaround_test
|
||||||
]
|
]
|
||||||
[ run
|
[ run
|
||||||
algorithm_example.cpp
|
algorithm_example.cpp
|
||||||
: :
|
: :
|
||||||
:
|
:
|
||||||
: example_test
|
: example_test
|
||||||
]
|
]
|
||||||
|
|
||||||
[ run
|
[ run
|
||||||
reversible_range.cpp
|
reversible_range.cpp
|
||||||
: :
|
: :
|
||||||
:
|
:
|
||||||
: reversible_range_test
|
: reversible_range_test
|
||||||
]
|
]
|
||||||
[ run
|
[ run
|
||||||
compat1.cpp
|
compat1.cpp
|
||||||
: :
|
: :
|
||||||
:
|
:
|
||||||
: compat1_test
|
: compat1_test
|
||||||
]
|
]
|
||||||
[ run
|
[ run
|
||||||
compat2.cpp
|
compat2.cpp
|
||||||
: :
|
: :
|
||||||
:
|
:
|
||||||
: compat2_test
|
: compat2_test
|
||||||
]
|
]
|
||||||
[ run
|
[ run
|
||||||
compat3.cpp
|
compat3.cpp
|
||||||
: :
|
: :
|
||||||
:
|
:
|
||||||
: compat3_test
|
: compat3_test
|
||||||
]
|
]
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
@ -50,9 +50,9 @@ namespace
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
const int N = 5;
|
const int N = 5;
|
||||||
int v[] = { 1,2,3,4,5,6,6,7,8,9 };
|
int v[] = { 1,2,3,4,5,6,6,7,8,9 };
|
||||||
std::vector<int> my_vector;
|
std::vector<int> my_vector;
|
||||||
my_vector.assign( boost::begin( v ), boost::end( v ) );
|
my_vector.assign( boost::begin( v ), boost::end( v ) );
|
||||||
typedef std::vector<int>::iterator iterator;
|
typedef std::vector<int>::iterator iterator;
|
||||||
std::pair<iterator,iterator> my_view( boost::begin( my_vector ),
|
std::pair<iterator,iterator> my_view( boost::begin( my_vector ),
|
||||||
boost::begin( my_vector ) + N );
|
boost::begin( my_vector ) + N );
|
||||||
@ -61,5 +61,5 @@ int main()
|
|||||||
std::cout << my_generic_replace( my_vector, 4, 2 )
|
std::cout << my_generic_replace( my_vector, 4, 2 )
|
||||||
<< my_generic_replace( my_view, 4, 2 )
|
<< my_generic_replace( my_view, 4, 2 )
|
||||||
<< my_generic_replace( str, 'a', 'b' );
|
<< my_generic_replace( str, 'a', 'b' );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ void check_iterator_pair()
|
|||||||
pair_t pair = std::make_pair( begin( vec ), end( vec ) );
|
pair_t pair = std::make_pair( begin( vec ), end( vec ) );
|
||||||
const_pair_t const_pair = std::make_pair( begin( vec ), end( vec ) );
|
const_pair_t const_pair = std::make_pair( begin( vec ), end( vec ) );
|
||||||
const_pair_tt constness_pair( pair );
|
const_pair_tt constness_pair( pair );
|
||||||
|
|
||||||
|
|
||||||
BOOST_STATIC_ASSERT(( is_same< value_type_of<pair_t>::type,
|
BOOST_STATIC_ASSERT(( is_same< value_type_of<pair_t>::type,
|
||||||
detail::iterator_traits<pair_t::first_type>::value_type>::value ));
|
detail::iterator_traits<pair_t::first_type>::value_type>::value ));
|
||||||
|
@ -64,22 +64,22 @@ void check_partial_workaround()
|
|||||||
BOOST_STATIC_ASSERT( sizeof( yes_type ) == sizeof( is_const_wchar_t_ptr_impl( w_ptr ) ) );
|
BOOST_STATIC_ASSERT( sizeof( yes_type ) == sizeof( is_const_wchar_t_ptr_impl( w_ptr ) ) );
|
||||||
BOOST_STATIC_ASSERT( sizeof( yes_type ) == sizeof( is_const_wchar_t_ptr_impl( cw_ptr ) ) );
|
BOOST_STATIC_ASSERT( sizeof( yes_type ) == sizeof( is_const_wchar_t_ptr_impl( cw_ptr ) ) );
|
||||||
|
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same< boost::range_detail::std_container_,
|
BOOST_STATIC_ASSERT(( boost::is_same< boost::range_detail::std_container_,
|
||||||
boost::range_detail::range< vector<int> >::type >::value ));
|
boost::range_detail::range< vector<int> >::type >::value ));
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same< boost::range_detail::std_pair_,
|
BOOST_STATIC_ASSERT(( boost::is_same< boost::range_detail::std_pair_,
|
||||||
boost::range_detail::range< pair<int,int> >::type >::value ));
|
boost::range_detail::range< pair<int,int> >::type >::value ));
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same< boost::range_detail::array_,
|
BOOST_STATIC_ASSERT(( boost::is_same< boost::range_detail::array_,
|
||||||
boost::range_detail::range< int[42] >::type >::value ));
|
boost::range_detail::range< int[42] >::type >::value ));
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same< boost::range_detail::char_ptr_,
|
BOOST_STATIC_ASSERT(( boost::is_same< boost::range_detail::char_ptr_,
|
||||||
boost::range_detail::range< char* >::type >::value ));
|
boost::range_detail::range< char* >::type >::value ));
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same< boost::range_detail::const_char_ptr_,
|
BOOST_STATIC_ASSERT(( boost::is_same< boost::range_detail::const_char_ptr_,
|
||||||
boost::range_detail::range< const char* >::type >::value ));
|
boost::range_detail::range< const char* >::type >::value ));
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same< boost::range_detail::wchar_t_ptr_,
|
BOOST_STATIC_ASSERT(( boost::is_same< boost::range_detail::wchar_t_ptr_,
|
||||||
boost::range_detail::range< wchar_t* >::type >::value ));
|
boost::range_detail::range< wchar_t* >::type >::value ));
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same< boost::range_detail::const_wchar_t_ptr_,
|
BOOST_STATIC_ASSERT(( boost::is_same< boost::range_detail::const_wchar_t_ptr_,
|
||||||
boost::range_detail::range< const wchar_t* >::type >::value ));
|
boost::range_detail::range< const wchar_t* >::type >::value ));
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same< boost::range_detail::std_container_,
|
BOOST_STATIC_ASSERT(( boost::is_same< boost::range_detail::std_container_,
|
||||||
boost::range_detail::range< vector<int> >::type >::value ));
|
boost::range_detail::range< vector<int> >::type >::value ));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ void check_char()
|
|||||||
BOOST_STATIC_ASSERT(( is_same< iterator_of<char_iterator_t>::type, char_iterator_t >::value ));
|
BOOST_STATIC_ASSERT(( is_same< iterator_of<char_iterator_t>::type, char_iterator_t >::value ));
|
||||||
BOOST_STATIC_ASSERT(( is_same< const_iterator_of<char_iterator_t>::type, const char* >::value ));
|
BOOST_STATIC_ASSERT(( is_same< const_iterator_of<char_iterator_t>::type, const char* >::value ));
|
||||||
BOOST_STATIC_ASSERT(( is_same< difference_type_of<char_iterator_t>::type,
|
BOOST_STATIC_ASSERT(( is_same< difference_type_of<char_iterator_t>::type,
|
||||||
::std::ptrdiff_t >::value ));
|
::std::ptrdiff_t >::value ));
|
||||||
BOOST_STATIC_ASSERT(( is_same< size_type_of<char_iterator_t>::type, std::size_t >::value ));
|
BOOST_STATIC_ASSERT(( is_same< size_type_of<char_iterator_t>::type, std::size_t >::value ));
|
||||||
BOOST_STATIC_ASSERT(( is_same< result_iterator_of<char_iterator_t>::type, char_iterator_t >::value ));
|
BOOST_STATIC_ASSERT(( is_same< result_iterator_of<char_iterator_t>::type, char_iterator_t >::value ));
|
||||||
BOOST_STATIC_ASSERT(( is_same< result_iterator_of<const char*>::type, const char* >::value ));
|
BOOST_STATIC_ASSERT(( is_same< result_iterator_of<const char*>::type, const char* >::value ));
|
||||||
@ -68,19 +68,19 @@ void check_char()
|
|||||||
BOOST_STATIC_ASSERT(( is_same< iterator_of<char_array_t>::type, char* >::value ));
|
BOOST_STATIC_ASSERT(( is_same< iterator_of<char_array_t>::type, char* >::value ));
|
||||||
BOOST_STATIC_ASSERT(( is_same< const_iterator_of<char_array_t>::type, const char* >::value ));
|
BOOST_STATIC_ASSERT(( is_same< const_iterator_of<char_array_t>::type, const char* >::value ));
|
||||||
BOOST_STATIC_ASSERT(( is_same< difference_type_of<char_array_t>::type,
|
BOOST_STATIC_ASSERT(( is_same< difference_type_of<char_array_t>::type,
|
||||||
::std::ptrdiff_t >::value ));
|
::std::ptrdiff_t >::value ));
|
||||||
BOOST_STATIC_ASSERT(( is_same< size_type_of<char_array_t>::type, std::size_t >::value ));
|
BOOST_STATIC_ASSERT(( is_same< size_type_of<char_array_t>::type, std::size_t >::value ));
|
||||||
BOOST_STATIC_ASSERT(( is_same< result_iterator_of<char_array_t>::type, char* >::value ));
|
BOOST_STATIC_ASSERT(( is_same< result_iterator_of<char_array_t>::type, char* >::value ));
|
||||||
BOOST_STATIC_ASSERT(( is_same< result_iterator_of<const char_array_t>::type, const char* >::value ));
|
BOOST_STATIC_ASSERT(( is_same< result_iterator_of<const char_array_t>::type, const char* >::value ));
|
||||||
|
|
||||||
BOOST_CHECK_EQUAL( begin( char_s ), char_s );
|
BOOST_CHECK_EQUAL( begin( char_s ), char_s );
|
||||||
const char* end1 = begin( char_s ) + size( char_s );
|
const char* end1 = begin( char_s ) + size( char_s );
|
||||||
BOOST_CHECK_EQUAL( end( char_s ), end1 );
|
BOOST_CHECK_EQUAL( end( char_s ), end1 );
|
||||||
BOOST_CHECK_EQUAL( empty( char_s ), (char_s == 0 || char_s[0] == char()) );
|
BOOST_CHECK_EQUAL( empty( char_s ), (char_s == 0 || char_s[0] == char()) );
|
||||||
BOOST_CHECK_EQUAL( size( char_s ), std::char_traits<char>::length( char_s ) );
|
BOOST_CHECK_EQUAL( size( char_s ), std::char_traits<char>::length( char_s ) );
|
||||||
|
|
||||||
BOOST_CHECK_EQUAL( begin( my_string ), my_string );
|
BOOST_CHECK_EQUAL( begin( my_string ), my_string );
|
||||||
const char* end2 = begin( my_string ) + size( my_string );
|
const char* end2 = begin( my_string ) + size( my_string );
|
||||||
BOOST_CHECK_EQUAL( end( my_string ), end2 );
|
BOOST_CHECK_EQUAL( end( my_string ), end2 );
|
||||||
BOOST_CHECK_EQUAL( empty( my_string ), (my_string == 0 || my_string[0] == char()) );
|
BOOST_CHECK_EQUAL( empty( my_string ), (my_string == 0 || my_string[0] == char()) );
|
||||||
BOOST_CHECK_EQUAL( size( my_string ), my_string_length );
|
BOOST_CHECK_EQUAL( size( my_string ), my_string_length );
|
||||||
@ -127,7 +127,7 @@ void check_string()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
find( check_rvalue_return(), 'n' );
|
find( check_rvalue_return(), 'n' );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user