Stream insertion function.
Display a textual description of current keyword and bound value over an output stream.
If Keyword defines a display member variable, it will be used to perform this display. Otherwise, its value will be displayed along with either a user-defined identifier or its stringified typename.
- Parameters
-
| os | Output stream |
| v | Value bound to current keyword |
- Returns
- The up-to-date output stream
Example:
#include <raberu/raberu.hpp>
{
std::ostream& display(std::ostream&
os,
auto const&
v)
{
return os <<
"Price: " <<
v <<
'$';
}
};
constexpr any_keyword< ID > keyword(ID id) noexcept
Create a regular keyword for reuse.
Definition keywords.hpp:340
constexpr typed_keyword< ID, Type > keyword(ID id) noexcept
Create a typed Keyword for reuse.
Definition keywords.hpp:366
Base class for keyword definition.
Definition keywords.hpp:62