This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/39405] [4.3 regression] std::shared_ptr barfs on incomplete template class that boost::shared_ptr accepts
- From: "d dot frey at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Mar 2009 16:41:39 -0000
- Subject: [Bug libstdc++/39405] [4.3 regression] std::shared_ptr barfs on incomplete template class that boost::shared_ptr accepts
- References: <bug-39405-6959@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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