NonCopyable: Fix edit.

pull/8509/head
Vincent Coubard 2018-10-24 08:35:10 +01:00 committed by GitHub
parent acaf96834e
commit abeab68729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -82,11 +82,11 @@ namespace mbed {
* There is a subtle bug in this code, the function get_connection returns a * There is a subtle bug in this code, the function get_connection returns a
* reference to a Connection which is captured by value instead of reference. * reference to a Connection which is captured by value instead of reference.
* *
* When the reference get_connection returns is copied into connection, the * When `get_connection` returns a reference to serial_connection it is copied into
* vtable and others members defined in Connection are copied, but members defined * the local variable connection. The vtable and others members defined in Connection
* in SerialConnection are left apart. This can cause severe crashes or bugs if * are copied, but members defined in SerialConnection are left apart. This can cause
* the virtual functions captured use members not present in the base * severe crashes or bugs if the virtual functions captured use members not present
* declaration. * in the base declaration.
* *
* To solve that problem, the copy constructor and assignment operator have to * To solve that problem, the copy constructor and assignment operator have to
* be declared (but don't need to be defined) in the private section of the * be declared (but don't need to be defined) in the private section of the