LLVM  8.0.1
Classes | Public Types | Static Public Member Functions | Static Public Attributes | List of all members
llvm::ilist_detail::HasGetNext< TraitsT, NodeT > Struct Template Reference

Type trait to check for a traits class that has a getNext member (as a canary for any of the ilist_nextprev_traits API). More...

#include "llvm/ADT/ilist.h"

Collaboration diagram for llvm::ilist_detail::HasGetNext< TraitsT, NodeT >:
Collaboration graph
[legend]

Classes

struct  SFINAE
 

Public Types

typedef char Yes[1]
 
typedef char No[2]
 

Static Public Member Functions

template<class U >
static Yestest (U *I, decltype(I->getNext(&make< NodeT >())) *=0)
 
template<class >
static Notest (...)
 

Static Public Attributes

static const bool value = sizeof(test<TraitsT>(nullptr)) == sizeof(Yes)
 

Detailed Description

template<class TraitsT, class NodeT>
struct llvm::ilist_detail::HasGetNext< TraitsT, NodeT >

Type trait to check for a traits class that has a getNext member (as a canary for any of the ilist_nextprev_traits API).

Definition at line 102 of file ilist.h.

Member Typedef Documentation

◆ No

template<class TraitsT , class NodeT >
typedef char llvm::ilist_detail::HasGetNext< TraitsT, NodeT >::No[2]

Definition at line 104 of file ilist.h.

◆ Yes

template<class TraitsT , class NodeT >
typedef char llvm::ilist_detail::HasGetNext< TraitsT, NodeT >::Yes[1]

Definition at line 103 of file ilist.h.

Member Function Documentation

◆ test() [1/2]

template<class TraitsT , class NodeT >
template<class U >
static Yes& llvm::ilist_detail::HasGetNext< TraitsT, NodeT >::test ( U *  I,
decltype(I->getNext(&make< NodeT >())) *  = 0 
)
static

◆ test() [2/2]

template<class TraitsT , class NodeT >
template<class >
static No& llvm::ilist_detail::HasGetNext< TraitsT, NodeT >::test (   ...)
static

Member Data Documentation

◆ value

template<class TraitsT , class NodeT >
const bool llvm::ilist_detail::HasGetNext< TraitsT, NodeT >::value = sizeof(test<TraitsT>(nullptr)) == sizeof(Yes)
static

Definition at line 112 of file ilist.h.


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