-
Notifications
You must be signed in to change notification settings - Fork 2
/
CppFeatures.txt
37 lines (30 loc) · 1.07 KB
/
CppFeatures.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
https://github.com/AnthonyCalandra/modern-cpp-features
Only these C++ features are allowed to be used in the code.
Any stl/stdc++ code is prohibited and should be implemented in the core library instead
No exceptions
No RTTI
c++20:
- Designated initializers
C++17:
https://www.geeksforgeeks.org/features-of-c17-with-examples/
- Variable declaration in if and switch.
- if constexpr() - Rarely when makes it only makes calls to non-platform specific code
- utf8 character literals
- [[maybe_used]]
- [[nodiscard]]
- [[deprecated]]
- inline variables
C++14:
- functors: https://www.geeksforgeeks.org/functors-in-cpp/?ref=lbp (Rarely)
- generalized lambda expressions
- Extended capturing in lambdas
- static_assert
C++11/98:
- constexpr for constants
- regular operators for math primitives
- Minimal templates (containers/some generic small functions)
- Default arguments
- Function overrides
- Limited use of ctor/dtor and default constructors
- C++ ABI (return structs as value)
- "using" keyword