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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.