Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2001-08-29 08:26:10


On Wednesday 29 August 2001 09:07, you wrote:
> --- In boost_at_y..., scleary_at_j... wrote:
> > > Why do you restrict by a BOOST_STATIC_ASSERT to integers only?
> > >
> > > The Euclidian algorithm works for every Euclidian
> > > ring.
> > > I do not see, why the specific implementation should not work
> > > e.g. for polynomials.
> >
> > I think we should restrict it to integers, at least until we can
>
> support
>
> > BOOST_STATIC_ASSERT(::boost::numeric_traits::is_euclidian_ring<T,
> > op>::value);
> >
> > :)
>
> Then I would say that we need such traits
> or, maybe
>
> ::boost::extensible_traits<is_euclidian_ring_tag, T>::value,
>
> cf. http://groups.yahoo.com/group/boost/message/16610

One problem with such an approach is that it can very quickly become
unwieldy. If you have constructed your own user-defined Euclidean ring type,
you want to say that it is a Euclidean ring: you don't want to say that it is
a Euclidean ring, an Abelian group, a monoid, etc. Also note that
"is_euclidean_ring_tag" is not specific enough, because it doesn't refer to
any of the operators or specific elements (identity, unity).

(I missed the discussion of this earlier, otherwise I would have chimed in.
I'll try to catch up on it later).

        Doug


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk