how to know if a type supports comparison operators

I am looking for a means to know if a type supports comparison operators (<, >, <=, >=). I have looked in Boost.TypeTraits but could not find what I need. F. Bron Avis : Ce message et toute pièce jointe sont la propriété d'Alcan et sont destinés seulement aux personnes ou à l'entité à qui le message est adressé. Si vous avez reçu ce message par erreur, veuillez le détruire et en aviser l'expéditeur par courriel. Si vous n'êtes pas le destinataire du message, vous n'êtes pas autorisé à utiliser, à copier ou à divulguer le contenu du message ou ses pièces jointes en tout ou en partie. Notice: This message and any attachments are the property of Alcan and are intended solely for the named recipients or entity to whom this message is addressed. If you have received this message in error please inform the sender via e-mail and destroy the message. If you are not the intended recipient you are not allowed to use, copy or disclose the contents or attachments in whole or in part.

I am looking for a means to know if a type supports comparison operators (<, , <=, >=). I have looked in Boost.TypeTraits but could not find what I need.
Take a look at http://article.gmane.org/gmane.comp.lib.boost.user/29170 HTH, Roman Perepelitsa.

Wonderful! Thanks, F. Bron ___________________________________ Frédéric Bron (frederic.bron@alcan.com) Unité ALT, Alcan CRV, BP 27, 38341 Voreppe +33 4 76 57 81 72, +33 6 07 48 56 67 boost-users-bounces@lists.boost.org a écrit sur 04/08/2008 15:55:31 :
writes: I am looking for a means to know if a type supports comparison operators (<, , <=, >=). I have looked in Boost.TypeTraits but could not find what I need.
Take a look at http://article.gmane.org/gmane.comp.lib.boost.user/29170
HTH, Roman Perepelitsa.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Avis : Ce message et toute pièce jointe sont la propriété d'Alcan et sont destinés seulement aux personnes ou à l'entité à qui le message est adressé. Si vous avez reçu ce message par erreur, veuillez le détruire et en aviser l'expéditeur par courriel. Si vous n'êtes pas le destinataire du message, vous n'êtes pas autorisé à utiliser, à copier ou à divulguer le contenu du message ou ses pièces jointes en tout ou en partie. Notice: This message and any attachments are the property of Alcan and are intended solely for the named recipients or entity to whom this message is addressed. If you have received this message in error please inform the sender via e-mail and destroy the message. If you are not the intended recipient you are not allowed to use, copy or disclose the contents or attachments in whole or in part.

Take a look at
Hmm is there any article or paper explaining the trick and why it's different of the classic idiom using the ellipsis argument to discrimiante the correct call to the inner function. IN the same vein, why using a static reference instead of constructing the object in place in the sizeof operator ? Thanks in advance

AMDG joel falcou wrote:
Hmm is there any article or paper explaining the trick and why it's different of the classic idiom using the ellipsis argument to discrimiante the correct call to the inner function.
Operators cannot be overloaded with the ellipsis.
IN the same vein, why using a static reference instead of constructing the object in place in the sizeof operator ?
Using a reference avoids requiring T to have a default constructor. In Christ, Steven Watanabe
participants (4)
-
frederic.bron@alcan.com
-
joel falcou
-
Roman Perepelitsa
-
Steven Watanabe