This could be one of the most interesting/hacking videos in cppcon 2018 :-D
std::basic_string can be the container other then 'char'-ish type.
i.e int, bool, UDT etc.
And, it applies SSO on those types as well, thus we might ask, why vector
doesn't have SSO?
Well, we do have in LLVM:
SmallVector.h
or Boost's:
small_vector
And we might have 'relocatable' in C++20 iff vector contains type that meets Rule Of Zero.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.