On Thursday 30 April 2009 19:19:31 you wrote:
> When I try to specify the capture it works ((&sum, &f) works too but f is
> const):
>
> #include
>
> int
> main(void)
> {
> int numbers[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
> const std::size_t nn = sizeof(numbers)/sizeof(int);
> int sum = 0;
>
Hi,
this program SEGFAULTs
#include
int main() {
int numbers[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
const std::size_t nn = sizeof(numbers)/sizeof(int);
int sum = 0;
int f = 5;
std::for_each(&numbers[0], &numbers[nn], [&] (int n) {
sum += n * f;
});
}
Now, my assembly days are
On Wednesday 29 April 2009 12:47:04 Joern Rennecke wrote:
> Something which I miss in C++ is a way to declare that a function uses
> an integral type to pass an enum value (in arguments or return value),
> and then at function definition time only check that the integral type
> is sufficently large
Hi,
I have very much been looking forward to the including of the lambda part of
C++0x. I have been playing around with the lambda branch of gcc, which at
least superficially works well apart from assorted bugs.
What can I do to make lambdas part of a future release of gcc?
Where do I report/