Graphle 1.0.0
A C++20 header-only graph library
Loading...
Searching...
No Matches
Public Member Functions | List of all members
graphle::store::provide_external< T, ReturnCleared > Class Template Reference

#include <storage_provider_helpers.hpp>

Public Member Functions

 provide_external (T &value, std::bool_constant< ReturnCleared >={})
 
constexpr auto & operator() (void) const noexcept
 

Detailed Description

template<typename T, bool ReturnCleared = true>
requires requires (T value) { value.clear(); }
class graphle::store::provide_external< T, ReturnCleared >

Storage provider that returns an existing copy of T (owned by the caller) whenever it is invoked, clearing it before each usage with T::clear(), unless ReturnCleared is set to false. The provided storage object must remain valid for the duration of the lifetime of the provide_external provider that it is wrapped in.

Definition at line 62 of file storage_provider_helpers.hpp.

Constructor & Destructor Documentation

◆ provide_external()

template<typename T , bool ReturnCleared = true>
graphle::store::provide_external< T, ReturnCleared >::provide_external ( T &  value,
std::bool_constant< ReturnCleared >  = {} 
)
inlineexplicit

Definition at line 64 of file storage_provider_helpers.hpp.

Member Function Documentation

◆ operator()()

template<typename T , bool ReturnCleared = true>
constexpr auto & graphle::store::provide_external< T, ReturnCleared >::operator() ( void  ) const
inlineconstexprnoexcept

Definition at line 66 of file storage_provider_helpers.hpp.


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