--- Comment #5 from hjl dot tools at gmail dot com 2008-07-26 19:04 ---
A patch is posted at
http://gcc.gnu.org/ml/gcc-patches/2008-07/msg02096.html
--
hjl dot tools at gmail dot com changed:
What|Removed |Added
---
--- Comment #4 from hjl dot tools at gmail dot com 2008-07-26 18:05 ---
This works for me:
Index: class.c
===
--- class.c (revision 138172)
+++ class.c (working copy)
@@ -4107,7 +4107,7 @@ type_has_user_provided_con
--- Comment #3 from hjl dot tools at gmail dot com 2008-07-26 17:21 ---
I am not sure if
/* Returns true iff class T has a user-provided default constructor. */
bool
type_has_user_provided_default_constructor (tree t)
{
tree fns;
if (!TYPE_HAS_USER_CONSTRUCTOR (t))
return f
--- Comment #2 from hjl dot tools at gmail dot com 2008-07-26 17:08 ---
A simple testcase:
bash-3.2$ cat /tmp/bar.cc
class XObject
{
public:
int foo;
};
class XObjectPtr
{
public:
explicit
XObjectPtr(XObject* theXObject = 0) : m_xobjectPtr(theXObject)
{
}
private:
XObject * m_x
--- Comment #1 from hjl dot tools at gmail dot com 2008-07-26 14:59 ---
Created an attachment (id=15965)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15965&action=view)
A testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36944