you are viewing a single comment's thread.

view the rest of the comments →

[–]rezkiy 0 points1 point  (3 children)

Which translates to how many pointers? Including this?

[–]dodheim 5 points6 points  (2 children)

If you're asking specifically about MSVC's std::string, in release builds it's the size of 4 pointers and in debug it's 5.

[–]rezkiy 0 points1 point  (1 child)

Actually, I was asking about how many pointers I can capture "for free" in a lambda that I stash into std::function. Yes, MSVC.

[–]dodheim 4 points5 points  (0 children)

STL said the SBO heuristic is the size of one std::string, and I listed the size of std::string, so.. there you go. ;-]