spirit::extended_variant in c++11 mode

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

spirit::extended_variant in c++11 mode

Damir Nedzibovic
Hello folks,

I'm having some hard times compiling the following code in c++11 mode:

#include <boost/spirit/include/support_extended_variant.hpp>
#include <string>

class value
    : public boost::spirit::extended_variant<std::string>
    {
    };

int main()
{
}


the error is:

In file included from /usr/include/boost/preprocessor/repeat.hpp:15:0,
                 from /usr/include/boost/mpl/aux_/preprocessor/params.hpp:46,
                 from /usr/include/boost/type_traits/detail/template_arity_spec.hpp:12,
                 from /usr/include/boost/type_traits/detail/bool_trait_def.hpp:14,
                 from /usr/include/boost/type_traits/is_lvalue_reference.hpp:28,
                 from /usr/include/boost/type_traits/is_reference.hpp:16,
                 from /usr/include/boost/type_traits/is_const.hpp:29,
                 from /usr/include/boost/type_index/stl_type_index.hpp:35,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/variant/variant.hpp:21,
                 from /usr/include/boost/variant.hpp:17,
                 from /usr/include/boost/spirit/home/support/extended_variant.hpp:14,
                 from /usr/include/boost/spirit/include/support_extended_variant.hpp:16,
                 from x.cpp:1:
/usr/include/boost/spirit/home/support/extended_variant.hpp:33:9: error: ‘BOOST_PP_REPEAT_1_BOOST_VARIANT_LIMIT_TYPES’ has not been declared
         BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
         ^

and so on. The compiler is g++ 4.9.2, boost 1.58, host os arch linux. Please note that the code compiles w/o any issues in c++03 mode. Funny thing is that it also compiles on Mac OS X with clang 3.6 in c++11 mode.

Any help would be appreciated. 

thanks,
d

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: spirit::extended_variant in c++11 mode

Joel de Guzman
On 5/11/15 9:12 PM, Damir Nedzibovic wrote:
> Hello folks,
>
> I'm having some hard times compiling the following code in c++11 mode:
>
> #include <boost/spirit/include/support_extended_variant.hpp>
> #include <string>
>

You should probably use the one in X3 for now. That will replace
the extended_variant in support soon. The names are a bit different
though. It is called x3::variant, instead of extended_variant and
x3::forward_ast instead of boost::recursive_variant.

boost/spirit/home/x3/support/ast/variant.hpp

After we get X3 released, I'll have some template aliases in the
original extended_variant that points to x3::variant.

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general