[ox/std] Move bit.hpp static_asserts to cpp file

This commit is contained in:
Gary Talent 2022-01-26 21:14:32 -06:00
parent 2d429d30a3
commit 81f2865fcc
3 changed files with 15 additions and 5 deletions

View File

@ -20,6 +20,7 @@ target_compile_definitions(
add_library(
OxStd
assert.cpp
bit.cpp
buffer.cpp
buildinfo.cpp
byteswap.cpp

14
deps/ox/src/ox/std/bit.cpp vendored Normal file
View File

@ -0,0 +1,14 @@
/*
* Copyright 2015 - 2022 gary@drinkingtea.net
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "bit.hpp"
static_assert(ox::onMask<int>(1) == 0b0001);
static_assert(ox::onMask<int>(2) == 0b0011);
static_assert(ox::onMask<int>(3) == 0b0111);
static_assert(ox::onMask<int>(4) == 0b1111);

View File

@ -55,9 +55,4 @@ template<typename T, typename B = int>
template<typename T>
constexpr auto MaxValue = onMask<T>();
static_assert(onMask<int>(1) == 1);
static_assert(onMask<int>(2) == 3);
static_assert(onMask<int>(3) == 7);
static_assert(onMask<int>(4) == 15);
}