AsmGrader 0.0.0
Loading...
Searching...
No Matches
bit_casts.hpp File Reference
#include <asmgrader/common/byte.hpp>
#include <asmgrader/common/byte_array.hpp>
#include <asmgrader/common/byte_vector.hpp>
#include <asmgrader/common/os.hpp>
#include <asmgrader/common/to_static_range.hpp>
#include <asmgrader/meta/concepts.hpp>
#include <asmgrader/meta/static_size.hpp>
#include <range/v3/algorithm/copy_n.hpp>
#include <range/v3/algorithm/for_each.hpp>
#include <range/v3/algorithm/reverse.hpp>
#include <range/v3/iterator/access.hpp>
#include <range/v3/iterator/concepts.hpp>
#include <range/v3/iterator/traits.hpp>
#include <range/v3/range/access.hpp>
#include <range/v3/range/concepts.hpp>
#include <range/v3/range/conversion.hpp>
#include <range/v3/range/traits.hpp>
#include <range/v3/range_fwd.hpp>
#include <range/v3/utility/semiregular_box.hpp>
#include <range/v3/view/adaptor.hpp>
#include <range/v3/view/all.hpp>
#include <range/v3/view/concat.hpp>
#include <range/v3/view/facade.hpp>
#include <range/v3/view/for_each.hpp>
#include <range/v3/view/join.hpp>
#include <range/v3/view/single.hpp>
#include <range/v3/view/transform.hpp>
#include <range/v3/view/view.hpp>
#include <array>
#include <concepts>
#include <cstddef>
#include <type_traits>
Include dependency graph for bit_casts.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  asmgrader::detail::partial_bytearray_spec< SizedTo, Size >
 

Namespaces

namespace  asmgrader
 
namespace  asmgrader::detail
 

Functions

template<EndiannessKind To, ranges::range Range>
constexpr void asmgrader::detail::maybe_reverse_endianness (Range &range)
 
template<template< EndiannessKind > typename To, EndiannessKind Endianness, ranges::range Range>
requires (std::is_trivially_copyable_v<ranges::range_value_t<Range>>)
constexpr auto asmgrader::to_bytes (const Range &range)
 Reinterpret a range of trivially copyable values as a ByteVector of specified endianness, or as a ByteArray of specified or deduced size and specified endianness.
 
template<std::same_as< NativeByteVector > NativeTo, ranges::range Range>
requires (std::is_trivially_copyable_v<ranges::range_value_t<Range>>)
constexpr auto asmgrader::to_bytes (const Range &range)
 
template<template< std::size_t, EndiannessKind > typename SizedTo, std::size_t Size, EndiannessKind Endianness, ranges::range Range>
requires (std::is_trivially_copyable_v<ranges::range_value_t<Range>>)
constexpr auto asmgrader::to_bytes (const Range &range)
 
template<template< std::size_t, EndiannessKind > typename SizedTo, EndiannessKind Endianness, ranges::range Range>
requires (std::is_trivially_copyable_v<ranges::range_value_t<Range>> && std::is_trivially_copyable_v<ranges::range_value_t<Range>>)
constexpr auto asmgrader::to_bytes (const Range &range)
 
template<template< std::size_t > typename NativeSizedTo, std::size_t Size, ranges::range Range>
requires (std::same_as<NativeSizedTo<Size>, NativeByteArray<Size>> && std::is_trivially_copyable_v<ranges::range_value_t<Range>>)
constexpr auto asmgrader::to_bytes (const Range &range)
 
template<template< std::size_t > typename NativeSizedTo, ranges::range Range>
requires (std::same_as<NativeSizedTo<0>, NativeByteArray<0>> && std::is_trivially_copyable_v<ranges::range_value_t<Range>>)
constexpr auto asmgrader::to_bytes (const Range &range)
 
template<template< EndiannessKind > typename To, EndiannessKind Endianness, C< std::is_trivially_copyable >... Ts>
constexpr auto asmgrader::to_bytes (const Ts &... values)
 Reinterpret trivially copyable value(s) as a ByteVector or ByteArray, specifications ditto.
 
template<std::same_as< NativeByteVector > NativeTo, C< std::is_trivially_copyable >... Ts>
constexpr auto asmgrader::to_bytes (const Ts &... values)
 
template<template< std::size_t, EndiannessKind > typename SizedTo, std::size_t Size, EndiannessKind Endianness, C< std::is_trivially_copyable >... Ts>
constexpr auto asmgrader::to_bytes (const Ts &... values)
 
template<template< std::size_t > typename NativeSizedTo, std::size_t Size, C< std::is_trivially_copyable >... Ts>
requires (std::same_as<NativeSizedTo<Size>, NativeByteArray<Size>>)
constexpr auto asmgrader::to_bytes (const Ts &... values)
 
template<template< std::size_t N > typename NativeSizedTo, C< std::is_trivially_copyable >... Ts>
requires (std::same_as<NativeSizedTo<0>, NativeByteArray<0>>)
constexpr auto asmgrader::to_bytes (const Ts &... values)
 
template<EndiannessKind Endianness = EndiannessKind::Native>
constexpr decltype(auto) asmgrader::as_bytes ()
 callable providing a view adaptor to reinterpret a range of trivially copyable values as bytes.