RWLEnvelope 0.0.0
Thread-safe envelope wrapper using reader-writer locks
Loading...
Searching...
No Matches
siddiqsoft::MutateCallbackNoexcept Concept Reference

Concept to enforce that callbacks do not throw exceptions (for mutable access). More...

#include </opt/azure-agent/_work/15/s/include/siddiqsoft/RWLEnvelope.hpp>

Concept definition

template<typename ContainerType, typename Callback, typename... Args>
concept MutateCallbackNoexcept = requires(Callback f, ContainerType& item, Args... args) {
{ f(item, std::forward<Args>(args)...) } noexcept;
}
Concept to enforce that callbacks do not throw exceptions (for mutable access).

Detailed Description

Concept to enforce that callbacks do not throw exceptions (for mutable access).

This concept ensures that callbacks used with mutate() are:

  • Marked with noexcept specification
  • Accept ContainerType& (mutable reference) as the first parameter
  • Can accept additional arguments via Args...
    Template Parameters
    ContainerTypeThe type of the container being accessed
    CallbackThe callback type to check
    ArgsThe argument types to pass to the callback
    See also
    mutate()

Definition at line 107 of file RWLEnvelope.hpp.