This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/14618] Cannot compile test_thread.cpp from boost


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]