|
Boost : |
Subject: Re: [boost] review request: addition to type_traits libraryofhas_operator_xxx
From: John Maddock (boost.regex_at_[hidden])
Date: 2010-11-22 11:05:53
>> That's an interesting idea, but standardized names for the characters
>> would be necessary. "Star" is colloquial; "asterisk" is more
>> appropriate. Instead of "minus," "hyphen" seems more correct and what
>> about the unary versus binary overloads? Here's a longer list to
>> consider:
>>
>> has_operator_hyphen_unary
>> has_operator_hyphen_binary
>> has_operator_tilde
>> has_operator_exclamation
>> has_operator_percent
>> has_operator_caret (not "circumflex" which is a diacritical)
>> has_operator_ampersand
>> has_operator_asterisk
>> has_operator_pipe
>> has_operator_left_guillemet?
>> has_operator_right_guillemet?
>>
>> Since the guillemets are real characters, and the C++ operators are
>> formed by two characters parsed as one token, using "guillemet" isn't
>> correct. One could also use "chevron" which are sometimes doubled to
>> represent guillemets, but the less-than and greater-than characters are
>> not chevrons. Calling them "left shift" and "right shift" brings one
>> full circle to naming the operators for the operations they represent on
>> built-in types, while "insertion" and "extraction" are related to their
>> use with IOStreams. I don't know what to call those.
Oh gosh, please no....!
Lets use names relating to what the operator does, not what obscure names we
can think up for the punctuation.
John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk