]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Name std::function template parameter
authorJonathan Wakely <jwakely@redhat.com>
Thu, 26 Aug 2021 23:20:31 +0000 (00:20 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Sat, 28 Aug 2021 10:52:22 +0000 (11:52 +0100)
commit952095bb053cfef47b48cc4345d658b8d8829800
treecacb2bc6592767d527461f9758939ae3fb4cafb2
parent91f78b673b1f8d5bca52b1947206f71c2ffa4f60
libstdc++: Name std::function template parameter

This avoids "<template-parameter-2-2>" being shown in the diagnostics
for ill-formed uses of std::function constructor:

In instantiation of 'std::function<_Res(_ArgTypes ...)>::function(_Functor&&)
[with _Functor = f(f()::_Z1fv.frame*)::<lambda()>;
<template-parameter-2-2> = void; _Res = void; _ArgTypes = {}]'

Instead we get:

In instantiation of 'std::function<_Res(_ArgTypes ...)>::function(_Functor&&)
[with _Functor = f(f()::_Z1fv.frame*)::<lambda()>;
_Constraints = void; _Res = void; _ArgTypes = {}]'

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* include/bits/std_function.h (function::function(F&&)): Give
name to defaulted template parameter, to improve diagnostics.
Use markdown for more doxygen comments.
libstdc++-v3/include/bits/std_function.h