This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/26024] Initializing using methods of class object passed to constructor
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jan 2006 10:29:01 -0000
- Subject: [Bug c++/26024] Initializing using methods of class object passed to constructor
- References: <bug-26024-6439@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rguenth at gcc dot gnu dot org 2006-01-30 10:29 -------
D d(Initializer());
parses as a function declaration, as you see from the error (which is on
the cout line btw.):
// bug.cpp: In function `int main()':
// bug.cpp:35: error: request for member `i_' in `d', which is of
non-class type `D
// ()(Initializer (*)())'
use
D d((Initializer()));
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26024