http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51459

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.6 Regression] 'double    |[4.7 Regression] 'double
                   |free or corruption'         |free or corruption'
                   |involving std::function,    |involving std::function and
                   |std::vector and lambdas     |lambdas

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-12-07 
23:08:58 UTC ---
This is enough to see the glibc errors, and, unless I'm badly mistaken, *very*
little changed in std::function between 4.6 and 4.7, thus I doubt it's a
library issue:

#include <functional>

template <typename F>
std::function<void()> animate(F f) { return [=]{ f(); }; }

int main()
{
  std::function<void()> linear1 = []{};
  std::function<void()> av(animate(linear1));
  av();
}

Reply via email to