You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C++ often requires you to explicitly cast NULL to a specific type when it
is used to invoke a function template, which is tedious. We can add the
following class:
class Null {
public:
template <typename T>
operator T*() const { return NULL; }
};
Then the user should be able to write Null() wherever a NULL pointer is
expected, even when invoking a templatized function.
Original issue reported on code.google.com by shiq...@gmail.com on 8 Oct 2008 at 9:35
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
shiq...@gmail.com
on 8 Oct 2008 at 9:35The text was updated successfully, but these errors were encountered: