|
Boost : |
From: Yitzhak Sapir (yitzhaks_at_[hidden])
Date: 2002-05-14 13:58:46
I guess I thought it was necessary so MSVC won't complain. It isn't. The following (which is just a forward declaration with no content) works just as well:
template<int ArityToCheck> struct arity_checker;
> -----Original Message-----
> From: Dirk Gerrits [mailto:dirkg_at_[hidden]]
> Sent: Tuesday, May 14, 2002 7:46 PM
> To: boost_at_[hidden]
> Subject: Re: [boost] Is there a workaround for this MSVC6 deficiency?
>
>
> This is excellent! Thanks a lot. One thing though, why make the
> unspecialized version of arity_helper return yes_type?
>
> Dirk Gerrits
>
> >
> > template<int ArityToCheck> struct arity_checker
> > {
> > static yes_type arity_helper(...);
> > };
> >
> > template<> struct arity_checker<0>
> > {
> > template <class R> static yes_type arity_helper(R (*)());
> > static no_type arity_helper(...);
> > };
> >
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk