Email or username:

Password:

Forgot your password?
Top-level
Nicole

@Gankra I don't believe it's required to bitpack, but the APIs are required not to return a pointer so there's no reason not to.

3 comments
Nicole

@Gankra fwiw, my opinion is "it's overhyped how terrible vector<bool> is, but it's certainly not good"

Gankra

@streganil i think that's where i fall too, yeah. vector<bool> is relatively rare, so it won't come up much, but it's unfortunate that a desire to optimize the concrete case of vector<bool> made the whole vector type just a little less useful in generic contexts

Ed Page

@Gankra @streganil

> a desire to optimize the concrete case

And it wasn't even created as an optimization but for pedagogical purposes.

> The vector<bool> specialization was intentionally put into the standard to provide an example of how to write a proxied container.

gotw.ca/publications/mill09.ht

Go Up