kokkos-execution 0.0.1
Loading...
Searching...
No Matches
Tests::scope_object_with_exit< T > Struct Template Reference

Inspired by the examples from [4]. It calls T::exit when the scope ends. More...

Public Types

using type = T

Public Member Functions

exec::enter_scope_sender auto operator() (type *storage) const noexcept

Public Attributes

size_t * counter

Detailed Description

template<typename T>
requires ( std::constructible_from<T, size_t*> && requires (T& obj) { {obj.exit() } -> std::same_as<void>; })
struct Tests::scope_object_with_exit< T >

Inspired by the examples from [4]. It calls T::exit when the scope ends.

Definition at line 18 of file test_lifetime.cpp.

Member Typedef Documentation

◆ type

template<typename T>
using Tests::scope_object_with_exit< T >::type = T

Definition at line 19 of file test_lifetime.cpp.

Member Function Documentation

◆ operator()()

template<typename T>
exec::enter_scope_sender auto Tests::scope_object_with_exit< T >::operator() ( type * storage) const
inlinenoexcept

Definition at line 23 of file test_lifetime.cpp.

References counter.

Member Data Documentation

◆ counter

template<typename T>
size_t* Tests::scope_object_with_exit< T >::counter

Definition at line 21 of file test_lifetime.cpp.


The documentation for this struct was generated from the following file: