swift
Loading...
Searching...
No Matches
swift::misc::CMemoHelper< Ts >::CMemoizer Class Reference

Memoizer for Ts. Other types are passed through. More...

#include <memotable.h>

Inheritance diagram for swift::misc::CMemoHelper< Ts >::CMemoizer:
[legend]

Public Member Functions

template<typename T>
decltype(auto) maybeMemoize (const T &member)
 If T is in Ts, return the index of member in the memo table. Otherwise, return member.
template<typename T>
const CSequence< T > & getTable () const
 Return the values in the T table as a flat list.

Detailed Description

template<typename... Ts>
class swift::misc::CMemoHelper< Ts >::CMemoizer

Memoizer for Ts. Other types are passed through.

Definition at line 48 of file memotable.h.

Member Function Documentation

◆ getTable()

template<typename... Ts>
template<typename T>
const CSequence< T > & swift::misc::CMemoHelper< Ts >::CMemoizer::getTable ( ) const
inline

Return the values in the T table as a flat list.

Definition at line 67 of file memotable.h.

◆ maybeMemoize()

template<typename... Ts>
template<typename T>
decltype(auto) swift::misc::CMemoHelper< Ts >::CMemoizer::maybeMemoize ( const T & member)
inline

If T is in Ts, return the index of member in the memo table. Otherwise, return member.

Definition at line 53 of file memotable.h.


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