EricWF (@Eric01) header
EricWF (@Eric01) profile picture

Sentient C++ Compiler

New York, NY
Joined April 2008
Photo by EricWF (@Eric01)Photo by EricWF (@Eric01)Photo by EricWF (@Eric01)Photo by EricWF (@Eric01)Photo by EricWF (@Eric01)Photo by EricWF (@Eric01)Photo by EricWF (@Eric01)Photo by EricWF (@Eric01)Photo by EricWF (@Eric01)Photo by EricWF (@Eric01)
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.
6
9
1
120
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.
1
2
10
$ 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!
2
21
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…
1
7
17
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."
2
3
1
10
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);
6
32
3
163
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.
3
3
12
Replying to @Eric01
@Eric01 and I were discussing interview Qs and how to answer them in “unexpected ways”. First question: “How do you sort an array in C++”?
2
1
1
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)
Almost done testing class template argument deduction with Clang. It’s 20% testing STL code, 80% trying to break the compiler.
1
3
21
Switching GCC -> LLVM and seeing perf problems? @modocache asked for 10. Let's build a thread and see: 1) -fexperimental-new-pass-manager
6
26
2
70
#CompilerExplorer updated with @Rubenrbs's library version selector! gcc.godbolt.org/
6
13
2
46
Still working on making MSVC’s STL and libc++‘s tests more compatible with each other. We’re down to 494 skipped tests!
2
1
22
Range-v3 0.2.6 is released! New: experimental support for coroutines with ranges::experimental::view::generator. Have fun! #cpp
5
15
2
41
Despite the constant negative press, `covfefe` type qualifiers are a huge success. Amazing!
3
35
4
98
Implementations can arbitrarily macroize _Ugly identifiers, so you really really can’t use them. GET OFF MY LAWN!
1
2
When I started learning C++, I never imagined I’d be wielding One Definition Rule violations like Zeus hurling lightning from Mount Olympus.
2
8
43
I thought std::byte would be easy to implement. Not sure how I ever deluded myself into thinking that.
4
8
29
My hobby is catching Standard Library implementers forgetting to include Standard Library headers. It’s a very obscure and satisfying hobby.
4
2
30
Congratulations to Chrome, Blizzard, and Firefox for dropping support for XP/Vista. I hope that MSVC’s STL can drop the potato OSes someday.
2
8
42