EricWF retweeted
What I wish more people understood about STL developers is that we are (or at least I am) incredibly lazy. We would like nothing more than to ship simple, correct, fast code. If you see complicated code, it’s very likely we’re forced to do that, or we have clever optimizations.
EricWF retweeted
So @Eric01 asks how to write a variable template where some specializations may be valid, but the primary template is not defined (gives an error if used). My suggestion:
template <class T> auto my_trait = not defined(my_trait<T>);
I feel proud and dirty.
EricWF retweeted
$ touch math.h
... appears to have UB in C:
C11 7.1.2/3: "If a file with the same name as one of the [standard headers] is placed in any of the standard places that are searched for included source files, the behavior is undefined."
Evil C Compiler authors take note!
EricWF retweeted
Episode 185 of CppCast is live! @Eric01 joins us to talk about libc++ and his contributions to it, his work at google on Abseil and much more! Listen Now! #cplusplus cppcast.com/2019/01/eric-fis…
EricWF retweeted
In other news, yesterday's developments on C++'s operator<=> are going to force me to write an essay, "Type design over time: why you can't safely infer semantics from syntax."
EricWF retweeted
C++03: void foo() const volatile;
C++11: void foo() &; void bar() &&;
C++20?: void foo() &&&;
C++23??: void foo() mut &&&&&;
C++26‽: void foo() do not @ me;
C++29⁉️: void foo() 🌈🦄✨;
C++31: void foo(void);
EricWF retweeted
Replying to @Eric01
std::vector is supposed to be a linked list. std::list is supposed to be contiguous. Nobody wanted to be the first one to tell you.
EricWF retweeted
Replying to @Eric01
It is because compiler can see that it is the only use of this function, which is not the case with inline. It is always profitable to inline such function (assuming it is done in a right order)
EricWF retweeted
Almost done testing class template argument deduction with Clang. It’s 20% testing STL code, 80% trying to break the compiler.
EricWF retweeted
Switching GCC -> LLVM and seeing perf problems? @modocache asked for 10. Let's build a thread and see:
1) -fexperimental-new-pass-manager
EricWF retweeted
#CompilerExplorer updated with @Rubenrbs's library version selector! gcc.godbolt.org/
EricWF retweeted
Still working on making MSVC’s STL and libc++‘s tests more compatible with each other. We’re down to 494 skipped tests!
EricWF retweeted
Range-v3 0.2.6 is released!
New: experimental support for coroutines with ranges::experimental::view::generator.
Have fun! #cpp
EricWF retweeted
Despite the constant negative press, `covfefe` type qualifiers are a huge success.
Amazing!
EricWF retweeted
Implementations can arbitrarily macroize _Ugly identifiers, so you really really can’t use them. GET OFF MY LAWN!
EricWF retweeted
When I started learning C++, I never imagined I’d be wielding One Definition Rule violations like Zeus hurling lightning from Mount Olympus.
EricWF retweeted
I thought std::byte would be easy to implement. Not sure how I ever deluded myself into thinking that.
EricWF retweeted
My hobby is catching Standard Library implementers forgetting to include Standard Library headers. It’s a very obscure and satisfying hobby.












