Skip to content

Commit

Permalink
Remove header bit/bit_cast.hpp
Browse files Browse the repository at this point in the history
Signed-off-by: yamacir-kit <[email protected]>
  • Loading branch information
yamacir-kit committed Nov 13, 2024
1 parent d8bf58c commit 7084981
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 52 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Procedures for each standard are provided by the following R7RS-style libraries:
cmake -B build -DCMAKE_BUILD_TYPE=Release
cd build
make package
sudo apt install build/meevax_0.5.263_amd64.deb
sudo apt install build/meevax_0.5.264_amd64.deb
```

or
Expand Down Expand Up @@ -122,9 +122,9 @@ sudo rm -rf /usr/local/share/meevax

| Target Name | Description
|-------------|-------------
| `all` | Build shared-library `libmeevax.0.5.263.so` and executable `meevax`
| `all` | Build shared-library `libmeevax.0.5.264.so` and executable `meevax`
| `test` | Test executable `meevax`
| `package` | Generate debian package `meevax_0.5.263_amd64.deb`
| `package` | Generate debian package `meevax_0.5.264_amd64.deb`
| `install` | Copy files into `/usr/local` directly

## Usage
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.263
0.5.264
43 changes: 0 additions & 43 deletions include/meevax/bit/bit_cast.hpp

This file was deleted.

2 changes: 2 additions & 0 deletions include/meevax/kernel/exact_integer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

#include <gmp.h>

#include <cstring> // std::strlen

#include <meevax/kernel/pair.hpp>

namespace meevax
Expand Down
1 change: 0 additions & 1 deletion include/meevax/memory/integer_set.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <iterator>
#include <limits>

#include <meevax/bit/bit_cast.hpp>
#include <meevax/bit/log2.hpp>

namespace meevax
Expand Down
8 changes: 4 additions & 4 deletions include/meevax/memory/tagged_pointer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
#ifndef INCLUDED_MEEVAX_MEMORY_TAGGED_POINTER_HPP
#define INCLUDED_MEEVAX_MEMORY_TAGGED_POINTER_HPP

#include <bit>
#include <stdexcept>

#include <meevax/bit/bit_cast.hpp>
#include <meevax/memory/simple_pointer.hpp>
#include <meevax/type_traits/integer.hpp>

Expand All @@ -41,14 +41,14 @@ inline namespace memory
explicit constexpr tagged_pointer(T_##TAG const& value) \
: simple_pointer<T> { \
reinterpret_cast<pointer>( \
static_cast<std::uintptr_t>(bit_cast<uint8n_t<sizeof(T_##TAG)>>(value)) << 32 | TAG) } \
static_cast<std::uintptr_t>(std::bit_cast<uint8n_t<sizeof(T_##TAG)>>(value)) << 32 | TAG) } \
{} \
\
auto operator =(T_##TAG const& value) -> auto & \
{ \
simple_pointer<T>::data \
= reinterpret_cast<pointer>( \
static_cast<std::uintptr_t>(bit_cast<uint8n_t<sizeof(T_##TAG)>>(value)) << 32 | TAG); \
static_cast<std::uintptr_t>(std::bit_cast<uint8n_t<sizeof(T_##TAG)>>(value)) << 32 | TAG); \
return *this; \
} \
\
Expand Down Expand Up @@ -87,7 +87,7 @@ inline namespace memory
template <typename U>
auto as() const
{
return bit_cast<std::decay_t<U>>(
return std::bit_cast<std::decay_t<U>>(
static_cast<uint8n_t<sizeof(std::decay_t<U>)>>(
reinterpret_cast<std::uintptr_t>(simple_pointer<T>::data) >> 32));
}
Expand Down
1 change: 1 addition & 0 deletions test/bitset.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
Expand Down

0 comments on commit 7084981

Please sign in to comment.