diff options
author | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2011-12-29 18:40:13 +0000 |
---|---|---|
committer | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2011-12-29 18:40:13 +0000 |
commit | 04bea93961d8d276ed50892316debeeaf61d8415 (patch) | |
tree | d8f2011e71f953f831b5441f0f4a0492e4db5124 /www | |
parent | e14e08b2552b43d81a295401ddf9b8da2c499233 (diff) |
Make this text slightly more accurate; thanks to Johannes Schaub for
pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147346 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'www')
-rw-r--r-- | www/compatibility.html | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/www/compatibility.html b/www/compatibility.html index 2102ccca7e..ca43e1951d 100644 --- a/www/compatibility.html +++ b/www/compatibility.html @@ -769,7 +769,7 @@ void f(int a, int a); <!-- ======================================================================= --> <p>In C++11, the explicit declaration of a move constructor or a move -assignment operator within a class disables the implicit declaration +assignment operator within a class deletes the implicit declaration of the copy constructor and copy assignment operator. This change came fairly late in the C++11 standardization process, so early implementations of C++11 (including Clang before 3.0, GCC before 4.7, @@ -778,16 +778,17 @@ accept this ill-formed code:</p> <pre> struct X { - X(X&&); <i>// suppresses implicit copy constructor</i> + X(X&&); <i>// deletes implicit copy constructor:</i> + <i>// X(const X&) = delete;</i> }; void f(X x); void g(X x) { - f(x); <i>// error: X has no copy constructor</i> + f(x); <i>// error: X has a deleted copy constructor</i> } </pre> -<p>This affects some C++11 code, including Boost's popular <a +<p>This affects some early C++11 code, including Boost's popular <a href="http://www.boost.org/doc/libs/release/libs/smart_ptr/shared_ptr.htm"><tt>shared_ptr</tt></a> up to version 1.47.0. The fix for Boost's <tt>shared_ptr</tt> is <a href="https://svn.boost.org/trac/boost/changeset/73202">available here</a>.</p> |