Namespaces
Variants
Actions

C++ named requirements: TrivialType (since C++11)(deprecated in C++26)

From cppreference.com
< cpp‎ | named req
 
C++
 
C++ named requirements
 

Specifies that a type is a trivial type.

Note: the standard doesn't define a named requirement with this name. This is a type category defined by the core language. It is included here as a named requirement only for consistency.

[edit] Requirements

The following types are collectively called trivial types:

[edit] Notes

A trivial class may have a private or protected trivial default constructor, in which case an attempt to default-construct such a class object in contexts unrelated to the class makes the program ill-formed.

[edit] See also

(C++11)(deprecated in C++26)
checks if a type is trivial
(class template) [edit]

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant