I can have a declaration of three type constructors
C::C(const C&)
C::C(C&&)
C::C(const C&&)
in a class without ambiguity.
What do we call a type constructor C::C(const C&&)? Does he have some kind of nickname?
I can come up with =deleteto explicitly prohibit users from unknowingly trying to navigate with constand limit the effect of automatic backups. This reminds users what they are doing.
=delete
const
And is there any other use for it?
C::C(C const&&);
is what I call the const constructor.
, (A) , (B) ( const, - undefined).
, C mutable, - . , , a const&, C const&&.
C
mutable
const&
const&&
=delete . .
Source: https://habr.com/ru/post/1686829/More articles:The best way to check if an array of primitives contains all the primitives in another array - javaAdd "icon notification" for progressive web application (PWA) - androidkeep margin when link view disappears in ConstraintLayout - androidhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1686827/in-aspnet-classic-can-configureawaitfalse-cause-continuations-to-execute-in-parallel-on-multiple-threads&usg=ALkJrhjS3CMGrRJiKq2M1oucBU5qd0qKzgExtract substring in bash from file with pattern location from given position to special character - substringIssues with Google Tag Manager embedded in Click and shadow-dom trigger - google-tag-managerAdd a note @ Pipe / @ Directive / @ Component. error - angularSUM OVER PARTITION BY VIEW - NULL, но работает при непосредственном использовании - sql-serverHow to remove cordova-plugin-compat? - cordovaWriting DataFrame to mysql table using pySpark - pythonAll Articles