www.digitalmars.com         C & C++   DMDScript  

c++.stlsoft - [STLSoft-1.9.44] VC8: iterator_traits missing for class clipboard_format_sequence's

reply Martin Moene <m.j.moene eld.physics.LeidenUniv.nl> writes:
Hi Matthew,

Compiling the winstl::clipboard_format_sequence program below with VC8 fails 
on the iterator_category being unavailable.

    including <iterator> and replacing

Line 164   class const_iterator

    with

Line 164   class const_iterator : public 
std::iterator<std::forward_iterator_tag, value_type >

solves the problem.

I cannot (yet) express the solution in STLSoft wording, but I'm sure you can ;-)

Cheers, Martin.
___

#include <winstl/clipboard/clipboard_format_sequence.hpp>

#include <algorithm>    // std::copy
#include <iterator>     // std::ostream_iterator
#include <iostream>     // std::cout, std::endl

int main()
{
    typedef winstl::clipboard_format_sequence::value_type value_type;

    winstl::clipboard_format_sequence formats;

    std::copy
    ( formats.begin()
    , formats.end()
    , std::ostream_iterator< value_type >( std::cout, "\n" )
    );
}

___

         cl  -nologo -W3 -EHsc -I"D:\Libraries\stlsoft-1.9.44/include" 
-D"WINVER=0x0400"  -D"_CRT_SECURE_NO_DEPRECATE" -D"_SCL_SECURE_NO_DEPRECATE" 
user32.lib Psapi.lib wininet.lib ws2_32.lib 
winstl_clipboard_format_sequence.cpp winstl_clipboard_format_sequence.cpp
C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\xutility(610) : error 
C2039: 'iterator_category' : is not a member of 
'stlsoft::winstl_project::clipboard_format_sequence::const_iterator' 
D:\Libraries\stlsoft-1.9.44/include\winstl/clipboard/clipboard_form
t_sequence.hpp(167) 
: see declaration of 
'stlsoft::winstl_project::clipboard_format_sequence::const_iterator'
___
Jun 16 2008
parent Matt Wilson <matthewwilson acm.org> writes:
Thanks Martin

The fix for this'll be in the next release

Martin Moene Wrote:

 Hi Matthew,
 
 Compiling the winstl::clipboard_format_sequence program below with VC8 fails 
 on the iterator_category being unavailable.
 
     including <iterator> and replacing
 
 Line 164   class const_iterator
 
     with
 
 Line 164   class const_iterator : public 
 std::iterator<std::forward_iterator_tag, value_type >
 
 solves the problem.
 
 I cannot (yet) express the solution in STLSoft wording, but I'm sure you can
;-)
 
 Cheers, Martin.
 ___
 
 #include <winstl/clipboard/clipboard_format_sequence.hpp>
 
 #include <algorithm>    // std::copy
 #include <iterator>     // std::ostream_iterator
 #include <iostream>     // std::cout, std::endl
 
 int main()
 {
     typedef winstl::clipboard_format_sequence::value_type value_type;
 
     winstl::clipboard_format_sequence formats;
 
     std::copy
     ( formats.begin()
     , formats.end()
     , std::ostream_iterator< value_type >( std::cout, "\n" )
     );
 }
 
 ___
 
          cl  -nologo -W3 -EHsc -I"D:\Libraries\stlsoft-1.9.44/include" 
 -D"WINVER=0x0400"  -D"_CRT_SECURE_NO_DEPRECATE" -D"_SCL_SECURE_NO_DEPRECATE" 
 user32.lib Psapi.lib wininet.lib ws2_32.lib 
 winstl_clipboard_format_sequence.cpp winstl_clipboard_format_sequence.cpp
 C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\xutility(610) : error 
 C2039: 'iterator_category' : is not a member of 
 'stlsoft::winstl_project::clipboard_format_sequence::const_iterator' 
 D:\Libraries\stlsoft-1.9.44/include\winstl/clipboard/clipboard_form
t_sequence.hpp(167) 
 : see declaration of 
 'stlsoft::winstl_project::clipboard_format_sequence::const_iterator'
 ___

Aug 12 2008