Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
July 15, 2002 new C++ 8.29.11 beta | ||||
---|---|---|---|---|
| ||||
Thanks to all your bug reports, lots of template bugs were fixed. www.digitalmars.com/dmc/dmcppDownload.html |
July 16, 2002 Re: new C++ 8.29.11 beta | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | "Walter" <walter@digitalmars.com> schrieb im Newsbeitrag news:agvkei$2smv$1@digitaldaemon.com... > Thanks to all your bug reports, lots of template bugs were fixed. Just a little quirk: The web-page still mentions 8.29.10 be aware not to get confused by all the versions. Robert |
July 16, 2002 Re: new C++ 8.29.11 beta | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert M. Münch | "Robert M. Münch" <robert.muench@robertmuench.de> wrote in message news:ah0g93$m7n$1@digitaldaemon.com... > "Walter" <walter@digitalmars.com> schrieb im Newsbeitrag news:agvkei$2smv$1@digitaldaemon.com... > > Thanks to all your bug reports, lots of template bugs were fixed. > > Just a little quirk: The web-page still mentions 8.29.10 be aware not to get > confused by all the versions. Robert Not any more! Thanks for the correction. |
July 16, 2002 Re: new C++ 8.29.11 beta | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Here is one more:
template <class T> class A
{
public:
A()
{
T v;
v = T(v);
}
};
template <class T1, class T2>
struct B
{
T1 first;
T2 second;
B() : first(T1()), second(T2())
{ }
B(const T1 &a, const T2 &b)
: first(a), second(b)
{ }
template <class U1, class U2>
B(const B<U1, U2>& x)
: first(x.first), second(x.second)
// Error: need explict cast to convert
// from: const B<int ,char >
// to : int
{ }
};
int main()
{
A<B<B<int, char>, bool> > a;
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 17, 2002 Re: new C++ 8.29.11 beta | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | and another one:
template<class T>
struct A
{
typedef A<T> &(*f_t)(A<T>&);
A<T> &operator<<(f_t f) { return f(*this); }
};
template <class T>
inline A<T> &
f(A<T> &a)
{
return a;
}
int main(int argc, char *argv[])
{
A<char> a;
a << f;
// Error: illegal operand types
// Had: A<char >
return 0;
}
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