Re: Synopsis Question
David Abrahams <[email protected]>
| Newsgroups | gmane.comp.documentation.synopsis |
|---|---|
| Message-ID | <[email protected]> |
Luke Petre <[email protected]> writes: > namespace > { > Synopsis::ErrorHandler::Callback callback = 0; > > void sighandler(int signo) > { > if (::callback) ::callback(); // MSVC doesn't know what callback is > here!!! > } > } > By the way, I hope this is not in a header file. Usually, the only declarations that can be safely made in an anonymous namespace in a header are declarations of references. Otherwise you risk an ODR violation. -- Dave Abrahams Boost Consulting www.boost-consulting.com