This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14618] Cannot compile test_thread.cpp from boost
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Mar 2004 15:08:21 -0000
- Subject: [Bug c++/14618] Cannot compile test_thread.cpp from boost
- References: <20040317093829.14618.schmid@snake.iap.physik.tu-darmstadt.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2004-03-17 15:08 -------
Subject: Re: Cannot compile test_thread.cpp from boost
"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| You generate a temporary in the call to foo(), and the standard prescribes
| that when binding the temporary to the const reference, the copy constructor
| of D must be accessible, even if it is unused. Thus, the error
|
| g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
| x.cc: In copy constructor `D::D(const D&)':
| x.cc:7: error: `noncopyable::noncopyable(const noncopyable&)' is private
| x.cc:4: error: within this context
|
| seems sensible to me. However, the error messages do not refer to the
| line where we attempt to perform this copy (or where the compiler wants
| to check that the copy constructor is accessible).
|
| Nathan, Gaby, would you agree?
Your analysis is correct. Maybe we would like to put a documentation
for this in the "non bugs" section we used to have. Any taker?
(that is becoming an FAQ).
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14618