|
Boost : |
Subject: Re: [boost] [config] Local classes as template parameters
From: lcaminiti (lorcaminiti_at_[hidden])
Date: 2011-04-13 12:44:00
lcaminiti wrote:
>
>
> Is there a Boost.Config macro that indicates if the compiler allows
> local classes to be passed as template parameters?
>
Does anyone know if there is such a macro in Boost.Config?
For example, this config macro will tell if the following is allowed or not
(supported by C++03 and later standards):
int main() {
struct { // Local class.
void operator()(double x) { std::cout << x << std::endl; }
} print;
std::vector v(3);
v[0] = 1.1; v[1] = 2.2; v[2] = 3.3;
// The config macro will tell if compiler supports passing local object
`print` as template param or not.
std::for_each(v.begin(), v.end(), print);
return 0;
}
Thanks a lot.
--Lorenzo
-- View this message in context: http://boost.2283326.n4.nabble.com/config-Local-classes-as-template-parameters-tp3429565p3447697.html Sent from the Boost - Dev mailing list archive at Nabble.com.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk