15 #ifndef BORNAGAIN_BASE_UTILS_PRECOMPUTED_H
16 #define BORNAGAIN_BASE_UTILS_PRECOMPUTED_H
30 static constexpr
double value = 1.0;
33 template <
template <
size_t>
class F,
size_t...
I>
36 return {F<I>::value...};
39 template <
size_t N,
typename Indices = std::make_index_sequence<N>>
42 return GenerateArrayHelper<ReciprocalFactorial>(Indices{});
Compile-time generated std::array of reciprocal factorials.
constexpr std::array< double, sizeof...(I)> GenerateArrayHelper(std::index_sequence< I... >)
constexpr std::array< double, N > GenerateReciprocalFactorialArray()
static constexpr double value