|
16.2.6 The explicit Keyword
C++ adopted a new explicit keyword to the language. This keyword
is a qualifier used when declaring constructors. When a constructor is
declared as explicit , it becomes invalid to depend on implicit
type conversions to be performed on the constructor arguments. This
allows the compiler to perform stricter type checking and to prevent
simple programming errors. If your compiler does not support the
explicit keyword, you should avoid it and do without the benefits
that it provides.
|