Boost logo

Boost Users :

Subject: [Boost-users] enable_if error with Intel compiler 15.0.1
From: Matthieu Brucher (matthieu.brucher_at_[hidden])
Date: 2015-07-21 12:09:13


Hi,

I got this error on Linux with the Intel compiler:

PATH/boost/boost_1_58_0/include/boost/core/enable_if.hpp(36): error:
incomplete type is not allowed
    struct enable_if : public enable_if_c<Cond::value, T> {};
                                          ^
          detected during:
            instantiation of class "boost::enable_if<Cond, T> [with
Cond=boost::mpl::and_<boost::fusion::traits::is_sequence<boost::fusion::cons<boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>, boost::fusion::cons<boost::spirit::qi::action<boost::spirit::qi::reference<const
boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const char *,
std::basic_string<char, std::char_traits<char>,
std::allocator<char>>>, expr_node (),
boost::spirit::ascii::space_type,
                      boost::spirit::unused_type,
boost::spirit::unused_type>>,
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::assign,
boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::attribute<0>>, 0L>,
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::phoenix::detail::tag::function_eval,

boost::proto::argsns_::list4<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<binary_op_phx>, 0L>,
boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<const char *>, 0L>,
boost::spirit::_val_type, boost::spirit::_1_type>, 4L>>>, 2L>>>,
boost::fusion::nil_>>>,

boost::mpl::not_<boost::is_convertible<boost::fusion::cons<boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>, boost::fusion::cons<boost::spirit::qi::action<boost::spirit::qi::reference<const
boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const char *,
std::basic_string<char, std::char_traits<char>,
std::allocator<char>>>, expr_node (),
boost::spirit::ascii::space_type, boost::spirit::unused_type,
boost::spirit::unused_type>>,

boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::assign,
boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::attribute<0>>, 0L>,
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::phoenix::detail::tag::function_eval,
boost::proto::argsns_::list4<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
                      boost::proto::argsns_::term<binary_op_phx>, 0L>,
boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<const char *>, 0L>,
boost::spirit::_val_type, boost::spirit::_1_type>, 4L>>>, 2L>>>,
boost::fusion::nil_>>,
boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>>>, boost::mpl::bool_<true>, boost::mpl::bool_<true>,
boost::mpl::bool_<true>>, T=void]" at line 92 of

"PATH/boost/boost_1_58_0/include/boost/type_traits/is_convertible.hpp"
            instantiation of class
"boost::detail::is_convertible_basic_impl<From, To, false> [with
From=boost::fusion::cons<boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>, boost::fusion::cons<boost::spirit::qi::action<boost::spirit::qi::reference<const
boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const char *,
std::basic_string<char, std::char_traits<char>,
std::allocator<char>>>, expr_node (),
boost::spirit::ascii::space_type,
                      boost::spirit::unused_type,
boost::spirit::unused_type>>,
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::assign,
boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::attribute<0>>, 0L>,
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::phoenix::detail::tag::function_eval,

boost::proto::argsns_::list4<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<binary_op_phx>, 0L>,
boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<const char *>, 0L>,
boost::spirit::_val_type, boost::spirit::_1_type>, 4L>>>, 2L>>>,
boost::fusion::nil_>>,
To=boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>]" at line 357 of

"PATH/boost/boost_1_58_0/include/boost/type_traits/is_convertible.hpp"
            instantiation of class
"boost::detail::is_convertible_impl<From, To> [with
From=boost::fusion::cons<boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>, boost::fusion::cons<boost::spirit::qi::action<boost::spirit::qi::reference<const
boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const char *,
std::basic_string<char, std::char_traits<char>,
std::allocator<char>>>, expr_node (),
boost::spirit::ascii::space_type, boost::spirit::unused_type,
                      boost::spirit::unused_type>>,
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::assign,
boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::attribute<0>>, 0L>,
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::phoenix::detail::tag::function_eval,
boost::proto::argsns_::list4<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
                      boost::proto::argsns_::term<binary_op_phx>, 0L>,
boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<const char *>, 0L>,
boost::spirit::_val_type, boost::spirit::_1_type>, 4L>>>, 2L>>>,
boost::fusion::nil_>>,
To=boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>]" at line 437 of

"PATH/boost/boost_1_58_0/include/boost/type_traits/is_convertible.hpp"
            instantiation of class
"boost::detail::is_convertible_impl_dispatch<From, To> [with
From=boost::fusion::cons<boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>, boost::fusion::cons<boost::spirit::qi::action<boost::spirit::qi::reference<const
boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const char *,
std::basic_string<char, std::char_traits<char>,
std::allocator<char>>>, expr_node (),
boost::spirit::ascii::space_type,
                      boost::spirit::unused_type,
boost::spirit::unused_type>>,
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::assign,
boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::attribute<0>>, 0L>,
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::phoenix::detail::tag::function_eval,

boost::proto::argsns_::list4<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<binary_op_phx>, 0L>,
boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<const char *>, 0L>,
boost::spirit::_val_type, boost::spirit::_1_type>, 4L>>>, 2L>>>,
boost::fusion::nil_>>,
To=boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>]" at line 482 of

"PATH/boost/boost_1_58_0/include/boost/type_traits/is_convertible.hpp"
            instantiation of class "boost::is_convertible<From, To>
[with From=boost::fusion::cons<boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>, boost::fusion::cons<boost::spirit::qi::action<boost::spirit::qi::reference<const
boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const char *,
std::basic_string<char, std::char_traits<char>,
std::allocator<char>>>, expr_node (),
boost::spirit::ascii::space_type, boost::spirit::unused_type,
                      boost::spirit::unused_type>>,
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::assign,
boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::attribute<0>>, 0L>,
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::phoenix::detail::tag::function_eval,
boost::proto::argsns_::list4<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
                      boost::proto::argsns_::term<binary_op_phx>, 0L>,
boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<const char *>, 0L>,
boost::spirit::_val_type, boost::spirit::_1_type>, 4L>>>, 2L>>>,
boost::fusion::nil_>>,
To=boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>]" at line 27 of

"PATH/boost/boost_1_58_0/include/boost/mpl/aux_/nested_type_wknd.hpp"
            [ 26 instantiation contexts not shown ]
            instantiation of class
"boost::proto::transform<PrimitiveTransform, X>::result<Sig> [with
PrimitiveTransform=boost::proto::switch_<boost::spirit::meta_compiler<boost::spirit::qi::domain>::cases,
boost::proto::tag_of<boost::proto::_> ()>, X=void,
Sig=boost::spirit::meta_compiler<boost::spirit::qi::domain>::meta_grammar
(boost::proto::exprns_::expr<boost::proto::tagns_::tag::shift_right,
boost::proto::argsns_::list2<const

boost::proto::exprns_::expr<boost::proto::tagns_::tag::subscript,
boost::proto::argsns_::list2<boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const
char *, std::basic_string<char, std::char_traits<char>,
std::allocator<char>>>, expr_node (),
boost::spirit::ascii::space_type, boost::spirit::unused_type,
boost::spirit::unused_type> &, const
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::assign,

boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::attribute<0>>, 0L>,
boost::spirit::_1_type>, 2L>> &>, 2L> &, const
boost::proto::exprns_::expr<boost::proto::tagns_::tag::dereference,
boost::proto::argsns_::list1<const
boost::proto::exprns_::expr<boost::proto::tagns_::tag::shift_right,
boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
                      boost::proto::argsns_::term<const char &>, 0L>,
const boost::proto::exprns_::expr<boost::proto::tagns_::tag::subscript,
boost::proto::argsns_::list2<boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const
char *, std::basic_string<char, std::char_traits<char>,
std::allocator<char>>>, expr_node (),
boost::spirit::ascii::space_type, boost::spirit::unused_type,
boost::spirit::unused_type> &, const

boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::assign,
boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::attribute<0>>, 0L>,
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::phoenix::detail::tag::function_eval,
boost::proto::argsns_::list4<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
                      boost::proto::argsns_::term<binary_op_phx>, 0L>,
boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<const char *>, 0L>,
boost::spirit::_val_type, boost::spirit::_1_type>, 4L>>>, 2L>> &>, 2L>
&>, 2L> &>, 1L> &>, 2L>, boost::mpl::void_,
boost::spirit::unused_type)]" at line 206 of
"PATH/boost/boost_1_58_0/include/boost/spirit/home/support/meta_compiler.hpp"
            instantiation of class
