![]() |
CUSP
|
#include <functional.h>
Public Methods | |
| _CCCL_HOST_DEVICE | constant_functor (const T val=0) |
Construct with the given constant val. | |
| _CCCL_HOST_DEVICE T | operator() (const T &x) const |
Return the stored constant, ignoring input x. | |
constant_functor is a function object returns a constant value, ignores the input.
| T | is a model of Assignable, and if x is an object of type T, then x=c must be defined and must have a return type that is convertible to T. |
Overview constant_functor is a function object. Specifically, it is an Adaptable Unary Function. If f(c) is an object of class constant_functor<T>, and x is an object of class T, then f(x) returns c.
Definition at line 434 of file functional.h.
|
inline |
Construct with the given constant val.
Definition at line 442 of file functional.h.
|
inline |
Return the stored constant, ignoring input x.
Definition at line 446 of file functional.h.