July 26, 2002 C++ 8.29.17 beta bug report | ||||
---|---|---|---|---|
| ||||
here is one more:
template<class T>
struct A
{
A()
{ }
A(const A<T> &a)
{ }
template<class U>
A(const A<U> &a)
// Error: 'A<char >::A<char >' is already defined
{ }
};
template <class U, class V>
class P
: public V
{
public:
P(const V &v)
: V(v)
{ }
};
template<class T, class U>
struct B
{
public:
U g()
{ return U(P<T, U>(U())); }
};
int main()
{
B<char, A<char> > b;
b.g();
return 0;
}
bye, Christof
--
http://cmeerw.org JID: cmeerw@jabber.at mailto cmeerw at web.de
...and what have you contributed to the Net?
|
July 27, 2002 Re: C++ 8.29.17 beta bug report | ||||
---|---|---|---|---|
| ||||
Posted in reply to Christof Meerwald | I guess this one shouldn't compile, but it currently does:
struct A
{
static const int c = 42;
struct B
{ };
};
int main(int argc)
{
return A::B::c;
}
bye, Christof
--
http://cmeerw.org JID: cmeerw@jabber.at mailto cmeerw at web.de
...and what have you contributed to the Net?
|
Copyright © 1999-2021 by the D Language Foundation