proxygen
folly::detail::IndexableTraitsAssoc< C > Struct Template Reference

#include <FormatTraits.h>

Inheritance diagram for folly::detail::IndexableTraitsAssoc< C >:
folly::detail::FormatTraitsBase

Public Types

typedef C::value_type::second_type value_type
 
- Public Types inherited from folly::detail::FormatTraitsBase
typedef void enabled
 

Static Public Member Functions

static const value_typeat (const C &c, int idx)
 
static const value_typeat (const C &c, int idx, const value_type &dflt)
 

Detailed Description

template<class C>
struct folly::detail::IndexableTraitsAssoc< C >

Definition at line 53 of file FormatTraits.h.

Member Typedef Documentation

template<class C >
typedef C::value_type::second_type folly::detail::IndexableTraitsAssoc< C >::value_type

Definition at line 54 of file FormatTraits.h.

Member Function Documentation

template<class C >
static const value_type& folly::detail::IndexableTraitsAssoc< C >::at ( const C c,
int  idx 
)
inlinestatic

Definition at line 56 of file FormatTraits.h.

56  {
57  return c.at(static_cast<typename C::key_type>(idx));
58  }
char c
template<class C >
static const value_type& folly::detail::IndexableTraitsAssoc< C >::at ( const C c,
int  idx,
const value_type dflt 
)
inlinestatic

Definition at line 60 of file FormatTraits.h.

60  {
61  auto pos = c.find(static_cast<typename C::key_type>(idx));
62  return pos != c.end() ? pos->second : dflt;
63  }
char c

The documentation for this struct was generated from the following file: