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

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

#include "llvm/ADT/ilist.h"

Collaboration diagram for llvm::ilist_detail::HasCreateSentinel< TraitsT >:
Collaboration graph
[legend]

Public Types

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

Static Public Member Functions

template<class U >
static Yestest (U *I, decltype(I->createSentinel()) *=0)
 
template<class >
static Notest (...)
 

Static Public Attributes

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

Detailed Description

template<class TraitsT>
struct llvm::ilist_detail::HasCreateSentinel< TraitsT >

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

Definition at line 117 of file ilist.h.

Member Typedef Documentation

◆ No

template<class TraitsT >
typedef char llvm::ilist_detail::HasCreateSentinel< TraitsT >::No[2]

Definition at line 119 of file ilist.h.

◆ Yes

template<class TraitsT >
typedef char llvm::ilist_detail::HasCreateSentinel< TraitsT >::Yes[1]

Definition at line 118 of file ilist.h.

Member Function Documentation

◆ test() [1/2]

template<class TraitsT >
template<class U >
static Yes& llvm::ilist_detail::HasCreateSentinel< TraitsT >::test ( U *  I,
decltype(I->createSentinel()) *  = 0 
)
static

◆ test() [2/2]

template<class TraitsT >
template<class >
static No& llvm::ilist_detail::HasCreateSentinel< TraitsT >::test (   ...)
static

Member Data Documentation

◆ value

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

Definition at line 126 of file ilist.h.


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