Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
fstb: moved implementation details
Browse files Browse the repository at this point in the history
  • Loading branch information
Eleonore Mizo committed Apr 24, 2023
1 parent 964476b commit f99dfc1
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions src/fstb/fnc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,27 @@ namespace fstb



/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/



namespace detail
{



template <typename T, std::size_t... IS>
constexpr std::array <T, sizeof... (IS)> make_array (const T &init_val, std::index_sequence <IS...>)
{
return {{ (static_cast <void> (IS), init_val)... }};
}



} // namespace detail



/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/


Expand Down Expand Up @@ -1109,16 +1130,6 @@ constexpr T rotr (T x, int k) noexcept



namespace detail
{
template <typename T, std::size_t... IS>
constexpr std::array <T, sizeof... (IS)>
make_array (const T &init_val, std::index_sequence <IS...>)
{
return {{ (static_cast <void> (IS), init_val)... }};
}
}

// Default-initializes an array with a specified value
// Source: https://stackoverflow.com/a/41259045
template <std::size_t N, typename T>
Expand Down Expand Up @@ -1192,14 +1203,6 @@ bool is_ptr_align_nz (const T *ptr, int a) noexcept



/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/



/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/



} // namespace fstb


Expand Down

0 comments on commit f99dfc1

Please sign in to comment.