mirror of
https://github.com/AnthonyCalandra/modern-cpp-features.git
synced 2025-12-16 17:47:02 +03:00
Fix formatting issues with __VA_OPT__.
This commit is contained in:
4
CPP20.md
4
CPP20.md
@@ -19,7 +19,7 @@ C++20 includes the following new language features:
|
||||
- [lambda capture of parameter pack](#lambda-capture-of-parameter-pack)
|
||||
- [char8_t](#char8_t)
|
||||
- [constinit](#constinit)
|
||||
- [__VA_OPT__](#__VA_OPT__)
|
||||
- [\_\_VA\_OPT\_\_](#__VA_OPT__)
|
||||
|
||||
C++20 includes the following new library features:
|
||||
- [concepts library](#concepts-library)
|
||||
@@ -450,7 +450,7 @@ constinit const char* c = f(true); // OK
|
||||
constinit const char* d = g(false); // ERROR: `g` is not constexpr, so `d` cannot be evaluated at compile-time.
|
||||
```
|
||||
|
||||
### `__VA_OPT__`
|
||||
### \_\_VA\_OPT\_\_
|
||||
Helps support variadic macros by evaluating to the given argument if the variadic macro is non-empty.
|
||||
```c++
|
||||
#define F(...) f(0 __VA_OPT__(,) __VA_ARGS__)
|
||||
|
||||
@@ -18,7 +18,7 @@ C++20 includes the following new language features:
|
||||
- [lambda capture of parameter pack](#lambda-capture-of-parameter-pack)
|
||||
- [char8_t](#char8_t)
|
||||
- [constinit](#constinit)
|
||||
- [__VA_OPT__](#__VA_OPT__)
|
||||
- [\_\_VA\_OPT\_\_](#__VA_OPT__)
|
||||
|
||||
C++20 includes the following new library features:
|
||||
- [concepts library](#concepts-library)
|
||||
@@ -554,7 +554,7 @@ constinit const char* c = f(true); // OK
|
||||
constinit const char* d = g(false); // ERROR: `g` is not constexpr, so `d` cannot be evaluated at compile-time.
|
||||
```
|
||||
|
||||
### `__VA_OPT__`
|
||||
### \_\_VA\_OPT\_\_
|
||||
Helps support variadic macros by evaluating to the given argument if the variadic macro is non-empty.
|
||||
```c++
|
||||
#define F(...) f(0 __VA_OPT__(,) __VA_ARGS__)
|
||||
|
||||
Reference in New Issue
Block a user