[Bug c++/83115] Capturing the local variable/function parameter by value generates a compilation error

2017-11-22 Thread alexandr.kolesov at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83115 --- Comment #1 from Alexander Kolesov --- The error we can see: prog.cc: In function 'void doSomething(double)': prog.cc:6:44: error: 'value' was not declared in this scope [ now = std::chrono::system_clock::now(), value]{}();

[Bug c++/83115] New: Capturing the local variable/function parameter by value generates an compilation error

2017-11-22 Thread alexandr.kolesov at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: alexandr.kolesov at gmail dot com Target Milestone: --- // This simple code cannot be compiled in some cases: #include #include void doSomething(const double