Boost logo

Boost :

From: Joe Gottman (jgottman_at_[hidden])
Date: 2004-06-29 19:27:47


I have found a bug in token_functions.hpp. I have a hello-world program that
looks like this:
----------begin file
    #include <boost/token_functions.hpp>
    int main(int argc, char* argv[])
    {
    boost::char_separator<char> sep;
    printf("Hello World!\n");
    return 0;
    }
----------end file

It fails under MSVC 6.0 with the following error messages:

c:\jobs\boost\token_functions.hpp(261) : error C2065: 'is_pointer' :
undeclared identifier
c:\jobs\boost\token_functions.hpp(267) : see reference to class template
instantiation 'boost::tokenizer_detail::get_iterator_category<Iterator>'
being compiled
c:\jobs\boost\token_functions.hpp(261) : error C2275: 'Iterator' : illegal
use of this type as an expression
c:\jobs\boost\token_functions.hpp(267) : see reference to class template
instantiation 'boost::tokenizer_detail::get_iterator_category<Iterator>'
being compiled
c:\jobs\boost\token_functions.hpp(261) : error C2059: syntax error : ','
c:\jobs\boost\token_functions.hpp(267) : see reference to class template
instantiation 'boost::tokenizer_detail::get_iterator_category<Iterator>'
being compiled
c:\jobs\boost\token_functions.hpp(264) : error C2238: unexpected token(s)
preceding ';'
c:\jobs\boost\token_functions.hpp(267) : see reference to class template
instantiation 'boost::tokenizer_detail::get_iterator_category<Iterator>'
being compiled
c:\jobs\boost\token_functions.hpp(266) : error C2653: 'cat' : is not a class
or namespace name
c:\jobs\boost\token_functions.hpp(267) : see reference to class template
instantiation 'boost::tokenizer_detail::get_iterator_category<Iterator>'
being compiled

I believe the problem is that we need to add the line
#include <boost/type_traits/is_pointer.hp>
to token_functions.hpp. If I add this line to my program before including
token_functions.hpp, everything compiles fine.

Joe Gottman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk