updated build system
This commit is contained in:
parent
2f8f38b6a2
commit
db1320dd3a
@ -29,22 +29,22 @@
|
|||||||
|
|
||||||
namespace repertory::utils::collection {
|
namespace repertory::utils::collection {
|
||||||
template <typename col_t>
|
template <typename col_t>
|
||||||
[[nodiscard]] inline auto
|
[[nodiscard]] inline auto excludes(const col_t &collection,
|
||||||
excludes(const col_t &collection,
|
const typename col_t::value_type &val)
|
||||||
const typename col_t::value_type &val) -> bool;
|
-> bool;
|
||||||
|
|
||||||
template <typename col_t>
|
template <typename col_t>
|
||||||
[[nodiscard]] inline auto
|
[[nodiscard]] inline auto includes(const col_t &collection,
|
||||||
includes(const col_t &collection,
|
const typename col_t::value_type &val)
|
||||||
const typename col_t::value_type &val) -> bool;
|
-> bool;
|
||||||
|
|
||||||
template <typename val_t>
|
template <typename val_t>
|
||||||
[[nodiscard]] inline auto from_hex_string(std::string_view str,
|
[[nodiscard]] inline auto from_hex_string(std::string_view str, val_t &val)
|
||||||
val_t &val) -> bool;
|
-> bool;
|
||||||
|
|
||||||
template <typename val_t>
|
template <typename val_t>
|
||||||
[[nodiscard]] inline auto from_hex_string(std::wstring_view str,
|
[[nodiscard]] inline auto from_hex_string(std::wstring_view str, val_t &val)
|
||||||
val_t &val) -> bool;
|
-> bool;
|
||||||
template <typename col_t>
|
template <typename col_t>
|
||||||
inline auto remove_element(col_t &collection,
|
inline auto remove_element(col_t &collection,
|
||||||
const typename col_t::value_type &value) -> col_t &;
|
const typename col_t::value_type &value) -> col_t &;
|
||||||
@ -53,8 +53,8 @@ template <typename col_t>
|
|||||||
[[nodiscard]] inline auto to_hex_string(const col_t &collection) -> std::string;
|
[[nodiscard]] inline auto to_hex_string(const col_t &collection) -> std::string;
|
||||||
|
|
||||||
template <typename col_t>
|
template <typename col_t>
|
||||||
[[nodiscard]] inline auto
|
[[nodiscard]] inline auto to_hex_wstring(const col_t &collection)
|
||||||
to_hex_wstring(const col_t &collection) -> std::wstring;
|
-> std::wstring;
|
||||||
|
|
||||||
template <typename col_t>
|
template <typename col_t>
|
||||||
inline auto excludes(const col_t &collection,
|
inline auto excludes(const col_t &collection,
|
||||||
@ -71,8 +71,8 @@ inline auto includes(const col_t &collection,
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename val_t>
|
template <typename val_t>
|
||||||
[[nodiscard]] inline auto from_hex_string_t(std::string_view str,
|
[[nodiscard]] inline auto from_hex_string_t(std::string_view str, val_t &val)
|
||||||
val_t &val) -> bool {
|
-> bool {
|
||||||
REPERTORY_USES_FUNCTION_NAME();
|
REPERTORY_USES_FUNCTION_NAME();
|
||||||
|
|
||||||
static constexpr const auto base16{16};
|
static constexpr const auto base16{16};
|
||||||
|
@ -44,13 +44,13 @@ calculate_read_size(std::uint64_t total_size, std::size_t read_size,
|
|||||||
: read_size);
|
: read_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto compare_version_strings(std::string version1,
|
||||||
compare_version_strings(std::string version1,
|
std::string version2)
|
||||||
std::string version2) -> std::int32_t;
|
-> std::int32_t;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto compare_version_strings(std::wstring_view version1,
|
||||||
compare_version_strings(std::wstring_view version1,
|
std::wstring_view version2)
|
||||||
std::wstring_view version2) -> std::int32_t;
|
-> std::int32_t;
|
||||||
|
|
||||||
#if defined(PROJECT_ENABLE_STDUUID)
|
#if defined(PROJECT_ENABLE_STDUUID)
|
||||||
[[nodiscard]] auto create_uuid_string() -> std::string;
|
[[nodiscard]] auto create_uuid_string() -> std::string;
|
||||||
@ -59,12 +59,13 @@ compare_version_strings(std::wstring_view version1,
|
|||||||
#endif // defined(PROJECT_ENABLE_STDUUID)
|
#endif // defined(PROJECT_ENABLE_STDUUID)
|
||||||
|
|
||||||
template <typename result_t, typename data_t>
|
template <typename result_t, typename data_t>
|
||||||
[[nodiscard]] inline constexpr auto
|
[[nodiscard]] inline constexpr auto divide_with_ceiling(result_t numerator,
|
||||||
divide_with_ceiling(result_t numerator, data_t denominator) -> result_t;
|
data_t denominator)
|
||||||
|
-> result_t;
|
||||||
|
|
||||||
template <typename data_t>
|
template <typename data_t>
|
||||||
[[nodiscard]] inline auto generate_random_between(data_t begin,
|
[[nodiscard]] inline auto generate_random_between(data_t begin, data_t end)
|
||||||
data_t end) -> data_t;
|
-> data_t;
|
||||||
|
|
||||||
[[nodiscard]] auto generate_random_string(std::size_t length) -> std::string;
|
[[nodiscard]] auto generate_random_string(std::size_t length) -> std::string;
|
||||||
|
|
||||||
@ -78,22 +79,22 @@ template <typename data_t>
|
|||||||
[[nodiscard]] inline auto generate_secure_random(std::size_t size) -> data_t;
|
[[nodiscard]] inline auto generate_secure_random(std::size_t size) -> data_t;
|
||||||
#endif // defined(PROJECT_ENABLE_LIBSODIUM)
|
#endif // defined(PROJECT_ENABLE_LIBSODIUM)
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto get_environment_variable(std::string_view variable)
|
||||||
get_environment_variable(std::string_view variable) -> std::string;
|
-> std::string;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto get_environment_variable(std::wstring_view variable)
|
||||||
get_environment_variable(std::wstring_view variable) -> std::wstring;
|
-> std::wstring;
|
||||||
|
|
||||||
#if defined(PROJECT_ENABLE_BOOST)
|
#if defined(PROJECT_ENABLE_BOOST)
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto get_next_available_port(std::uint16_t first_port,
|
||||||
get_next_available_port(std::uint16_t first_port,
|
std::uint16_t &available_port)
|
||||||
std::uint16_t &available_port) -> bool;
|
-> bool;
|
||||||
#endif // defined(PROJECT_ENABLE_BOOST)
|
#endif // defined(PROJECT_ENABLE_BOOST)
|
||||||
|
|
||||||
[[nodiscard]] auto retry_action(retryable_action_t action,
|
[[nodiscard]] auto retry_action(
|
||||||
std::size_t retry_count = 200U,
|
retryable_action_t action, std::size_t retry_count = 200U,
|
||||||
std::chrono::milliseconds retry_wait =
|
std::chrono::milliseconds retry_wait = std::chrono::milliseconds(10))
|
||||||
std::chrono::milliseconds(10)) -> bool;
|
-> bool;
|
||||||
|
|
||||||
template <typename result_t, typename data_t>
|
template <typename result_t, typename data_t>
|
||||||
inline constexpr auto divide_with_ceiling(result_t numerator,
|
inline constexpr auto divide_with_ceiling(result_t numerator,
|
||||||
|
@ -31,8 +31,8 @@ using passwd_callback_t = std::function<void(struct passwd *pass)>;
|
|||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
template <typename thread_t>
|
template <typename thread_t>
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto convert_to_uint64(const thread_t *thread_ptr)
|
||||||
convert_to_uint64(const thread_t *thread_ptr) -> std::uint64_t;
|
-> std::uint64_t;
|
||||||
#else // !defined(__APPLE__)
|
#else // !defined(__APPLE__)
|
||||||
[[nodiscard]] auto convert_to_uint64(const pthread_t &thread) -> std::uint64_t;
|
[[nodiscard]] auto convert_to_uint64(const pthread_t &thread) -> std::uint64_t;
|
||||||
#endif // defined(__APPLE__)
|
#endif // defined(__APPLE__)
|
||||||
@ -45,14 +45,14 @@ convert_to_uint64(const thread_t *thread_ptr) -> std::uint64_t;
|
|||||||
|
|
||||||
void set_last_error_code(int error_code);
|
void set_last_error_code(int error_code);
|
||||||
|
|
||||||
[[nodiscard]] auto use_getpwuid(uid_t uid,
|
[[nodiscard]] auto use_getpwuid(uid_t uid, passwd_callback_t callback)
|
||||||
passwd_callback_t callback) -> utils::result;
|
-> utils::result;
|
||||||
|
|
||||||
// template implementations
|
// template implementations
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
template <typename t>
|
template <typename t>
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto convert_to_uint64(const thread_t *thread_ptr)
|
||||||
convert_to_uint64(const thread_t *thread_ptr) -> std::uint64_t {
|
-> std::uint64_t {
|
||||||
return static_cast<std::uint64_t>(
|
return static_cast<std::uint64_t>(
|
||||||
reinterpret_cast<std::uintptr_t>(thread_ptr));
|
reinterpret_cast<std::uintptr_t>(thread_ptr));
|
||||||
}
|
}
|
||||||
|
@ -37,8 +37,8 @@ using namespace ::testing;
|
|||||||
#include "utils/all.hpp"
|
#include "utils/all.hpp"
|
||||||
|
|
||||||
namespace repertory::test {
|
namespace repertory::test {
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto create_random_file(std::size_t size)
|
||||||
create_random_file(std::size_t size) -> utils::file::i_file &;
|
-> utils::file::i_file &;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto
|
||||||
generate_test_file_name(std::string_view file_name_no_extension) -> std::string;
|
generate_test_file_name(std::string_view file_name_no_extension) -> std::string;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user