12#ifndef ARCANE_UTILS_FUNCTORUTILS_H
13#define ARCANE_UTILS_FUNCTORUTILS_H
17#include "arccore/base/Functor.h"
23namespace Arcane::functor
30template <
typename LambdaType,
typename A1> StdFunctorWithArgumentT<A1>
31make(
const LambdaType& f,
void (LambdaType::*)(A1 r)
const)
33 return StdFunctorWithArgumentT<A1>(f);
44template <
typename LambdaType>
auto
45make(
const LambdaType& f) ->
decltype(make(f, &LambdaType::operator()))
47 return make(f, &LambdaType::operator());
51template <
typename LambdaType,
typename A1> StdFunctorWithArgumentT<A1>*
52makePointer(
const LambdaType& f,
void (LambdaType::*)(A1 r)
const)
54 return new StdFunctorWithArgumentT<A1>(f);
66template <
typename LambdaType>
auto
67makePointer(
const LambdaType& f) ->
decltype(makePointer(f, &LambdaType::operator()))
69 return makePointer(f, &LambdaType::operator());
100template <
typename LambdaType,
typename T,
typename ArgType>
void
101apply(T* x,
void (T::*ptr)(IFunctorWithArgumentT<ArgType>*),
const LambdaType& f)
Declarations of types used in Arcane.