Skip to content

Commit 6679654

Browse files
author
mikeblome
committed
additional misc tweaks
1 parent 0625721 commit 6679654

15 files changed

Lines changed: 91 additions & 100 deletions

docs/cpp/bool-cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ The **bool** type participates in integral promotions. An r-value of type **bool
4343
## See also
4444

4545
[Keywords](../cpp/keywords-cpp.md)<br/>
46-
[Fundamental Types](../cpp/fundamental-types-cpp.md)
46+
[Built-in types](../cpp/fundamental-types-cpp.md)

docs/cpp/cpp-bit-fields.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ then the memory layout is as shown in the following figure:
6464
![Layout of Date object with zero&#45;length bit field](../cpp/media/vc38uq2.png "Layout of Date object with zero&#45;length bit field") <br/>
6565
Layout of Date Object with Zero-Length Bit Field
6666

67-
The underlying type of a bit field must be an integral type, as described in [Fundamental Types](../cpp/fundamental-types-cpp.md).
67+
The underlying type of a bit field must be an integral type, as described in [Built-in types](../cpp/fundamental-types-cpp.md).
6868

6969
If the initializer for a reference of type `const T&` is an lvalue that refers to a bit field of type `T`, the reference is not bound to the bit field directly. Instead, the reference is bound to a temporary initialized to hold the value of the bit field.
7070

docs/cpp/cpp-type-system-modern-cpp.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ The concept of *type* is very important in C++. Every variable, function argumen
1818

1919
## Specifying variable and function types
2020

21-
C++ is a *strongly typed* language and it is also *statically-typed*; every object has a type and that type never changes (not to be confused with static data objects).
22-
**When you declare a variable** in your code, you must either specify its type explicitly, or use the **auto** keyword to instruct the compiler to deduce the type from the initializer.
23-
**When you declare a function** in your code, you must specify the type of each argument and its return value, or **void** if no value is returned by the function. The exception is when you are using function templates, which allow for arguments of arbitrary types.
21+
C++ is a *strongly typed* language and it is also *statically-typed*; every object has a type and that type never changes (not to be confused with static data objects). When you declare a variable in your code, you must either specify its type explicitly, or use the **auto** keyword to instruct the compiler to deduce the type from the initializer. When you declare a function in your code, you must specify the type of each argument and its return value, or **void** if no value is returned by the function. The exception is when you are using function templates, which allow for arguments of arbitrary types.
2422

2523
After you first declare a variable, you cannot change its type at some later point. However, you can copy the variable’s value or a function’s return value into another variable of a different type. Such operations are called *type conversions*, which are sometimes necessary but are also potential sources of data loss or incorrectness.
2624

@@ -49,7 +47,7 @@ int maxValue; // Not recommended! maxValue contains
4947

5048
Unlike some languages, C++ has no universal base type from which all other types are derived. The language includes many *fundamental types*, also known as *built-in types*. This includes numeric types such as **int**, **double**, **long**, **bool**, plus the **char** and **wchar_t** types for ASCII and UNICODE characters, respectively. Most fundamental types (except **bool**, **double**, **wchar_t** and related types) all have unsigned versions, which modify the range of values that the variable can store. For example, an **int**, which stores a 32-bit signed integer, can represent a value from -2,147,483,648 to 2,147,483,647. An **unsigned int**, which is also stored as 32-bits, can store a value from 0 to 4,294,967,295. The total number of possible values in each case is the same; only the range is different.
5149

52-
The fundamental types are recognized by the compiler, which has built-in rules that govern what operations you can perform on them, and how they can be converted to other fundamental types. For a complete list of built-in types and their size and numeric limits, see [Fundamental Types](../cpp/fundamental-types-cpp.md).
50+
The fundamental types are recognized by the compiler, which has built-in rules that govern what operations you can perform on them, and how they can be converted to other fundamental types. For a complete list of built-in types and their size and numeric limits, see [Built-in types](../cpp/fundamental-types-cpp.md).
5351

5452
The following illustration shows the relative sizes of the built-in types:
5553

docs/cpp/data-type-ranges.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ The **int** and **unsigned int** types have a size of four bytes. However, porta
6464

6565
C/C++ in Visual Studio also supports sized integer types. For more information, see [__int8, \__int16, \__int32, \__int64](../cpp/int8-int16-int32-int64.md) and [Integer Limits](../cpp/integer-limits.md).
6666

67-
For more information about the restrictions of the sizes of each type, see [Fundamental Types](../cpp/fundamental-types-cpp.md).
67+
For more information about the restrictions of the sizes of each type, see [Built-in types](../cpp/fundamental-types-cpp.md).
6868

6969
The range of enumerated types varies depending on the language context and specified compiler flags. For more information, see [C Enumeration Declarations](../c-language/c-enumeration-declarations.md) and [Enumerations](../cpp/enumerations-cpp.md).
7070

7171
## See also
7272

7373
[Keywords](../cpp/keywords-cpp.md)<br/>
74-
[Fundamental Types](../cpp/fundamental-types-cpp.md)
74+
[Built-in types](../cpp/fundamental-types-cpp.md)

docs/cpp/declarations-and-definitions-cpp.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,16 @@ A C++ program might contain more than one [compilation unit](header-files-cpp.md
9090
9191
## In this section
9292
93-
[extern](extern-cpp.md)
94-
[Initializers](initializers.md)
95-
[Aliases and typedefs](aliases-and-typedefs-cpp.md)
96-
[using declaration](using-declaration.md)
97-
[Storage classes](storage-classes-cpp.md)
98-
[const](const-cpp.md)
99-
[constexpr](constexpr-cpp.md)
100-
[volatile](volatile-cpp.md)
101-
[decltype](decltype-cpp.md)
102-
[Attributes in C++](attributes.md)
93+
[Storage classes](storage-classes-cpp.md)<br/>
94+
[const](const-cpp.md)<br/>
95+
[constexpr](constexpr-cpp.md)<br/>
96+
[extern](extern-cpp.md)<br/>
97+
[Initializers](initializers.md)<br/>
98+
[Aliases and typedefs](aliases-and-typedefs-cpp.md)<br/>
99+
[using declaration](using-declaration.md)<br/>
100+
[volatile](volatile-cpp.md)<br/>
101+
[decltype](decltype-cpp.md)<br/>
102+
[Attributes in C++](attributes.md)<br/>
103103
104104
## See also
105105

docs/cpp/fundamental-types-cpp.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
---
2-
title: "Fundamental Types (C++)"
3-
ms.date: "11/04/2016"
2+
title: "Built-in types (C++)"
3+
ms.date: "12/11/2019"
44
f1_keywords: ["__int128_cpp", "__wchar_t_cpp", "char_cpp", "double_cpp", "float_cpp", "int_cpp", "long_cpp", "long_double_cpp", "short_cpp", "signed_cpp", "unsigned_cpp", "unsigned_int_cpp", "wchar_t_cpp"]
55
helpviewer_keywords: ["specifiers [C++], type", "float keyword [C++]", "char keyword [C++]", "__wchar_t keyword [C++]", "signed types [C++], summary of data types", "Integer data type [C++], C++ data types", "arithmetic operations [C++], types", "int data type", "unsigned types [C++], summary of data types", "short data type [C++]", "double data type [C++], summary of types", "long long keyword [C++]", "long double keyword [C++]", "unsigned types [C++]", "signed types [C++]", "void keyword [C++]", "storage [C++], basic type", "integral types, C++", "wchar_t keyword [C++]", "floating-point numbers [C++], C++ data types", "long keyword [C++]", "type specifiers [C++]", "integral types", "long keyword [C++]", "storing types [C++]", "data types [C++], void"]
66
ms.assetid: 58b0106a-0406-4b74-a430-7cbd315c0f89
77
---
8-
# Fundamental Types (C++)
8+
# Built-in types (C++)
99

10-
Fundamental types in C++ are divided into three categories: integral, floating point, and void. Integral types are capable of handling whole numbers. Floating point types are capable of specifying values that may have fractional parts.
10+
Built-in types (also called *fundamental types*) are specified by the C++ language standard and are built into the compiler; they are not defined in any header file. Built-in types are divided into three categories: integral, floating point, and void. Integral types are capable of handling whole numbers. Floating point types are capable of specifying values that may have fractional parts.
1111

12-
The [void](../cpp/void-cpp.md) type describes an empty set of values. No variable of type **void** can be specified — it is used primarily to declare functions that return no values or to declare generic pointers to untyped or arbitrarily typed data. Any expression can be explicitly converted or cast to type **void**. However, such expressions are restricted to the following uses:
12+
The [void](void-cpp.md) type describes an empty set of values. No variable of type **void** can be specified — it is used primarily to declare functions that return no values or to declare generic pointers to untyped or arbitrarily typed data. Any expression can be explicitly converted or cast to type **void**. However, such expressions are restricted to the following uses:
1313

14-
- An expression statement. (See [Expressions](../cpp/expressions-cpp.md), for more information.)
14+
- An expression statement. (See [Expressions](expressions-cpp.md), for more information.)
1515

16-
- The left operand of the comma operator. (See [Comma Operator](../cpp/comma-operator.md) for more information.)
16+
- The left operand of the comma operator. (See [Comma Operator](comma-operator.md) for more information.)
1717

18-
- The second or third operand of the conditional operator (`? :`). (See [Expressions with the Conditional Operator](../cpp/conditional-operator-q.md) for more information.)
18+
- The second or third operand of the conditional operator (`? :`). (See [Expressions with the Conditional Operator](conditional-operator-q.md) for more information.)
1919

20-
The following table explains the restrictions on type sizes. These restrictions are independent of the Microsoft implementation.
20+
The following table explains the restrictions on type sizes in relation to each other. These restrictions are mandated by the C++ standard and are independent of the Microsoft implementation.
2121

22-
### Fundamental Types of the C++ Language
22+
### Built-in type size restrictions
2323

2424
|Category|Type|Contents|
2525
|--------------|----------|--------------|
@@ -37,9 +37,9 @@ The following table explains the restrictions on type sizes. These restrictions
3737

3838
**Microsoft Specific**
3939

40-
The following table lists the amount of storage required for fundamental types in Microsoft C++.
40+
The following table lists the amount of storage required for built-in types in Microsoft C++. In particular, note that **long** is 4 bytes even on 64-bit operating systems.
4141

42-
### Sizes of Fundamental Types
42+
### Sizes of built-in types
4343

4444
|Type|Size|
4545
|----------|----------|
@@ -50,10 +50,10 @@ The following table lists the amount of storage required for fundamental types i
5050

5151
**END Microsoft Specific**
5252

53-
See [Data Type Ranges](../cpp/data-type-ranges.md) for a summary of the range of values of each type.
53+
See [Data Type Ranges](data-type-ranges.md) for a summary of the range of values of each type.
5454

55-
For more information about type conversion, see [Standard Conversions](../cpp/standard-conversions.md).
55+
For more information about type conversion, see [Standard Conversions](standard-conversions.md).
5656

5757
## See also
5858

59-
[Data Type Ranges](../cpp/data-type-ranges.md)
59+
[Data Type Ranges](data-type-ranges.md)

docs/cpp/int8-int16-int32-int64.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ func
5454
## See also
5555

5656
[Keywords](../cpp/keywords-cpp.md)<br/>
57-
[Fundamental Types](../cpp/fundamental-types-cpp.md)<br/>
57+
[Built-in types](../cpp/fundamental-types-cpp.md)<br/>
5858
[Data Type Ranges](../cpp/data-type-ranges.md)<br/>

docs/cpp/m128.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ The **__m128** data type is not supported on ARM processors.
3232
## See also
3333

3434
[Keywords](../cpp/keywords-cpp.md)<br/>
35-
[Fundamental Types](../cpp/fundamental-types-cpp.md)<br/>
35+
[Built-in types](../cpp/fundamental-types-cpp.md)<br/>
3636
[Data Type Ranges](../cpp/data-type-ranges.md)

docs/cpp/m128d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ The **__m128d** data type is not supported on ARM processors.
3232
## See also
3333

3434
[Keywords](../cpp/keywords-cpp.md)<br/>
35-
[Fundamental Types](../cpp/fundamental-types-cpp.md)<br/>
35+
[Built-in types](../cpp/fundamental-types-cpp.md)<br/>
3636
[Data Type Ranges](../cpp/data-type-ranges.md)

docs/cpp/m128i.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ The **__m128i** data type is not supported on ARM processors.
3535
## See also
3636

3737
[Keywords](../cpp/keywords-cpp.md)<br/>
38-
[Fundamental Types](../cpp/fundamental-types-cpp.md)<br/>
38+
[Built-in types](../cpp/fundamental-types-cpp.md)<br/>
3939
[Data Type Ranges](../cpp/data-type-ranges.md)

0 commit comments

Comments
 (0)