Remove unused pack/unpack functions

This commit is contained in:
Matt Borland
2023-05-12 12:12:19 +02:00
parent 46df30e5a0
commit f6eded71e6
2 changed files with 0 additions and 46 deletions

View File

@@ -1,45 +0,0 @@
// Copyright 2023 Matt Borland
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_CHARCONV_DETAIL_CONCATENATE_HPP
#define BOOST_CHARCONV_DETAIL_CONCATENATE_HPP
#include <boost/charconv/detail/config.hpp>
#include <utility>
#include <limits>
#include <cstdint>
namespace boost { namespace charconv { namespace detail {
constexpr std::uint64_t pack(std::uint32_t word1, std::uint32_t word2) noexcept
{
return static_cast<std::uint64_t>(word1) << 32 | word2;
}
BOOST_CXX14_CONSTEXPR inline std::pair<std::uint32_t, std::uint32_t> unpack(std::uint64_t value)
{
auto x = static_cast<std::uint32_t>(value >> UINT64_C(32));
auto y = static_cast<std::uint32_t>(value & UINT32_MAX);
return std::make_pair(x, y);
}
#ifdef __GLIBCXX_TYPE_INT_N_0
constexpr unsigned __int128 pack(std::uint64_t word1, std::uint64_t word2) noexcept
{
return static_cast<unsigned __int128>(word1) << 64 | word2;
}
BOOST_CXX14_CONSTEXPR inline std::pair<std::uint64_t, std::uint64_t> unpack(unsigned __int128 value)
{
auto x = static_cast<std::uint64_t>(value >> 64);
auto y = static_cast<std::uint64_t>(value);
return std::make_pair(x, y);
}
#endif // defined(__GLIBCXX_TYPE_INT_N_0)
}}} // Namespaces
#endif // BOOST_CHARCONV_DETAIL_CONCATENATE_HPP

View File

@@ -9,7 +9,6 @@
#include <boost/charconv/detail/apply_sign.hpp>
#include <boost/charconv/detail/integer_search_trees.hpp>
#include <boost/charconv/detail/integer_conversion.hpp>
#include <boost/charconv/detail/memcpy.hpp>
#include <boost/charconv/detail/config.hpp>
#include <boost/charconv/detail/floff.hpp>