;
We believe that
Base b2 = 5;
should call Base::Base( int ). The same code compiles and executes fine under
Microsoft Visual Studio.
--
Summary: Conversion Constructor not accepted/recognized
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Curatica at gmail dot com
GCC build triplet: What is this?
GCC host triplet: Not sure what this means; here is the result of uname -
a: Linux
GCC target triplet: What is this?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42470
Base b5; b5 = b2;
cout << "b5: " << b5 << endl;
}
int main( int argc, char** argv )
{
test1();
}
/
But the operator =() does not return a value! This error is caught by MS Visual
Studio.
--- Comment #2 from Curatica at gmail dot com 2009-12-25 00:08 ---
Thanks (not sure what 4.1.0 referred to)...
--
Curatica at gmail dot com changed:
What|Removed |Added
--- Comment #2 from Curatica at gmail dot com 2009-12-25 02:04 ---
Please, understand that for me this is just a disinterested, academic
discussion: no offense. I am not sure that I agree with the theory.
The standard (8.5.1) states that:
T x = a;
is a "copy-initialization
--- Comment #4 from Curatica at gmail dot com 2009-12-25 21:11 ---
Whatever...
--
Curatica at gmail dot com changed:
What|Removed |Added
Status|RESOLVED
--- Comment #5 from Curatica at gmail dot com 2009-12-25 21:12 ---
Whatever...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42470