diff options
| author | Alexis Hunt <alercah@gmail.com> | 2011-12-29 18:40:13 +0000 |
|---|---|---|
| committer | Alexis Hunt <alercah@gmail.com> | 2011-12-29 18:40:13 +0000 |
| commit | c4f1b4ad306d1ab32c51d1890ca9296a8c89bbc5 (patch) | |
| tree | c713d2944878883599a2119cf2cdff47a4825e62 | |
| parent | 97f05c576853daba5cce8fb72a1640d2cb9d66d6 (diff) | |
| download | bcm5719-llvm-c4f1b4ad306d1ab32c51d1890ca9296a8c89bbc5.tar.gz bcm5719-llvm-c4f1b4ad306d1ab32c51d1890ca9296a8c89bbc5.zip | |
Make this text slightly more accurate; thanks to Johannes Schaub for
pointing this out.
llvm-svn: 147346
| -rw-r--r-- | clang/www/compatibility.html | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/www/compatibility.html b/clang/www/compatibility.html index 2102ccca7e1..ca43e1951d5 100644 --- a/clang/www/compatibility.html +++ b/clang/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> |

