[cmake-developers] [PSA] API changes to use strings
Stephen Kelly
steveire at gmail.com
Fri Feb 7 02:24:28 EST 2014
Ben Boeckel wrote:
> On Thu, Feb 06, 2014 at 23:44:51 +0100, Stephen Kelly wrote:
>> Ben Boeckel wrote:
>> > - cmMakefile::Get{Source,Header}Extensions returns a std::set rather
>> > than a std::vector since it was never modified and is only iterated
>> > over and searched in other code.
>> The justification is strange. Generally, the guideline with C++ stl
>> containers is to use std::vector unless you have a good reason to use
>> something else.
>
> It's read-only after construction, so with std::set we get
> std::binary_search for free since we never have to pay set's insertion
> penalty over time.
I see.
Thanks,
Steve.
More information about the cmake-developers
mailing list