[Bug c++/55728] New: std::bad_function_call has misleading what() result
joerg.richter@pdv-fs.de
gcc-bugzilla@gcc.gnu.org
Tue Dec 18 12:34:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55728
Bug #: 55728
Summary: std::bad_function_call has misleading what() result
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: joerg.richter@pdv-fs.de
cat t.cc << EOF
#include <functional>
#include <iostream>
int main()
{
try
{
std::function<void()>()();
}
catch( std::exception const& e )
{
std::cout << e.what() << std::endl;
}
}
EOF
g++ -std=c++11 -o t t.cc
t
# gives me "std::exception"
Not wrong, but "std::bad_function_call" would have saved me some debug time.
More information about the Gcc-bugs
mailing list