Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ Official Operator Names / Keywords

Happy Holidays guys.

I have been working on a C++ preprocessor sequence (using boost) to assist me in generating operator based functors. I have so far completed the source, however I was having trouble finding the most appropriate keywords identifying these functors.

More specifically after reviewing the C++0x draft I failed to find the most appropriate (unique) names for the following operators:

  • -> and . which are both called in the draft: class member operators
  • ->* and .* which are both called: pointer to member operators

Do you think you can help me name them better?

The references I have used so for:

  1. The C++0x draft (Can be find online)
  2. The "boost/proto/operators.hpp" header which included most of the over-loadable operators.
  3. The Operators in C and C++ from Wikipedia which also provided the following names
    • . structure reference
    • -> structure dereference
    • ->* and .* member pointers

Here is the list I have so far created. Any other suggestions will be greatly appreciated.

 Symbol        Keyword           Description ++      , post_increment      , post increment --      , post_decrement      , post decrement ++      , pre_increment       , pre increment --      , pre_decrement       , pre decrement +       , unary_plus          , additive promotion -       , unary_minus         , additive inversion !       , negate              , logical negation ~       , complement          , complement *       , indirect            , indirection &       , address_of          , address of +       , add                 , addition -       , subtract            , subtraction *       , multiplies          , multiplication /       , divides             , division %       , modulus             , modulo ==      , equal               , equality !=      , inequal             , inequality >       , greater             , greater than <       , less                , less than >=      , greater_equal       , greater or equal than <=      , less_equal          , less or equal than &&      , logical_and         , logical and ||      , logical_or          , logical or &       , bitwise_and         , bitwise and |       , bitwise_or          , bitwise inclusive or ^       , bitwise_xor         , bitwise exclusive or <<      , left_shift          , left shift >>      , right_shift         , right shift +=      , add_assign          , addition assignment -=      , subtract_assign     , subtractions assignment *=      , multiplies_assign   , multiplication assignment /=      , divides_assign      , division assignment %=      , modulus_assign      , modulo assignment >>=     , right_shift_assign  , right shift assignment <<=     , left_shift_assign   , left shift assignment &=      , bitwise_and_assign  , bitwise and assignment ^=      , bitwise_or_assign   , bitwise exclusive or assignment |=      , bitwise_or_assign   , bitwise inclusive or assignment ->*     , arrow_indirect      , pointer to member ,       , comma               , comma =       , assign              , assignment []      , subscript           , subscription ->      , arrow               , class member .       , dot                 , class member .*      , dot_indirect        , pointer to member 
like image 636
Joseph Carras Avatar asked Dec 30 '11 11:12

Joseph Carras


People also ask

What are the C keywords?

Keywords are predefined, reserved words used in programming that have special meanings to the compiler. Keywords are part of the syntax and they cannot be used as an identifier.


1 Answers

Try this reference.

New, delete, casting, I think there are some more operators and keywords there.

like image 193
GILGAMESH Avatar answered Oct 03 '22 05:10

GILGAMESH