Init
This commit is contained in:
51
cppdraft/cinttypes/syn.md
Normal file
51
cppdraft/cinttypes/syn.md
Normal file
@@ -0,0 +1,51 @@
|
||||
[cinttypes.syn]
|
||||
|
||||
# 31 Input/output library [[input.output]](./#input.output)
|
||||
|
||||
## 31.13 C library files [[c.files]](c.files#cinttypes.syn)
|
||||
|
||||
### 31.13.2 Header <cinttypes> synopsis [cinttypes.syn]
|
||||
|
||||
[ð](#header:%3ccinttypes%3e)
|
||||
|
||||
#include <cstdint> // see [[cstdint.syn]](cstdint.syn "17.4.1 Header <cstdint> synopsis")namespace std {using imaxdiv_t = *see below*; constexpr intmax_t imaxabs(intmax_t j); constexpr imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
|
||||
intmax_t strtoimax(const char* nptr, char** endptr, int base);
|
||||
uintmax_t strtoumax(const char* nptr, char** endptr, int base);
|
||||
intmax_t wcstoimax(const wchar_t* nptr, wchar_t** endptr, int base);
|
||||
uintmax_t wcstoumax(const wchar_t* nptr, wchar_t** endptr, int base); constexpr intmax_t abs(intmax_t); // optional, see belowconstexpr imaxdiv_t div(intmax_t, intmax_t); // optional, see below}#define __STDC_VERSION_INTTYPES_H__ 202311L#define PRId*N* *see below*#define PRIi*N* *see below*#define PRIo*N* *see below*#define PRIu*N* *see below*#define PRIx*N* *see below*#define PRIX*N* *see below*#define PRIb*N* *see below*#define PRIB*N* *see below*#define SCNd*N* *see below*#define SCNi*N* *see below*#define SCNo*N* *see below*#define SCNu*N* *see below*#define SCNx*N* *see below*#define SCNb*N* *see below*#define PRIdLEAST*N* *see below*#define PRIiLEAST*N* *see below*#define PRIoLEAST*N* *see below*#define PRIuLEAST*N* *see below*#define PRIxLEAST*N* *see below*#define PRIXLEAST*N* *see below*#define PRIbLEAST*N* *see below*#define PRIBLEAST*N* *see below*#define SCNdLEAST*N* *see below*#define SCNiLEAST*N* *see below*#define SCNoLEAST*N* *see below*#define SCNuLEAST*N* *see below*#define SCNxLEAST*N* *see below*#define SCNbLEAST*N* *see below*#define PRIdFAST*N* *see below*#define PRIiFAST*N* *see below*#define PRIoFAST*N* *see below*#define PRIuFAST*N* *see below*#define PRIxFAST*N* *see below*#define PRIXFAST*N* *see below*#define PRIbFAST*N* *see below*#define PRIBFAST*N* *see below*#define SCNdFAST*N* *see below*#define SCNiFAST*N* *see below*#define SCNoFAST*N* *see below*#define SCNuFAST*N* *see below*#define SCNxFAST*N* *see below*#define SCNbFAST*N* *see below*#define PRIdMAX *see below*#define PRIiMAX *see below*#define PRIoMAX *see below*#define PRIuMAX *see below*#define PRIxMAX *see below*#define PRIXMAX *see below*#define PRIbMAX *see below*#define PRIBMAX *see below*#define SCNdMAX *see below*#define SCNiMAX *see below*#define SCNoMAX *see below*#define SCNuMAX *see below*#define SCNxMAX *see below*#define SCNbMAX *see below*#define PRIdPTR *see below*#define PRIiPTR *see below*#define PRIoPTR *see below*#define PRIuPTR *see below*#define PRIxPTR *see below*#define PRIXPTR *see below*#define PRIbPTR *see below*#define PRIBPTR *see below*#define SCNdPTR *see below*#define SCNiPTR *see below*#define SCNoPTR *see below*#define SCNuPTR *see below*#define SCNxPTR *see below*#define SCNbPTR *see below*
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L19133)
|
||||
|
||||
The contents and meaning of the header [<cinttypes>](#header:%3ccinttypes%3e "31.13.2 Header <cinttypes> synopsis [cinttypes.syn]") are the same as the C standard library header [<inttypes.h>](support.c.headers.general#header:%3cinttypes.h%3e "17.15.1 General [support.c.headers.general]"),
|
||||
with the following changes:
|
||||
|
||||
- [(1.1)](#1.1)
|
||||
|
||||
The header [<cinttypes>](#header:%3ccinttypes%3e "31.13.2 Header <cinttypes> synopsis [cinttypes.syn]") includes the header [<cstdint>](cstdint.syn#header:%3ccstdint%3e "17.4.1 Header <cstdint> synopsis [cstdint.syn]") instead
|
||||
of [<stdint.h>](support.c.headers.general#header:%3cstdint.h%3e "17.15.1 General [support.c.headers.general]"), and
|
||||
|
||||
- [(1.2)](#1.2)
|
||||
|
||||
if and only if the type intmax_t designates an extended integer
|
||||
type ([[basic.fundamental]](basic.fundamental "6.9.2 Fundamental types")), the following function signatures are added:constexpr intmax_t abs(intmax_t);constexpr imaxdiv_t div(intmax_t, intmax_t); which shall have the same semantics as the function signaturesconstexpr intmax_t imaxabs(intmax_t) andconstexpr imaxdiv_t imaxdiv(intmax_t, intmax_t), respectively[.](#1.sentence-1)
|
||||
|
||||
See also: ISO/IEC 9899:2024, 7.8
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L19155)
|
||||
|
||||
Each of the PRI macros listed in this subclause
|
||||
is defined if and only if the implementation
|
||||
defines the corresponding [*typedef-name*](dcl.typedef#nt:typedef-name "9.2.4 The typedef specifier [dcl.typedef]") in [[cstdint.syn]](cstdint.syn "17.4.1 Header <cstdint> synopsis")[.](#2.sentence-1)
|
||||
|
||||
Each of the SCN macros listed in this subclause
|
||||
is defined if and only if the implementation
|
||||
defines the corresponding [*typedef-name*](dcl.typedef#nt:typedef-name "9.2.4 The typedef specifier [dcl.typedef]") in [[cstdint.syn]](cstdint.syn "17.4.1 Header <cstdint> synopsis") and
|
||||
has a suitable fscanf length modifier for the type[.](#2.sentence-2)
|
||||
|
||||
Each of the PRIB macros listed in this subclause
|
||||
is defined if and only if fprintf supports
|
||||
the B conversion specifier[.](#2.sentence-3)
|
||||
Reference in New Issue
Block a user