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

Type trait to check for a traits class that has a createNode member. More...

#include "llvm/ADT/ilist.h"

Collaboration diagram for llvm::ilist_detail::HasCreateNode< 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->createNode(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::HasCreateNode< TraitsT, NodeT >

Type trait to check for a traits class that has a createNode member.

Allocation should be managed in a wrapper class, instead of in ilist_traits.

Definition at line 142 of file ilist.h.

Member Typedef Documentation

◆ No

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

Definition at line 144 of file ilist.h.

◆ Yes

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

Definition at line 143 of file ilist.h.

Member Function Documentation

◆ test() [1/2]

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

◆ test() [2/2]

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

Member Data Documentation

◆ value

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

Definition at line 152 of file ilist.h.


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