mirror of
https://github.com/microsoft/HybridRow.git
synced 2026-01-24 20:03:09 +00:00
Release 1.1.0-preview 3 (#6)
Release roll-up snapshot of C#/C++ codebase at version 1.1.0-preview. This release matches the current shipping nugets.
This commit is contained in:
33
src/Core/Core.Native/Endian.h
Normal file
33
src/Core/Core.Native/Endian.h
Normal file
@@ -0,0 +1,33 @@
|
||||
// ------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace cdb_core
|
||||
{
|
||||
struct Endian final
|
||||
{
|
||||
// Static Class
|
||||
Endian() = delete;
|
||||
~Endian() = delete;
|
||||
Endian(const Endian& other) = delete;
|
||||
Endian(Endian&& other) noexcept = delete;
|
||||
Endian& operator=(const Endian& other) = delete;
|
||||
Endian& operator=(Endian&& other) noexcept = delete;
|
||||
|
||||
constexpr static bool IsLittleEndian() noexcept;
|
||||
constexpr static bool IsBigEndian() noexcept;
|
||||
};
|
||||
|
||||
constexpr bool Endian::IsLittleEndian() noexcept
|
||||
{
|
||||
// TODO: this should use std::endian when we move to C++ v20.
|
||||
return true;
|
||||
}
|
||||
|
||||
constexpr bool Endian::IsBigEndian() noexcept
|
||||
{
|
||||
return !Endian::IsLittleEndian();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user