Date: 2001-08-29 14:37:13
--- In boost_at_y..., Douglas Gregor <gregod_at_c...> wrote:
> It makes sense to make the algorithm work at its natural level of
> abstraction. If a Euclidean ring is the algebraic structure on which
> algorithm is defined, then it should work for all Euclidean rings.
> Additionally, I think it does make sense to use a static assert in
> especially because a Euclidean ring is a sufficiently rich
> structure that not all algebraic types conform to.
> What I'm saying is that the
> ::boost::extensible_traits<is_euclidian_ring_tag, T>::value
> approach can get very unweildy. If I have a type Foo that models a
> ring, I don't want to specialize extensible traits for the tags:
I agree to all three points.
The problem is, however, that to my current knowledge
I do not know a solution that satisfies all three points
In my personal preferences, I would drop the static
if a class offers a %= operator
in the usual semantics,
there are good chances that it is already an Euclidian ring,
so we have already a compile time check for the most usual cases.
I, however, do not know the preferences of other people.
Maybe someone has a great idea how to satisfy all three points.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk