Boost logo

Boost :

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,

Oh, good!

I should learn to use's internal Google
engine more.

> '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
> integral
> > 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
your post.

> >
> > What's the proper way of handling this?
> Fixing the library, which I'll happily do if we can
> reproduce
> 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.

                              Cromwell Enage

Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year

Boost list run by bdawes at, gregod at, cpdaniel at, john at