Qt 4.8
Public Types | Static Public Functions | List of all members
QDeclarativePrivate::StaticCastSelector< From, To > Struct Template Reference

#include <qdeclarativeprivate.h>

Public Types

typedef char no_type
 
typedef int yes_type
 

Static Public Functions

static int cast ()
 
static yes_type check (To *)
 
static no_type check (...)
 

Detailed Description

template<class From, class To>
struct QDeclarativePrivate::StaticCastSelector< From, To >

Definition at line 114 of file qdeclarativeprivate.h.

Typedefs

◆ no_type

template<class From , class To >
typedef char QDeclarativePrivate::StaticCastSelector< From, To >::no_type

Definition at line 117 of file qdeclarativeprivate.h.

◆ yes_type

template<class From , class To >
typedef int QDeclarativePrivate::StaticCastSelector< From, To >::yes_type

Definition at line 116 of file qdeclarativeprivate.h.

Functions

◆ cast()

template<class From , class To >
static int QDeclarativePrivate::StaticCastSelector< From, To >::cast ( )
inlinestatic

Definition at line 122 of file qdeclarativeprivate.h.

Referenced by qmlRegisterCustomType(), qmlRegisterExtendedType(), qmlRegisterRevision(), qmlRegisterType(), qmlRegisterUncreatableType(), and QDeclarativePrivate::qmlRegisterUncreatableType().

123  {
124  return StaticCastSelectorClass<From, To, sizeof(check(reinterpret_cast<From *>(0)))>::cast();
125  }

◆ check() [1/2]

template<class From , class To >
static yes_type QDeclarativePrivate::StaticCastSelector< From, To >::check ( To *  )
static

◆ check() [2/2]

template<class From , class To >
static no_type QDeclarativePrivate::StaticCastSelector< From, To >::check (   ...)
static

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