Commit b1f290f0 authored by Quentin Khan's avatar Quentin Khan

FVariadicParticleContainer: creation

This container is meant to be used with the FBasicParticle or a class that
implements a similar interface.
parent fda599d1
#include "Utils/variadic_container.hpp"
#include "Utils/FAlignedAllocator.hpp"
namespace scalfmm {
namespace details {
template<typename Particle, class Allocator>
struct FVariadicParticleContainerBase {
template<typename... Types>
static auto getTypes(std::tuple<Types...>)
-> variadic_vector<Allocator, Types...>;
using type = decltype(getTypes(std::declval<typename Particle::data_t>()));
template<typename Particle, class Allocator = FAlignedAllocator<128,char> >
class FVariadicParticleContainer
: public scalfmm::details::FVariadicParticleContainerBase<Particle, Allocator>::type
using base_t = typename scalfmm::details::FVariadicParticleContainerBase<Particle, Allocator>::type;
using value_type = Particle;
using position_t = typename Particle::position_t;
using FReal = typename position_t::FReal;
using base_t::base_t;
void push(const Particle& particle) {
this->push_back(static_cast<typename Particle::data_t>(particle));
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