kblib 0.2.3
General utilities library for modern C++
bits.cpp File Reference
#include "kblib/bits.h"
#include "catch.hpp"
#include "kblib/hash.h"
#include <type_traits>
Include dependency graph for bits.cpp:

Go to the source code of this file.

Classes

struct  buffer
 
struct  buffer::ret_proxy
 
union  Addr1
 
struct  Addr
 
union  punner
 

Macros

#define KBLIB_DEF_MACROS   1
 

Functions

 TEST_CASE ("test_trie")
 
 TEST_CASE ("bitfields1")
 
KBLIB_NODISCARD constexpr auto test_bitfield () -> Addr
 
 TEST_CASE ("bitfields")
 
 TEST_CASE ("union_punning")
 
 TEST_CASE ("punning")
 

Macro Definition Documentation

◆ KBLIB_DEF_MACROS

#define KBLIB_DEF_MACROS   1

Definition at line 1 of file bits.cpp.

Function Documentation

◆ test_bitfield()

KBLIB_NODISCARD constexpr auto test_bitfield ( ) -> Addr
constexpr

Definition at line 141 of file bits.cpp.

◆ TEST_CASE() [1/5]

TEST_CASE ( "bitfields"  )

Definition at line 148 of file bits.cpp.

◆ TEST_CASE() [2/5]

TEST_CASE ( "bitfields1"  )

Definition at line 114 of file bits.cpp.

◆ TEST_CASE() [3/5]

TEST_CASE ( "punning"  )

Definition at line 196 of file bits.cpp.

◆ TEST_CASE() [4/5]

TEST_CASE ( "test_trie"  )

Definition at line 66 of file bits.cpp.

◆ TEST_CASE() [5/5]

TEST_CASE ( "union_punning"  )

Definition at line 178 of file bits.cpp.