valueFunctor

Constructs a nullary functor which simply returns a value specified at run-time. Like () => value, but without the closure and indirect call.

  1. auto valueFunctor()
  2. auto valueFunctor(Value value)
    valueFunctor
    (
    Value
    )
    (
    Value value
    )

Examples

assert(valueFunctor(5)() == 5);
assert(valueFunctor!5()() == 5);

Meta