WPILibC++ 2025.2.1
Loading...
Searching...
No Matches
bit.h File Reference

This file implements the C++20 <bit> header. More...

#include "wpi/Compiler.h"
#include <cstdint>
#include <limits>
#include <type_traits>
#include <cstring>

Go to the source code of this file.

Namespaces

namespace  wpi
 Foonathan namespace.
 

Enumerations

enum class  wpi::endianness { wpi::big , wpi::little , wpi::native = little }
 

Functions

template<typename To , typename From , typename = std::enable_if_t<sizeof(To) == sizeof(From)>, typename = std::enable_if_t<std::is_trivially_constructible<To>::value>, typename = std::enable_if_t<std::is_trivially_copyable<To>::value>, typename = std::enable_if_t<std::is_trivially_copyable<From>::value>>
To wpi::bit_cast (const From &from) noexcept
 
template<typename T , typename = std::enable_if_t<std::is_integral_v<T>>>
constexpr T wpi::byteswap (T V) noexcept
 Reverses the bytes in the given integer value V.
 

Detailed Description

This file implements the C++20 <bit> header.