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++/14213] strange behavior with private cp-cstr...


------- Additional Comments From pluto at ds14 dot agh dot edu dot pl  2004-02-20 10:13 -------
(In reply to comment #3) 
> (In reply to comment #2)  
> > When writing    
> >   A a2 = a1;   
> > this has the same requirements as using the   
> >   A a2(a1);   
> > syntax. Thus, the copy constructor needs to be accessible.   
> >    
> > W.   
>   
> Where exactly in the C++ draft is it written?  
 
ok, i found it. 
========================== 
12.8 Copying class objects 
 
class X { 
???//... 
public: 
?X(int); 
?X(const&,?int?=1); 
}; 
X a(1);??//?calls?X(int); 
X b(a,0); // calls X(const X&, int); 
X c = b; // calls X(const X&, int); 
======================== 
EOT. 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14213


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