Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

deprecated warnings while using boost.spirit

I am trying to write some parsers with boost.spirit.qi but when i am compiling i am getting the following deprecated warnings:

In file included from /usr/include/boost/iostreams/detail/is_dereferenceable.hpp:12:0 ... 

#pragma message: NOTE: Use of this header (bool_trait_def.hpp) is deprecated

#pragma message: NOTE: Use of this header (template_arity_spec.hpp) is deprecated

Am i using the wrong parsers or something old? How can I get rid of these warnings?

EDIT: The /usr/include/boost/iostreams/detail/is_dereferenceable.hpp is somehow included by /usr/include/boost/spirit/include/qi.hpp I am using Boost Version 1.61

like image 674
Exagon Avatar asked May 22 '16 09:05

Exagon


1 Answers

I had a similar issue using the boost geometry package and could not upgrade boost to fix the error.

Disable boost deprecated warnings with the below define:

#define BOOST_ALLOW_DEPRECATED_HEADERS
#define BOOST_BIND_GLOBAL_PLACEHOLDERS

Note the second define handles a common warning that occurs alongside of the deprecated warning and may not be needed.

like image 199
VoteCoffee Avatar answered Nov 15 '22 00:11

VoteCoffee