Rodin/Utility/ForConstexpr.h file

Defines compile-time loop utilities for template metaprogramming.

This file provides utilities for performing compile-time iterations over parameter packs and index sequences, enabling powerful template metaprogramming patterns.

Namespaces

namespace Rodin
The Rodin library for finite element methods and shape optimization.
namespace Rodin::Utility
Type utilities and generic programming helpers.

Functions

template<size_t... Is, class F>
void ForIndexImpl(F&& f, std::index_sequence<Is...> indices) constexpr
Invokes a callable once for each index in an index sequence.

Function documentation

template<size_t... Is, class F>
void ForIndexImpl(F&& f, std::index_sequence<Is...> indices) constexpr

Invokes a callable once for each index in an index sequence.

Parameters
f Callable receiving a std::integral_constant<size_t,I>.
indices Compile-time indices used to instantiate the callable invocations.