"boost::spirit::result_of::compile<Domain, Expr, Modifiers, Enable>
[with Domain=boost::spirit::qi::domain,
Expr=boost::proto::exprns_::expr<boost::proto::tagns_::tag::shift_right,
boost::proto::argsns_::list2<const
boost::proto::exprns_::expr<boost::proto::tagns_::tag::subscript,
boost::proto::argsns_::list2<boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const
char *, std::basic_string<char, std::char_traits<char>,
std::allocator<char>>>, expr_node (),
                      boost::spirit::ascii::space_type,
boost::spirit::unused_type, boost::spirit::unused_type> &, const
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::assign,
boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::attribute<0>>, 0L>,
boost::spirit::_1_type>, 2L>> &>, 2L> &, const
boost::proto::exprns_::expr<boost::proto::tagns_::tag::dereference,
                      boost::proto::argsns_::list1<const
boost::proto::exprns_::expr<boost::proto::tagns_::tag::shift_right,
boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<const char &>, 0L>, const
boost::proto::exprns_::expr<boost::proto::tagns_::tag::subscript,
boost::proto::argsns_::list2<boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const
char *, std::basic_string<char, std::char_traits<char>,
                      std::allocator<char>>>, expr_node (),
boost::spirit::ascii::space_type, boost::spirit::unused_type,
boost::spirit::unused_type> &, const
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::assign,
boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::attribute<0>>, 0L>,

boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::phoenix::detail::tag::function_eval,
boost::proto::argsns_::list4<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<binary_op_phx>, 0L>,
boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<const char *>, 0L>,
boost::spirit::_val_type, boost::spirit::_1_type>, 4L>>>, 2L>> &>, 2L>
&>, 2L> &>, 1L> &>, 2L>,
                      Modifiers=boost::spirit::unused_type,
Enable=void]" at line 184 of
"PATH/boost/boost_1_58_0/include/boost/spirit/home/qi/nonterminal/rule.hpp"
            instantiation of "void boost::spirit::qi::rule<Iterator,
T1, T2, T3, T4>::define<Auto,Expr>(boost::spirit::qi::rule<Iterator,
T1, T2, T3, T4> &, const Expr &, boost::mpl::true_) [with
Iterator=__gnu_cxx::__normal_iterator<const char *,
std::basic_string<char, std::char_traits<char>,
std::allocator<char>>>, T1=expr_node (),
T2=boost::spirit::ascii::space_type, T3=boost::spirit::unused_type,
T4=boost::spirit::unused_type, Auto=boost::mpl::false_,

Expr=boost::proto::exprns_::expr<boost::proto::tagns_::tag::shift_right,
boost::proto::argsns_::list2<const
boost::proto::exprns_::expr<boost::proto::tagns_::tag::subscript,
boost::proto::argsns_::list2<boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const
char *, std::basic_string<char, std::char_traits<char>,
std::allocator<char>>>, expr_node (),
boost::spirit::ascii::space_type, boost::spirit::unused_type,
boost::spirit::unused_type> &, const

boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::assign,
boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::attribute<0>>, 0L>,
boost::spirit::_1_type>, 2L>> &>, 2L> &, const
boost::proto::exprns_::expr<boost::proto::tagns_::tag::dereference,
boost::proto::argsns_::list1<const
boost::proto::exprns_::expr<boost::proto::tagns_::tag::shift_right,

boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<const char &>, 0L>, const
boost::proto::exprns_::expr<boost::proto::tagns_::tag::subscript,
boost::proto::argsns_::list2<boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const
char *, std::basic_string<char, std::char_traits<char>,
std::allocator<char>>>, expr_node (),
boost::spirit::ascii::space_type, boost::spirit::unused_type,
                      boost::spirit::unused_type> &, const
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::assign,
boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::attribute<0>>, 0L>,
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::phoenix::detail::tag::function_eval,

boost::proto::argsns_::list4<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<binary_op_phx>, 0L>,
boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<const char *>, 0L>,
boost::spirit::_val_type, boost::spirit::_1_type>, 4L>>>, 2L>> &>, 2L>
&>, 2L> &>, 1L> &>, 2L>]" at line 221 of

"PATH/boost/boost_1_58_0/include/boost/spirit/home/qi/nonterminal/rule.hpp"
            instantiation of "boost::spirit::qi::rule<Iterator, T1,
T2, T3, T4> &boost::spirit::qi::rule<Iterator, T1, T2, T3,
T4>::operator=(const Expr &) [with
Iterator=__gnu_cxx::__normal_iterator<const char *,
std::basic_string<char, std::char_traits<char>,
std::allocator<char>>>, T1=expr_node (),
T2=boost::spirit::ascii::space_type, T3=boost::spirit::unused_type,
T4=boost::spirit::unused_type,
Expr=boost::proto::exprns_::expr<boost::proto::tagns_::tag::shift_right,
                      boost::proto::argsns_::list2<const
boost::proto::exprns_::expr<boost::proto::tagns_::tag::subscript,
boost::proto::argsns_::list2<boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const
char *, std::basic_string<char, std::char_traits<char>,
std::allocator<char>>>, expr_node (),
boost::spirit::ascii::space_type, boost::spirit::unused_type,
boost::spirit::unused_type> &, const
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::assign,

boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::attribute<0>>, 0L>,
boost::spirit::_1_type>, 2L>> &>, 2L> &, const
boost::proto::exprns_::expr<boost::proto::tagns_::tag::dereference,
boost::proto::argsns_::list1<const
boost::proto::exprns_::expr<boost::proto::tagns_::tag::shift_right,
boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
                      boost::proto::argsns_::term<const char &>, 0L>,
const boost::proto::exprns_::expr<boost::proto::tagns_::tag::subscript,
boost::proto::argsns_::list2<boost::spirit::qi::rule<__gnu_cxx::__normal_iterator<const
char *, std::basic_string<char, std::char_traits<char>,
std::allocator<char>>>, expr_node (),
boost::spirit::ascii::space_type, boost::spirit::unused_type,
boost::spirit::unused_type> &, const

boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::assign,
boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::attribute<0>>, 0L>,
boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::phoenix::detail::tag::function_eval,
boost::proto::argsns_::list4<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
                      boost::proto::argsns_::term<binary_op_phx>, 0L>,
boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<const char *>, 0L>,
boost::spirit::_val_type, boost::spirit::_1_type>, 4L>>>, 2L>> &>, 2L>
&>, 2L> &>, 1L> &>, 2L>]" at line 82 of "test.cpp"
            instantiation of "Grammar<Iterator>::Grammar() [with
Iterator=__gnu_cxx::__normal_iterator<const char *,
std::basic_string<char, std::char_traits<char>,
std::allocator<char>>>]" at line 92 of "test.cpp"

I can't make sense of this, as it works fine with gcc or Visual Studio.
The original file is far bigger, but this is the smallest grammar I
could make that displays this error...

If someone knows...

Matthieu

-- 
Information System Engineer, Ph.D.
Blog: http://matt.eifelle.com
LinkedIn: http://www.linkedin.com/in/matthieubrucher
Music band: http://liliejay.com/



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net