Add a libcxx with a new operator
This commit is contained in:
parent
dcc05f2741
commit
010e261dc7
8 changed files with 132 additions and 2 deletions
34
lib/libcxx/include/cstddef
Normal file
34
lib/libcxx/include/cstddef
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/* vim: syntax=cpp */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cstdint"
|
||||
|
||||
namespace std {
|
||||
using ptrdiff_t = uint64_t;
|
||||
using size_t = uint64_t;
|
||||
// FIXME: I don't understand what this does.
|
||||
using max_align_t = uint64_t;
|
||||
using nullptr_t = decltype(nullptr);
|
||||
|
||||
enum class byte : unsigned char {};
|
||||
|
||||
// byte type operations
|
||||
template<class IntType>
|
||||
constexpr byte& operator<<=(byte& b, IntType shift) noexcept;
|
||||
template<class IntType>
|
||||
constexpr byte operator<<(byte b, IntType shift) noexcept;
|
||||
template<class IntType>
|
||||
constexpr byte& operator>>=(byte& b, IntType shift) noexcept;
|
||||
template<class IntType>
|
||||
constexpr byte operator>>(byte b, IntType shift) noexcept;
|
||||
constexpr byte& operator|=(byte& l, byte r) noexcept;
|
||||
constexpr byte operator|(byte l, byte r) noexcept;
|
||||
constexpr byte& operator&=(byte& l, byte r) noexcept;
|
||||
constexpr byte operator&(byte l, byte r) noexcept;
|
||||
constexpr byte& operator^=(byte& l, byte r) noexcept;
|
||||
constexpr byte operator^(byte l, byte r) noexcept;
|
||||
constexpr byte operator~(byte b) noexcept;
|
||||
template<class IntType>
|
||||
constexpr IntType to_integer(byte b) noexcept;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue