Note that C.46 does not apply for copy/move ctors (#1169)

* Note that C.46 does not apply for copy/move ctors

* moved Note section before Enforcement section
This commit is contained in:
beinhaerter 2018-03-26 20:12:03 +02:00 committed by Andrew Pardoe
parent 644e0f5b5e
commit edf13aabc0

View File

@ -5330,6 +5330,10 @@ If you really want an implicit conversion from the constructor argument type to
**See also**: [Discussion of implicit conversions](#Ro-conversion)
##### Note
Copy and move constructors should not be made explicit because they do not perform conversions. Explicit copy/move constructors make passing and returning by value difficult.
##### Enforcement
(Simple) Single-argument constructors should be declared `explicit`. Good single argument non-`explicit` constructors are rare in most code based. Warn for all that are not on a "positive list".