<div dir="ltr">Do you have a complete (standalone - preprocessed) example of this behavior?</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 17, 2015 at 8:06 AM, Edward Diener <span dir="ltr"><<a href="mailto:eldlistmailingz@tropicsoft.com" target="_blank">eldlistmailingz@tropicsoft.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am using the latest clang built from source. I am seeing this situation:<br>
<br>
class XXX { some_non_copyable_non_<u></u>assignable_member_type member; }<br>
<br>
An object of class XXX never gets copied or assigned (it's a singleton ) and yet clang is giving an errors of the form:<br>
<br>
error: 'operator=' is a private member of 'some_non_assignable_member_<u></u>type'.<br>
<br>
and<br>
<br>
error: field of type 'some_non_copyable_non_<u></u>assignable_member_type' has private copy constructor<br>
<br>
My understanding of C++ is that if a member of a class is non-copyable and non-assignable and an instance of that class is never copied or assigned it is not an error even if the compiler would be creating a default copy constructor and default assignment operator when the class does not have user-defined versions.<br>
<br>
The command line options to the clang++.exe compiler are:<br>
<br>
-c -x c++ -O0 -g -fno-inline -Wall -pedantic -g<br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>