Menu ▾ ▴

#291 Add optional specifier 'Explicit' for constructor declaration to inhibit use by compiler in implicit conversions

open
nobody
None
2014-12-12
2014-12-05
No

Optionnal specifier in order to forbid the constructor use by compiler in implicit conversions (only an explicit use of constructor is allowed).

Proposed syntax:
Declare Constructor (...) Explicit

For more explanation on its utility, refer to forum at the synthesis post:
http://www.freebasic.net/forum/viewtopic.php?p=203141#p203141
(see links to the two closed bug reports:

Discussion

  • fxm (freebasic.net)

    This feature is available in C ++, by also using the qualifier 'explicit' but ahead constructor declaration.

     
  • fxm (freebasic.net)

    As in C++, this qualifier "Explicit" should also be usable with the operator "Cast()".

    See forum at post:
    http://www.freebasic.net/forum/viewtopic.php?p=203357#p203357

     

Log in to post a comment.