|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-05-13 14:54:37
From: "Andrew R. Thomas-Cramer" <artc_at_[hidden]>
>
> 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.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net