From e8ead53a69b329e2056628bd9cdca3ebbf104a1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Gilles?= <sebastien.gilles@inria.fr> Date: Mon, 10 May 2021 11:26:24 +0200 Subject: [PATCH] Reformulation for std::ptrdiff_t --- 1-ProceduralProgramming/3-Types.ipynb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/1-ProceduralProgramming/3-Types.ipynb b/1-ProceduralProgramming/3-Types.ipynb index f45dfcb..38916e9 100644 --- a/1-ProceduralProgramming/3-Types.ipynb +++ b/1-ProceduralProgramming/3-Types.ipynb @@ -284,6 +284,8 @@ "\n", "The STL features rather heavily a type named `std::size_t`, which by design is able to store the maximum size of a theoretically possible object of any type (including array). On most (all?) systems `std::size_t` is an alias to an `unsigned long`. More may be found about this type on [CppReference](https://en.cppreference.com/w/cpp/types/size_t). The equivalent counter part for signed integers is the [`std::ptrdiff_t`](https://en.cppreference.com/w/cpp/types/ptrdiff_t), which is the signed integer type of the result of subtracting two pointers. \n", "\n", + "You might also encounter [`std::ptrdiff_t`](https://en.cppreference.com/w/cpp/types/ptrdiff_t), which is akin to `std::size_t` but for *signed* values. It is typically used in the STL to store the result of subtracting two pointers. \n", + "\n", "\n", "#### Numeric limits\n", "\n", -- GitLab