Adobe Systems Incorporated

promote< T > Class Template Reference

A struct for compile-time type promotion. More...

#include <adobe/conversion.hpp>

List of all members.

Public Types

typedef T type

Detailed Description

template<typename T>
class adobe::promote< T >

Type promotion is the operation of converting a value into another type without any loss of resolution as to the original value (lossless conversion). For example, type promotion is implicit in the language when one sets a double from a long. Further explicit type promotions are possible for user-defined types through template specializations of this struct. See adobe::value_t for a type that utilizes adobe::promote.
char is not specified to promote to wchar_t as standard behavior. Without knowing the source or destination character encodings there is not enough information to do this type promotion correctly.
See Also:

Standard Promotions

  • The following promote to double:
    • short
    • unsigned short
    • int
    • unsigned int
    • long
    • unsigned long
    • float

Definition at line 24 of file conversion.hpp.

Member Typedef Documentation

Type to which T can be promoted. Default is T itself.

Definition at line 26 of file conversion.hpp.

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google