tags:

views:

639

answers:

3

I am following the quickstart guide for boost::spirit, and I get this compiler warning when I include : "This header is deprecated. Please use: boost/spirit/include/classic_core.hpp" Should I be worried about this?

(quick start guide: http://spirit.sourceforge.net/distrib/spirit_1_8_5/libs/spirit/doc/quick_start.html , with full source of the program I am trying to compile here: http://spirit.sourceforge.net/distrib/spirit_1_8_5/libs/spirit/example/fundamental/number_list.cpp)

edit: Additionally, when I try to compile with the recommended classic_core.hpp and classic_push_back_actor.hpp headers, I get the following compiler errors:

test7.cpp: In function 'bool parse_numbers(const char*, __gnu_debug_def::vector<double, std::allocator<double> >&)':
test7.cpp:18: error: 'real_p' was not declared in this scope
test7.cpp:18: error: 'push_back_a' was not declared in this scope
test7.cpp:23: error: 'space_p' was not declared in this scope
test7.cpp:23: error: 'parse' was not declared in this scope
A: 

When a library indicates that a class/header/method/etc. is deprecated, it means that the maintainer of the library will most likely stop maintaining the functionality, and may remove it in the future. I would recommend to switch to the suggested header sooner than later, so save yourself from headaches in the future.

The new header may have a slightly different way of handling the feature, so you may need to make some code changes.

(I don't know much about boost, this is just a general comment)

Andy White
+9  A: 
A: 

When you're including the classic headers the parsers are in the boost::spirit::classic namespace. Try:

using namespace boost::spirit::classic;

David Joyner