User profile: TheIdeasMan

User info
User name:TheIdeasMan
History
Joined:
Number of posts:6550
Latest posts:

C++ 20 Pointer Declaration
[quote]When I run the code with Clang it works fine [/quote] Really? Still an error using clang 13....

C++ 20 Pointer Declaration
[quote]I using GCC 11 Compiler C++ 20 standard. [/quote] Note that c++2a (which you had in your OP)...

C++ 20 Pointer Declaration
maybe the volatile and * need to be together.

C++ 20 Pointer Declaration
So use one of the other two. g++ does complain about the placement of volatile in the third example...

Function Variable Persistence?
https://en.cppreference.com/w/cpp/language/copy_elision See RVO and NRVO