Link to home
Start Free TrialLog in
Avatar of deatc
deatc

asked on

Explicit Constructors

Should C++ constructors always be explicit?
ASKER CERTIFIED SOLUTION
Avatar of Anwar Saiah
Anwar Saiah

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pepr
pepr

@deatc: Do you mean using the explicit keyword as evilrix pointed out, or just explicit definition of otherwise default constructor (from pre C++11 standard)?
It looks like some bug in the system (?) I have found e-mail from 21st July that it was already accepted that day. And if I recall correctly, it really was. I remember it was strangely accepted because of all the same values for each comment. (But I may have overlooked something...)