
Hi, I have been using boost/operators.hpp recently, and found it quite good at removing lines of code from my maintainance area :) I have some remarks about it : 1/ The mixed operators are only provided if you know the type in advance and it is fixed. For example, it is not possible for example to mix with a template family of types. E.g. let's say that My_type has to provide mixed operators with all types X<U>. This is not possible to do with the current library. Another related thing is how to express "I want My_type to mix with all integral types". Maybe there could be a version of the operators that uses enable_if and tr1::is_integral somehow, for this purpose ? Just a thought. 2/ I think it is "Euclidean Ring", not "Euclidian Ring" ("e" instead of "i"), hence the names for euclidian_ring_operators<T> and similar, are unfortunate. -- Sylvain

Sylvain Pion wrote:
Sounds reasonable, but I suspect some implementation problems. One might try to provide new versions (with new names) of the two-argument-template form with a template template parameter, but what if X<U> is really a X<U,V=dummy<U> >? FWIW, it seems to me that this is an unnecessary restriction of template template parameters. Maybe someone of the standard gurus can explain to me why I have to provide the arguments in the template declaration? IOW, why not simply: template< template X > class Y { typedef X<int> Z; // Here(!), check if the expression is valid typedef X<int,std::allocator<int> > Z2; // Again }; Of course, I'd like to hear about any other useful technique/implementation...
I'd rather go for a more independent version, like template< typename T > class addable_integral<T> : addable<T,int>, addable<T,unsigned int>, ... {}; [base class chaining omitted] To sum it up, both ideas seem to be good. Do you have a patch? Something that works, even if it's not yet boostified?
From what I can see, both spellings seem to be used, where Google offers "Do you mean Euclidean" for "Euclidian", but the latter has 3.500.000 hits against 1.500.000 for Euclidean. Strange. Also, look at this: <http://www.dictionary.net/euclidian>. So, my question is: What is really correct? Can you (or someone else) give a reference? Regards, Daniel

On Tue, Mar 08, 2005 at 09:29:31AM +0100, Daniel Frey wrote:
The usual restriction of the template-template interface... It is usually at this point that the rebind technique raises its ugly head :) I am not familiar enough with MPL/enable_if/... to say if this can be done nicely with those tools. I just vaguely suspect it is.
I do not have any patch. I was just thinking loud about potential future needs of mine or others. If I get to it, I'll send a patch of course.
Indeed both orthographs seem to be correct. I had based my thought only on the uses in Mathworld (http://mathworld.wolfram.com/EuclideanRing.html) and CGAL. Notice that the ratio is reversed when looking for "euclidean geometry" (357,000 hits) versus "euclidian geometry" (60,000 hits). -- Sylvain

On Tue, Mar 08, 2005 at 09:29:31AM +0100, Daniel Frey wrote:
I've always used the Chambers dictionary, which allows both: http://www.chambersharrap.co.uk/chambers/chref/chref.py/main?title=21st&query=euclidean Although the 1994 hardcopy edition I have only has "Euclidean" jon -- "In times like these, it helps to recall that there have always been times like these." - Paul Harvey
participants (3)
-
Daniel Frey
-
Jonathan Wakely
-
Sylvain Pion