20 #include <type_traits> 33 template <
class T,
class Enable =
void>
42 static const value_type&
at(
const C&
c,
int idx) {
46 static const value_type&
at(
const C&
c,
int idx,
const value_type& dflt) {
47 return (idx >= 0 &&
size_t(idx) < c.size()) ? c.at(idx) : dflt;
56 static const value_type&
at(
const C&
c,
int idx) {
57 return c.at(static_cast<typename C::key_type>(idx));
60 static const value_type&
at(
const C&
c,
int idx,
const value_type& dflt) {
61 auto pos = c.find(static_cast<typename C::key_type>(idx));
62 return pos != c.end() ? pos->second : dflt;
C::value_type::second_type value_type
static const value_type & at(const C &c, int idx, const value_type &dflt)
static const value_type & at(const C &c, int idx)
—— Concurrent Priority Queue Implementation ——
static const value_type & at(const C &c, int idx)
static const value_type & at(const C &c, int idx, const value_type &dflt)