This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/43608] Boost.MPL code doesn't get the placeholders substituted anymore
- From: "jason at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Apr 2010 14:47:23 -0000
- Subject: [Bug c++/43608] Boost.MPL code doesn't get the placeholders substituted anymore
- References: <bug-43608-12965@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from jason at gcc dot gnu dot org 2010-04-01 14:47 -------
My copy of EDG 4.1 does not accept the reduced testcase; it gives the same
error as GCC 4.5.
"red.cc", line 111: error: class "arg<2>" has no member "inner_type"
typedef typename Foo::inner_type type;
^
detected during:
instantiation of class "metafunction<Foo> [with Foo=arg<2>]" at
line 83
instantiation of class "template_arity_impl<F, N> [with
F=metafunction<arg<2>>, N=1]" at line 91
instantiation of class
"template_arity<F> [with F=metafunction<arg<2>>]" at
line 116
We instantiate metafunction<arg<2>> for argument-dependent lookup of the call
to arity_helper(type_wrapper<F>). 3.4.2 says that if an argument type is a
class template specialization, we consider the associated classes and
namespaces of the template arguments, which in this case means F, or
metafunction<arg<2>>. And in order to perform that lookup, we instantiate
metafunction<arg<2>>.
Providing the explicit specialization prevents the implicit instantiation, so
argument-dependent lookup just doesn't consider that scope. This is also fully
conformant.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43608