Added iterator traits specializations for compilers

without PTS support.


[SVN r764]
This commit is contained in:
Thomas Witt
2002-12-10 20:45:00 +00:00
parent 8e6e19f074
commit 343eaa9704
2 changed files with 22 additions and 0 deletions

View File

@@ -4,6 +4,17 @@
#include <boost/cstdlib.hpp>
#include <list>
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace boost { namespace detail
{
template<> struct iterator_traits<int*>
: ptr_iter_traits<int> {};
template<> struct iterator_traits<int const*>
: ptr_iter_traits<int, int const> {};
}}
#endif
int main()
{
{

View File

@@ -22,6 +22,17 @@
#include <boost/pending/iterator_tests.hpp>
#include <boost/concept_check.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 const*>
: ptr_iter_traits<int, int const> {};
}}
#endif
struct mult_functor {
typedef int result_type;
typedef int argument_type;