commons 0.1.5
Header-only C++23 library of common/shared types for the C++ libraries
Loading...
Searching...
No Matches
comms::WithPriority< T > Class Template Reference

A value of T carrying a priority. More...

#include <prioritized.hpp>

Inherits detail::WithPriorityBase< T >.

Public Member Functions

 WithPriority ()
 Default-constructs a T at DEFAULT_PRIORITY — available only when T is default-constructible (needed for nlohmann's get<WithPriority<T>>()).
 

Detailed Description

template<typename T>
class comms::WithPriority< T >

A value of T carrying a priority.

For a non-final class T it inherits T (a true is-a T, usable wherever T& is expected); otherwise it holds a T accessible through value() / operator* / operator->. Either way it is a Prioritized. Construct it via with_priority / make_prioritized, or directly: the inherited constructor's first argument is always the priority, the rest forward to T.


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