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

Concept to enforce that callbacks do not throw exceptions (for const/read-only access). More...

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

Concept definition

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

Detailed Description

Concept to enforce that callbacks do not throw exceptions (for const/read-only access).

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

  • Marked with noexcept specification
  • Accept const ContainerType& 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
    observe()

Definition at line 92 of file RWLEnvelope.hpp.