You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// const char* overloads for sets with an std::string key to avoid allocs
275
-
iterator lower_bound(constchar* k)
276
-
{
277
-
static_assert(std::is_same<std::string, key_type>::value, "flat_set::lower_bound(const char*) works only for std::strings");
278
-
static_assert(std::is_same<std::less<std::string>, key_compare>::value, "flat_set::lower_bound(const char*) works only for std::string-s, compared with std::less<std::string>");
279
-
returnstd::lower_bound(m_container.begin(), m_container.end(), k, [](const value_type& a, constchar* b) -> bool
280
-
{
281
-
returnstrcmp(a.c_str(), b) < 0;
282
-
});
283
-
}
284
-
285
-
const_iterator lower_bound(constchar* k) const
286
-
{
287
-
static_assert(std::is_same<std::string, key_type>::value, "flat_set::lower_bound(const char*) works only for std::strings");
288
-
static_assert(std::is_same<std::less<std::string>, key_compare>::value, "flat_set::lower_bound(const char*) works only for std::string-s, compared with std::less<std::string>");
289
-
returnstd::lower_bound(m_container.begin(), m_container.end(), k, [](const value_type& a, constchar* b) -> bool
0 commit comments