[ox/std] Move bit.hpp static_asserts to cpp file
This commit is contained in:
parent
2d429d30a3
commit
81f2865fcc
1
deps/ox/src/ox/std/CMakeLists.txt
vendored
1
deps/ox/src/ox/std/CMakeLists.txt
vendored
@ -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
14
deps/ox/src/ox/std/bit.cpp
vendored
Normal 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);
|
5
deps/ox/src/ox/std/bit.hpp
vendored
5
deps/ox/src/ox/std/bit.hpp
vendored
@ -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);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user