|
Boost : |
Subject: Re: [boost] [config] local types as template params
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2012-01-07 16:29:39
> Yes, it's incomplete... Can someone with access to many compilers and
> compiler versions try to compile the example below and let me know if
> it compiles? (I only have access to MSVC 8.0 and GCC 4.5.3).
>
> #include
> #include
>
> int main() {
> struct s {
> void operator()(int x) {
> std::cout << x << std::endl;
> }
> } l;
>
> int nums[] = {1, 2, 3};
> std::for_each(nums, nums + 3, l);
>
> return 0;
> }
I have access to GCC 4.3 through 4.7.
On GCC 4.3 and 4.4, it does not compile, with or without --std=c++0x
On GCC 4.5, 4.6, and 4.7, it compiles with --std=c++0x, but not without
Presumably it would not compile on older GCC versions either.
Regards,
Nate
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk