Commit 621e67ed authored by ESTERIE Pierre's avatar ESTERIE Pierre

Some more work to go, under construction 🚧

parent 5d7bd961
......@@ -33,7 +33,6 @@ int main()
using multipole_type = scalfmm::container::variadic_container<double, double, double>;
using leaf_type = scalfmm::component::leaf<particle_type, point_type>;
using interpolator_type = scalfmm::interpolation::uniform_interpolator<double, particle_dim>;
const size_type nb_particles{5000};
......
......@@ -9,29 +9,36 @@
namespace scalfmm::concepts
{
template<typename R, typename Enabler> struct require_impl;
template<typename R> struct require_impl<R, void> { using type = R; };
template<typename Return, typename... Ts>
struct require_check : require_impl<Return,std::void_t<Ts...>>
{};
//template<typename R, typename Enabler>
//struct require_impl;
template<typename From, typename To>
using Convertible = std::enable_if_t<std::is_convertible_v<From,To>>;
//template<typename R>
//struct require_impl<R, void>
//{
// using type = R;
//};
template<typename T>
using Arithmetic = std::enable_if_t<std::is_arithmetic_v<T>>;
//template<typename Return, typename... Ts>
//struct require_check : require_impl<Return, std::void_t<Ts...>>
//{
//};
template<typename T>
using Integral = std::enable_if_t<std::is_integral_v<T>>;
//template<typename From, typename To>
//using Convertible = std::enable_if_t<std::is_convertible_v<From, To>>;
template<bool Condition>
using If = std::enable_if_t<Condition>;
//template<typename T>
//using Arithmetic = std::enable_if_t<std::is_arithmetic_v<T>>;
//template<typename T>
//using Integral = std::enable_if_t<std::is_integral_v<T>>;
} // end namespace scalfmm::concepts
//template<bool Condition>
//using If = std::enable_if_t<Condition>;
// Pseudo require macro
#define requires(...) -> typename ::concept::require_check<__VA_ARGS__>::type
} // end namespace scalfmm::concepts
#endif // SCALFMM_CONCEPTS_LIBRARY_HPP
//// Pseudo require macro
//#define requires(...)->typename ::concept ::require_check < __VA_ARGS__> ::type
#endif // SCALFMM_CONCEPTS_LIBRARY_HPP
......@@ -107,7 +107,6 @@ namespace scalfmm::container
using difference_type = std::ptrdiff_t;
using size_type = std::size_t;
using allocator_type_tuple = std::tuple<typename Allocator::template rebind<Types>::other...>;
constexpr static auto indices = inria::make_index_sequence<sizeof...(Types)>();
......@@ -1042,11 +1041,11 @@ namespace scalfmm::container
auto it = iterator{this->array_insert_range<Types, Indices>( // Magic happens here
std::get<Indices>(pos), std::get<Indices>(first), std::get<Indices>(last))...};
this->_size += count;
return it;
}
/** \brief Insert elements from a range
*
* \tparam ValueIterator Iterator type convertible to a tuple of elements
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment