In general, one argument constructors should be declared as explicit; otherwise unwanted implicit conversions could happen.
Implicit conversions can cause some strange behavior. See: http://blogs.msdn.com/oldnewthing/archive/2006/05/24/605974.aspx
Reference: Steve Weinrich, Unpublished Manuscript on C++ Design.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment