Repository navigation
Expand file tree
/
Copy pathcstddef
More file actions
76 lines (58 loc) · 2.33 KB
/
Copy pathcstddef
File metadata and controls
76 lines (58 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/* Copyright (C) 2015 Povilas Kanapickas <povilas@radix.lt>
This file is part of cppreference-doc
This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
Unported License. To view a copy of this license, visit
http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative
Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
*/
#ifndef CPPREFERENCE_CSTDDEF_H
#define CPPREFERENCE_CSTDDEF_H
#ifndef offsetof
#define offsetof(type,member_designator) 0 // SIMPLIFIED
#endif
#ifndef NULL
#define NULL 0
#endif
namespace std {
// dummy impl
typedef long ptrdiff_t;
typedef unsigned long size_t;
typedef long max_align_t;
#if CPPREFERENCE_STDVER >= 2011
#if CPPREFERENCE_SIMPLIFY_TYPEDEFS
typedef void* nullptr_t;
#else
typedef decltype(nullptr) nullptr_t;
#endif
#endif
#if CPPREFERENCE_STDVER >= 2017
enum class byte : unsigned char {};
template<class IntegerType>
constexpr IntegerType to_integer(std::byte b) noexcept;
constexpr std::byte operator|(std::byte l, std::byte r) noexcept;
constexpr std::byte operator&(std::byte l, std::byte r) noexcept;
constexpr std::byte operator^(std::byte l, std::byte r) noexcept;
constexpr std::byte operator~(std::byte b) noexcept;
constexpr std::byte& operator|=(std::byte& l, std::byte r) noexcept;
constexpr std::byte& operator&=(std::byte& l, std::byte r) noexcept;
constexpr std::byte& operator^=(std::byte& l, std::byte r) noexcept;
template <class IntegerType>
constexpr std::byte operator<<(std::byte b, IntegerType shift) noexcept;
template <class IntegerType>
constexpr std::byte operator>>(std::byte b, IntegerType shift) noexcept;
template <class IntegerType>
constexpr std::byte& operator<<=(std::byte& b, IntegerType shift) noexcept;
template <class IntegerType>
constexpr std::byte& operator>>=(std::byte& b, IntegerType shift) noexcept;
#endif
} // namespace std
#if !CPPREFERENCE_INT_TYPES_ONLY_IN_STD
using std::ptrdiff_t;
using std::size_t;
using std::max_align_t;
#endif // !CPPREFERENCE_INT_TYPES_ONLY_IN_STD
#endif // CPPREFERENCE_CSTDDEF_H