Comment on Bjarne and I are speaking in Chicago on Tuesday night by Philipp Lenk
@Yuriy Grishin:
When using g++ you need to pass the -std=c++11 flag to compile c++11 code:
g++ test1.cpp -std=c++11
@Vipul S. Chawathe:
I presume the reason he calls it a ticking time bomb is the one stated in the files comment. The function he passes to f1(f) actually returns an int(although f1 expects it to return const int&), yet the compiler does not even emit a warning(at least mine doesnt, g++ 4.8.1, even with -Wall -pedantic -Wextra, I have not tried clang ;_;). Instead it silently coerces and treats it as if it returned a const reference. Now, if i understand correctly, the very moment the wrapper is called, the returned value is treated as a reference, which is quite undefined behaviour and could lead to serious trouble.
Read More » Comment on Trip Report: Fall ISO C++ standards meeting by Jesse Good
I was looking forward to std::dynarray a little, but I can see how there is an overlap with runtime sized arrays. However, ould you elaborate on “optional has moved to the Library Fundamental TS.”, what were the issues there?
Read More »
No comments:
Post a Comment