memesearch
C++ Compile Time Goes to Hell

C++ Compile Time Goes to Hell

Download Find similar pictures
Text on the meme
C++ source #1 #include <cstdio> #include <range/v3/view/iota.hpp> #include <range/v3/view/take.hpp> #include <range/v3/view/transform.hpp> #include <range/v3/numeric/accumulate.hpp> using namespace std; namespace rv = ranges::view; namespace { namespace hs { auto sum() { return ranges::make_pipeable([](auto&& rng) { return ranges::accumulate(rng, 0); }); } } auto numberOfTwitterFollowers() -> int { auto v = { 4, 4, 44 }; return v | rv::transform([](auto i) { return rv::iota(1) | rv::take(i) | hs::sum(); }) | hs::sum(); } int main() { return numberOfTwitterFollowers(); } x86-64 clang (trunk) (Editor #1, Compiler #1) C++ -x86-64 clang (trunk) -std=c++2a -O2 main: mov eax, 1000 ret
What it means

A dark-theme Compiler Explorer screenshot shows dense C++ range-v3 code on the left and the tiny x86-64 clang assembly output on the right. The joke is that an absurdly elaborate implementation is used to calculate a simple result, echoing the uploader’s remark about Eric Niebler’s extremely intense libraries making compilation time come unglued. It is used as a reaction to overengineered C++ code, template-heavy libraries, or unexpectedly long compile times.

Objects
Tags
Source
Type
image
Size
800×558 · 54.9 KiB
Mood
саркастичный, абсурдный
Language
en
Added