Could someone please list a all compile time operators in available in C++?
相关问题
- Sorting 3 numbers without branching [closed]
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- thread_local variables initialization
- What uses more memory in c++? An 2 ints or 2 funct
相关文章
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- What does it means in C# : using -= operator by ev
- Which is the best way to multiply a large and spar
- C++ default constructor does not initialize pointe
- Selecting only the first few characters in a strin
- C# generics class operators not working
- What exactly do pointers store? (C++)
There is no such term in the standard.
But here's a list of all operators: http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B (I'm sure there are others...). It should be fairly easy to categorise them one way or the other.
There are two operators in C++ whose result can always be determined at compile-time, regardless of the operand(s), and those are
sizeof
[1] and::
[2].Of course there are plenty of particular uses of other operators that can be resolved at compile-time, for example those listed in the standard for integer constant expressions.
[1] C99, unlike C++, has variable length array types.
sizeof
applied to a VLA can't be determined at compile-time. Some C++ compilers provide VLAs as an extension.[2] that is, it can be determined at compile time what entity is the result of the expression. If the entity is an object, then the object's value is another matter.