Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/types"

From cppreference.com
< cpp
(Additional basic types and macros: LWG4036)
(Defect reports: LWG4036)
Line 48: Line 48:
 
{{dsc inc|cpp/types/dsc type_index}}
 
{{dsc inc|cpp/types/dsc type_index}}
 
{{dsc end}}
 
{{dsc end}}
 +
 +
===Defect reports===
 +
{{dr list begin}}
 +
{{dr list item|wg=lwg|dr=4036|std=C++11|before={{tt|__alignof_is_defined}} was underspecified in the C++ standard|after=specified and deprecated}}
 +
{{dr list end}}
  
 
===See also===
 
===See also===

Revision as of 00:59, 23 March 2024

 
 
Utilities library
General utilities
Relational operators (deprecated in C++20)
 
Type support
 

See also type system overview and fundamental types defined by the language.

Contents

Additional basic types and macros

Defined in header <cstddef>
unsigned integer type returned by the sizeof operator
(typedef) [edit]
signed integer type returned when subtracting two pointers
(typedef) [edit]
(C++11)
the type of the null pointer literal nullptr
(typedef) [edit]
implementation-defined null pointer constant
(macro constant) [edit]
trivial type with alignment requirement as great as any other scalar type
(typedef) [edit]
byte offset from the beginning of a standard-layout type to specified member
(function macro) [edit]
(C++17)
the byte type
(enum) [edit]
 
Defined in header <cstdbool>(deprecated) (until C++20)
Defined in header <stdbool.h>
__bool_true_false_are_defined
(C++11)(deprecated)
C compatibility macro constant, expands to integer literal 1
(macro constant) [edit]
 
Defined in header <cstdalign>(deprecated) (until C++20)
Defined in header <stdalign.h>
__alignas_is_defined
(C++11)(deprecated)
C compatibility macro constant, expands to integer literal 1
(macro constant) [edit]
__alignof_is_defined
(C++11)(deprecated)
C compatibility macro constant, expands to integer literal 1
(macro constant) [edit]

Fixed width integer types (since C++11)

Fixed width floating-point types (since C++23)

Numeric limits

Defined in header <limits>
provides an interface to query properties of all fundamental numeric types
(class template) [edit]

C numeric limits interface

Runtime type identification

Defined in header <typeinfo>
contains some type’s information, the class returned by the typeid operator
(class) [edit]
exception that is thrown if an argument in a typeid expression is null
(class) [edit]
exception that is thrown by an invalid dynamic_cast expression, i.e. a cast of reference type fails
(class) [edit]
 
Defined in header <typeindex>
wrapper around a type_info object, that can be used as index in associative and unordered associative containers
(class) [edit]

Defect reports

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

DR Applied to Behavior as published Correct behavior
LWG 4036 C++11 __alignof_is_defined was underspecified in the C++ standard specified and deprecated

See also

C documentation for Type support library