r/ProgrammerHumor • • 10d ago

Meme cppAndItsVectorBooleans

Post image
3.4k Upvotes

214 comments sorted by

View all comments

Show parent comment

30

u/PastaPuttanesca42 9d ago

Because when I write a function template

foo<T>

that internally does

std::vector<T> bar;
[stuff happens]
T* ptr = &bar[7]

foo<bool> is broken.

-18

u/geekosas 9d ago

Man Up

17

u/PastaPuttanesca42 9d ago

What kind of response is that? Do you actually have anything to say?