HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
v1::forward_value< T > Struct Template Reference

#include <hikogui/utility/forward_value.hpp>

Public Types

using type = std::remove_cvref_t<T>

Public Member Functions

type operator() (T const &t) const noexcept

Detailed Description

template<typename T>
struct v1::forward_value< T >

Functor for forwarding an forwarding-reference to variable.

This functor is used to long-time-storage of values passed into a template function. This means that views need to be translated into non-view values.

For savety against the lifetime of the orginal object ending:

  • rvalues are moved
  • lvalues are copied
  • std::string_view are copied into a std::string
  • std::span are copied into a std::vector

For performance a string literal which is stored in constant are taken by pointer:

  • char const (&)[] (string literal) are forward as a char const *

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