[std-interval] passing by value vs reference

Guillaume Melquiond guillaume.melquiond at ens-lyon.fr
Wed Apr 5 15:05:54 PDT 2006


Le mercredi 05 avril 2006 à 11:32 +0200, Sylvain Pion a écrit :

> 3- leave freedom for the implementation to choose
> 4- leave freedom for the implementation and have it provide
>     a standard specified way to obtain this information.

> I would prefer 3 to 4.  I think
> the complexity of implementing 4 is not worth it.

I don't see any additional complexity in 4 with respect to 3. As already
mentioned by Bill Clarke, you could simply have a typedef member in
interval<T> to express the calling convention of the functions of the
interval library: typedef interval<T> const &param_type;

This requires all the functions of the library to use the same calling
convention. But I don't think it is too strong a requirement since there
is no function that uses more than two interval arguments.

Best regards,

Guillaume



More information about the Std-interval mailing list