Monday, November 12, 2007

Little Sugar :const function pointers and references

The syntax in c++ for constant function pointers is like this

Handle& (*const getHandle) = handle;

where handle is a function returning a reference to the handle.

The syntax for reference function pointers is like this:

Handle& (&getHandle) = handle;

No comments: