Std :: list <bool> implementation

Does std::list<bool>similar madness have an obvious type specialization std::vector<bool>?

Is the std::vector<bool>only container in the C ++ standard library that will be hit this way?

Is there any traitsthat I can use to define specialization?

+4
source share
1 answer

As you can see from the standard, it std::vector<bool>has its own paragraph, which dictates its implementation. The requirement for std::list, having one, does not exist, this does not mean that the implementation does not have the right to have it. And as far as I know, std::vectoris the only container that should have specialization for bool.

+5

Source: https://habr.com/ru/post/1663246/


All Articles