From: Cromwell Enage (sponage_at_[hidden])
Date: 2004-05-22 11:45:07
--- Aleksey Gurtovoy <agurtovoy_at_[hidden]> wrote:
> This one already exists in Boost, although its
> location is somewhat unexpected; please take a look
> at math/common_factor library,
I should learn to use boost.org's internal Google
> 'typename' is not allowed outside of templates.
> > boost::mpl::modulus<int,14,6>::type
> I suppose you meant 'modulus_c', here.
Yes, I did. Some waiting errands preoccupied my focus
or I would have caught these mistakes.
> > It seems MSVC doesn't recognize A % B as an
> > constant expression.
> Hmm, if I make the above fixes, it compiles fine for
> me. May be
> the problem disappeared when you reduced the code
> for the post?
That it did, at least when I made the corrections from
> > What's the proper way of handling this?
> Fixing the library, which I'll happily do if we can
> the issue.
Now that I know Boost already has a compile-time gcd
metafunction, I don't need to write my own, but FWIW,
I've attached the offending code to this post.
Do you Yahoo!?
Yahoo! Domains Claim yours for only $14.70/year
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk