proxygen
folly::dynamicconverter_detail Namespace Reference

Classes

struct  Dereferencer
 
struct  Dereferencer< std::pair< F, S > >
 
struct  iterator_class_is_container
 
class  Transformer
 

Typedefs

template<typename T >
using class_is_container = Conjunction< has_iterator< T >, iterator_class_is_container< T >>
 
template<typename T >
using is_range = StrictConjunction< has_value_type< T >, has_iterator< T >>
 
template<typename T >
using is_container = StrictConjunction< std::is_class< T >, class_is_container< T >>
 
template<typename T >
using is_map = StrictConjunction< is_range< T >, has_mapped_type< T >>
 
template<typename T >
using is_associative = StrictConjunction< is_range< T >, has_key_type< T >>
 

Functions

template<typename T , typename It >
std::move_iterator< Transformer< T, It > > conversionIterator (const It &it)
 

Detailed Description

We have iterators that dereference to dynamics, but need iterators that dereference to typename T.

Implementation details:

  1. We cache the value of the dereference operator. This is necessary because boost::iterator_adaptor requires *it to return a reference.
  2. For const reasons, we cannot call operator= to refresh the cache: we must call the destructor then placement new.

Typedef Documentation

template<typename T >
using folly::dynamicconverter_detail::class_is_container = typedef Conjunction<has_iterator<T>, iterator_class_is_container<T>>

Definition at line 75 of file DynamicConverter.h.

template<typename T >
using folly::dynamicconverter_detail::is_associative = typedef StrictConjunction<is_range<T>, has_key_type<T>>

Definition at line 87 of file DynamicConverter.h.

template<typename T >
using folly::dynamicconverter_detail::is_container = typedef StrictConjunction<std::is_class<T>, class_is_container<T>>

Definition at line 81 of file DynamicConverter.h.

template<typename T >
using folly::dynamicconverter_detail::is_map = typedef StrictConjunction<is_range<T>, has_mapped_type<T>>

Definition at line 84 of file DynamicConverter.h.

template<typename T >
using folly::dynamicconverter_detail::is_range = typedef StrictConjunction<has_value_type<T>, has_iterator<T>>

Definition at line 78 of file DynamicConverter.h.

Function Documentation

template<typename T , typename It >
std::move_iterator<Transformer<T, It> > folly::dynamicconverter_detail::conversionIterator ( const It &  it)
inline

Definition at line 168 of file DynamicConverter.h.

168  {
169  return std::make_move_iterator(Transformer<T, It>(it));
170 }