Given this example:The errors are as described in the comments. gcc 8.2.1 and clang 7.0.1 were used and disagree about what is happening in this example. Could someone clarify this?
While writing some code I ran into some weird problem when trying to move to c++17. I attach the code of the "minimum none working problem" that I try to understand for sometime. The problem is that something (and I'm not sure what) changed in c++17 that made list-initialization work...
I'm a bit confused about how/why the constructors are called in C++11 and C++17.So I'm confused by what happens when I uncomment some combination of lines (and compiling with the c++17 standard flag with clang):
How can I do the equivelant of:With list (curly braced) initialization? When I try to do the following: