[C++-sig] Re: register_exception_translator problem in 1.31.0
Dan Halbert
halbert at bbn.com
Thu Mar 4 00:32:06 CET 2004
David Abrahams <dave at boost-consulting.com> wrote:
>> >> register_exception_translator<My::Own::Exception>(translate);
>> >Add an ampersand ('&') here-------------------------------^
>>
>Hmm. Do me a favor, please. In exception_translator.hpp, change:
>
> template <class ExceptionType, class Translate>
> void register_exception_translator(Translate const& translate, boost::type<ExceptionType>* = 0)
> ^^^^^^
>to:
>
> template <class ExceptionType, class Translate>
> void register_exception_translator(Translate translate, boost::type<ExceptionType>* = 0)
>
>and try your example again. I expect it works, and if so I'm inclined
>to change the signature of register_exception_translator.
OK, I did try this, and now it works either with "&translate" or plain
"translate" above. So that does seem better.
Dan
More information about the Cplusplus-sig
mailing list