[Concept_Check] Is "int &" copy constructible?
Hi all, I came to this question, since I found that my program using Boost.Concept_check failed to compile when reference types are used as models for the copy constructible concept. I can understand why it failed to compile, as the error messages below explained it: === snip === ..\..\..\boost-1.34\include\boost\concept_check.hpp(176) : warning C4181: qualifier applied to reference type; ignored ..\..\..\boost-1.34\include\boost\concept_check.hpp(176) : error C2529: 'a' : reference to reference is illegal === snip === But my question is more fundamental than this: Is a reference type considered "copy constructible" according to the C++ standard? (Sorry, since I don't have a copy of the Standard at hand, nor am I very good in English to comprehend the Standard even if I had one.) Can any kind soul enlighten me on this concept? Cheers, Freddie -- Wu Yinghui, Freddie Senior Software Engineer Advanced Technology Research and Development Group Volume Interactions Pte Ltd 1 Kim Seng Promenade #12-01 Great World City East Tower Singapore 237994 Tel: +65 62226962 (Ext 216) Fax: +65 62226215 Email: yhwu@volumeinteractions.com URL: http://www.volumeinteractions.com http://www.dextroscope.com Important: This message is intended for the recipient(s) addressed above. It contains privileged and confidential information. If you are not the intended recipient, please notify the sender immediately by replying to this message and then delete it from your system. You must not read, copy, use, or disseminate this communication in any form. Thank you.
Wu Yinghui, Freddie wrote:
But my question is more fundamental than this: Is a reference type considered "copy constructible" according to the C++ standard? (Sorry, since I don't have a copy of the Standard at hand, nor am I very good in English to comprehend the Standard even if I had one.) Can any kind soul enlighten me on this concept?
According to http://tinyurl.com/2qwjkh , it is NO by the definition (20.1.3). -- Shunsuke Sogame
participants (2)
-
shunsuke
-
Wu Yinghui, Freddie