Namespaces
Variants
Views
Actions

std::is_trivial

From cppreference.com
< cpp‎ | types
Revision as of 20:40, 24 October 2011 by Cubbi (Talk | contribs)

Template:cpp/types/sidebar Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <type_traits>
</td>

<td></td> <td></td> </tr> <tr class="t-dcl ">

<td >
template< class T >
struct is_trivial;
</td>

<td class="t-dcl-nopad"> </td> <td > Template:mark c++11 feature </td> </tr> Template:ddcl list end

If T is a trivial type (that is, a scalar type, a trivially copyable class with a trivial default constructor, or array of such type/class, possibly cv-qualified), provides the member constant value equal Template:cpp. For any other type, value is Template:cpp.

Notes

Only arrays of trivial type may be safely passed to Template:cpp or other functions that accept objects or arrays as arguments of type Template:cpp.

Equivalent definition

Template:eq fun cpp

Example

Template:example cpp

See also

checks if a type is trivially copyable
(class template) [edit]