jeudi 24 février 2022

what are some differences between c++11 and c++14 [closed]

for example Digit Separators

int x = 10000000;   // (1)
int y = 10'000'000; // (2), C++14

Example Snippet, legal in both C++11 and C++14, but with different behavior.

#define M(x, ...) __VA_ARGS__

int a[] = { M(1'2, 3'4, 5) };

// int a[] = { 5 };        <-- C++11
// int a[] = { 3'4, 5 };   <-- C++14
//                              ^-- semantically equivalent to `{ 34, 5 }`

In this case

Aucun commentaire:

Enregistrer un commentaire