This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77369] incorrect noexcept specification deduction
- From: "mail at daniel-boehmer dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 15 Feb 2017 12:40:27 +0000
- Subject: [Bug c++/77369] incorrect noexcept specification deduction
- Auto-submitted: auto-generated
- References: <bug-77369-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77369
Daniel Böhmer <mail@daniel-boehmer.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mail@daniel-boehmer.net
--- Comment #2 from Daniel Böhmer <mail@daniel-boehmer.net> ---
I can confirm this issue for GCC 6.2.0 and std=c++17
Considering the following example, this issue is problematic, where
std::terminate is called for func2(), instead of passing the exception to the
caller.
template<typename F> void caller(F&& f)
{
std::forward<F>(f)();
}
void func1() noexcept
{
}
void func2()
{
throw std::exception();
}
int main()
{
caller(func1);
try
{
caller(func2);
}
catch(...)
{
}
return 0;
}