This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28365] error: ' error: 'MyClass::MyClass(const MyClass&)' is private error: within this context
- From: "kk at microfocus dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jul 2006 21:49:09 -0000
- Subject: [Bug c++/28365] error: ' error: 'MyClass::MyClass(const MyClass&)' is private error: within this context
- References: <bug-28365-12946@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from kk at microfocus dot com 2006-07-13 21:49 -------
(In reply to comment #2)
> If it is in our (Rogue Wave) current code, could you please let us know where
> so we can look into fixing it? (It's doesn't matter whther gcc does the right
> thing here or not, our code should be portable either way.) Thanks!
OK, here goes. This is what I'm getting. If you guys do have a fix let me know.
You have an operator overload for the Expr but it really can't be used in this
case cause the const constructor is private.
By the way I'm trying to build this on an AIX 5.3 machine with the GNU C++
This really limits me to the gcc 4.0.0 or 4.1.1 compiler.
expr.h:248: error: 'RWDBBoundExpr::RWDBBoundExpr(const RWDBBoundExpr&)' is
private
source/sr_hfd.cpp:397: error: within this context
RW/workspaces/LINUX/GNUC/rw/db/expr.h:248: error:
'RWDBBoundExpr::RWDBBoundExpr(const RWDBBoundExpr&)' is private
source/sr_hfd.cpp:398: error: within this context
RW/workspaces/LINUX/GNUC/rw/db/expr.h:248: error:
'RWDBBoundExpr::RWDBBoundExpr(const RWDBBoundExpr&)' is private
Operator is being overloaded:
inserter.h: RWDBInserter& operator<<( const RWDBExpr& expr );
select.h: RWDBSelector& operator<<(const RWDBExpr& expr);
expr.h:
private:
RWDBBoundExpr(const RWDBBoundExpr&);
RWDBBoundExpr& operator=(const RWDBBoundExpr&);
Here is our code segment:
m_ins = m_table.inserter(schema);
m_ins << RWDBBoundExpr(&m_v_scnid)
<< RWDBBoundExpr(&m_v_id)
<< RWDBBoundExpr(&m_v_row)
<< RWDBBoundExpr(&m_v_col)
<< RWDBBoundExpr(&m_v_attr)
<< RWDBBoundExpr(&m_v_color)
<< RWDBBoundExpr(&m_v_highlight)
<< RWDBBoundExpr(&m_v_hashind)
<< RWDBBoundExpr(&m_v_maxlen)
<< RWDBBoundExpr(&m_v_value);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28365