13 May
2002
13 May
'02
7:54 p.m.
From: "Andrew R. Thomas-Cramer"
Has there been any discussion in the past about supporting a more concise/readable value? E.g., the second call below appears more readable
to me.
(This particular example relies on "boost::null" being a class with a default constructor, and boost::shared_ptr providing a non-explicit constructor accepting a boost::null instance as an argument; this may be flawed.)
foo( boost::shared_ptr<MyVeryLongClassName>() ); foo( boost::null() );
No, I don't recall any discussion about it. I haven't encountered this problem myself; I typically overload foo so that the call would be simply foo(); This doesn't extend well to multiple optional shared_ptr arguments, of course.