Boost logo

Boost :

From: SourceForge.net (noreply_at_[hidden])
Date: 2006-03-18 09:10:38


Bugs item #1453180, was opened at 2006-03-18 15:10
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1453180&group_id=7586

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: mpl
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Eelis (eelis)
Assigned to: Aleksey Gurtovoy (agurtovoy)
Summary: mpl::remove compile error with gcc 4.1.0

Initial Comment:
The following four lines fail to compile using gcc
4.1.0 with boost 1.33.1:

  #include <boost/mpl/vector.hpp>
  #include <boost/mpl/remove.hpp>
  template <typename> struct X { struct type {}; };
  typedef boost::mpl::remove<boost::mpl::vector<int>,
X<int>::type>::type T;

Error:

boost/mpl/aux_/preprocessed/gcc/template_arity.hpp: In
instantiation of ‘const int
boost::mpl::aux::template_arity_impl<X<int>::type,
1>::value’:
boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:93:
  instantiated from ‘const int
boost::mpl::aux::template_arity<X<int>::type>::value’
boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:98:
  instantiated from
‘boost::mpl::aux::template_arity<X<int>::type>’
boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp:123:
instantiated from
‘boost::mpl::lambda<boost::mpl::same_as<X<int>::type>,
mpl_::void_, mpl_::int_<1> >’
boost/mpl/remove_if.hpp:57: instantiated from
‘boost::mpl::aux::remove_if_impl<boost::mpl::vector<int,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na>,
boost::mpl::same_as<X<int>::type>,
boost::mpl::back_inserter<boost::mpl::vector0<mpl_::na>
> >’
boost/mpl/remove.hpp:33: instantiated from
‘boost::mpl::aux::remove_impl<boost::mpl::vector<int,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na>, X<int>::type,
boost::mpl::back_inserter<boost::mpl::vector0<mpl_::na>
> >’
boost/mpl/remove.hpp:48: instantiated from
‘boost::mpl::remove<boost::mpl::vector<int, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na>, X<int>::type, mpl_::na>’
t.cpp:4: instantiated from here
boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:85:
error: call of overloaded
‘arity_helper(boost::mpl::aux::type_wrapper<X<int>::type>,
boost::mpl::aux::arity_tag<1>)’ is ambiguous
boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:30:
note: candidates are: char (&
boost::mpl::aux::arity_helper(...))[1]
boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:37:
note: char (&
boost::mpl::aux::arity_helper(boost::mpl::aux::type_wrapper<F<T1>
>, boost::mpl::aux::arity_tag<1>))[2] [with F = X<
<template-parameter-1-1> >::type, T1 = int]
boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:37:
note: char (&
boost::mpl::aux::arity_helper(boost::mpl::aux::type_wrapper<F<T1>
>, boost::mpl::aux::arity_tag<1>))[2] [with F = X<
<template-parameter-1-1> >::type, T1 = int]

The code compiles fine with gcc 4.0.2.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1453180&group_id=7586

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs


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