mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 15:04:00 +00:00
Moved to much cleaner system of using BOOST_TT_BROKEN_COMPILER_SPEC
for handling vc6/7 deficiencies with iterator_traits. Fixed a bug in iterator_facade which was causing incomplete types to be passed through is_convertible. Reinstated libs/utility/iterator_traits_test.cpp [SVN r19840]
This commit is contained in:
parent
c86fcbf456
commit
b5ae0ad86b
@ -12,22 +12,6 @@
|
|||||||
#include <boost/iterator/counting_iterator.hpp>
|
#include <boost/iterator/counting_iterator.hpp>
|
||||||
#include <boost/iterator/indirect_iterator.hpp>
|
#include <boost/iterator/indirect_iterator.hpp>
|
||||||
|
|
||||||
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
|
||||||
namespace boost { namespace detail
|
|
||||||
{
|
|
||||||
template <>
|
|
||||||
struct iterator_traits<int*>
|
|
||||||
: ptr_iter_traits<int>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
template <>
|
|
||||||
struct iterator_traits<int**>
|
|
||||||
: ptr_iter_traits<int*>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
}}
|
|
||||||
#endif
|
|
||||||
int main(int, char*[])
|
int main(int, char*[])
|
||||||
{
|
{
|
||||||
// Example of using counting_iterator_generator
|
// Example of using counting_iterator_generator
|
||||||
|
@ -17,17 +17,6 @@ struct is_positive_number {
|
|||||||
bool operator()(int x) { return 0 < x; }
|
bool operator()(int x) { return 0 < x; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
|
||||||
namespace boost { namespace detail
|
|
||||||
{
|
|
||||||
template <>
|
|
||||||
struct iterator_traits<int*>
|
|
||||||
: ptr_iter_traits<int>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
}}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
int numbers_[] = { 0, -1, 4, -3, 5, 8, -2 };
|
int numbers_[] = { 0, -1, 4, -3, 5, 8, -2 };
|
||||||
|
@ -11,41 +11,6 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <boost/iterator/indirect_iterator.hpp>
|
#include <boost/iterator/indirect_iterator.hpp>
|
||||||
|
|
||||||
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
|
||||||
namespace boost { namespace detail
|
|
||||||
{
|
|
||||||
template <>
|
|
||||||
struct iterator_traits<char*>
|
|
||||||
: ptr_iter_traits<char>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
template <>
|
|
||||||
struct iterator_traits<char const*>
|
|
||||||
: ptr_iter_traits<char, char const>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
template <>
|
|
||||||
struct iterator_traits<char**>
|
|
||||||
: ptr_iter_traits<char*>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
template <>
|
|
||||||
struct iterator_traits<char const* const*>
|
|
||||||
: ptr_iter_traits<char const*, char const* const>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
template <>
|
|
||||||
struct iterator_traits<char* const*>
|
|
||||||
: ptr_iter_traits<char*, char* const>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
}}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int main(int, char*[])
|
int main(int, char*[])
|
||||||
{
|
{
|
||||||
char characters[] = "abcdefg";
|
char characters[] = "abcdefg";
|
||||||
|
@ -147,9 +147,7 @@ template <class Iterator,
|
|||||||
class value_type, class difference_type, class pointer, class reference, class category>
|
class value_type, class difference_type, class pointer, class reference, class category>
|
||||||
struct maybe_pointer_test
|
struct maybe_pointer_test
|
||||||
: portable_tests<Iterator,value_type,difference_type,pointer,reference,category>
|
: portable_tests<Iterator,value_type,difference_type,pointer,reference,category>
|
||||||
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
|
||||||
, non_portable_tests<Iterator,value_type,difference_type,pointer,reference,category>
|
, non_portable_tests<Iterator,value_type,difference_type,pointer,reference,category>
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -9,16 +9,7 @@
|
|||||||
#include <boost/iterator/reverse_iterator.hpp>
|
#include <boost/iterator/reverse_iterator.hpp>
|
||||||
#include <boost/detail/iterator.hpp>
|
#include <boost/detail/iterator.hpp>
|
||||||
|
|
||||||
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
//boost::detail::iterator_traits
|
||||||
namespace boost { namespace detail
|
|
||||||
{
|
|
||||||
template <>
|
|
||||||
struct iterator_traits<char*>
|
|
||||||
: ptr_iter_traits<char>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
}}
|
|
||||||
#endif
|
|
||||||
int main(int, char*[])
|
int main(int, char*[])
|
||||||
{
|
{
|
||||||
char letters_[] = "hello world!";
|
char letters_[] = "hello world!";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user