Using static vs. member find method on a STL set?
Posted
by B Johnson
on Stack Overflow
See other posts from Stack Overflow
or by B Johnson
Published on 2009-01-20T17:23:55Z
Indexed on
2010/05/15
21:04 UTC
Read the original article
Hit count: 292
I am using a set because, i want to use the quick look up property of a sorted container such as a set. I am wondering if I have to use the find member method to get the benefit of a sorted container, or can I also use the static find method in the STL algorithms?
My hunch is that using the static version will use a linear search instead of a binary search like I want.
© Stack Overflow or respective owner