__is_scalar

From Appmethod Topics
Jump to: navigation, search

Go Up to Type Trait Functions (C++0x) Index


Category

Type Trait Functions

Syntax

bool __is_scalar( typename T )

Returns true if and only if T is a scalar type.

Scalar type is defined in Section 3.9 p10 of the Working Draft.

Essentially:

__is_arithmetic( T ) || __is_enumeration(T) ||

__is_pointer(T) || __is_member_pointer(T)

Scalar types have a built in meaning for operator < as well as operator ==. Therefore, __closure is not a scalar type.

See Also