|
Boost : |
From: Gary Powell (Gary.Powell_at_[hidden])
Date: 2001-05-16 11:35:13
Well the Lambda library has similar classes, and I'm working on getting it
into a standard compliant, or at least a boost compliant form, but I'm
curious where you use this particular class.
-Gary-
gary.powell_at_[hidden]
> -----Original Message-----
> From: nbecker_at_[hidden] [SMTP:nbecker_at_[hidden]]
> Sent: Wednesday, May 16, 2001 8:21 AM
> To: boost_at_[hidden]
> Subject: [boost] Constant.H
>
> I believe this simple class belongs in a standard library since it's
> so useful:
>
> #ifndef Constant_H
> #define Constant_H
>
> template<typename out_t>
> class Constant {
> const out_t val;
> public:
> Constant (out_t _val) :
> val (_val) {}
>
> template<typename T>
> out_t operator() (T x) const {
> return val;
> }
> };
>
> #endif
>
> To unsubscribe, send email to: <mailto:boost-unsubscribe_at_[hidden]>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk