------- Comment #17 from d dot frey at gmx dot de 2009-03-13 16:41 -------
(In reply to comment #16)
> Note, just tweaking is_function like this, doesn't completely fix the issue
> for
> me, only the reduced testcase using is_abstract...
And actually I don't even understand why it works even in the reduced testcase
:(
Anyway, I think there might be a more basic problem here, which simply raises
the question how instantiations should work. To explain, I created the
following which has *no* includes:
template< typename T >
struct ptr
{
typename T::type dummy();
};
template< typename T >
struct foo
{
typedef void type;
ptr< foo > p;
};
int main()
{
foo< int > f; // fails without this line
ptr< foo< int > > p;
}
Note that this does *not* depend on c++0x, it shows the exact same problem with
"normal" C++. Is the compiler correct to reject the code when the marked line
is removed? Guess this needs to be taken to the language lawyers.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39405