c++.beta - no implicit conversion with explicit constructor
-
Christof Meerwald
(33/33)
Jun 08 2003
template
-
gf
(7/9)
Jun 08 2003
Christof Meerwald
wrote in news:bbvpdi$1ffo$1
template <class T>
inline bool operator!=(const T &x, const T &y)
{
return !(x == y);
}
struct A
{
explicit A(int init_val)
: value(init_val)
{ }
operator int () const
{
return value;
}
private:
int value;
};
int main()
{
A a(0);
if (a != 1)
// Error: no implicit conversion with explicit constructor
{
return 0;
}
return 1;
}
Also extracted from Boost.
bye, Christof
--
http://cmeerw.org JID: cmeerw jabber.at
mailto cmeerw at web.de
...and what have you contributed to the Net?
Jun 08 2003
Christof Meerwald <cmeerw web.de> wrote in news:bbvpdi$1ffo$1 digitaldaemon.com: [...]Also extracted from Boost. bye, ChristofWhat does it take to see DM C++ in this list? (http://boost.sourceforge.net/regression-logs/) Run their regression tests and send them the results? /gf
Jun 08 2003








gf <mz_y2k yahoo...com>