Bug 55847 - mistake bad_weak_ptr::what() message
Summary: mistake bad_weak_ptr::what() message
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: 4.8.0
Assignee: Jonathan Wakely
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-02 12:20 UTC by Akira Takahashi
Modified: 2013-01-07 00:53 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2013-01-03 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Akira Takahashi 2013-01-02 12:20:48 UTC
C++11 Standard says follow:

20.7.2.1 p2
bad_weak_ptr() noexcept;
Postconditions: what() returns "bad_weak_ptr"

But, libstdc++'s bad_weak_ptr::what() return "std::bad_weak_ptr".
"std::" is unnecessary.
Comment 1 Jonathan Wakely 2013-01-07 00:50:23 UTC
Author: redi
Date: Mon Jan  7 00:50:16 2013
New Revision: 194958

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194958
Log:
	PR libstdc++/55847
	* src/c++11/shared_ptr.cc (bad_weak_ptr::what()): Correct string.
	* testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Verify
	string.

	PR libstdc++/55728
	* include/std/functional (bad_function_call::what()): Declare.
	* src/c++11/functional.cc (bad_function_call::what()): Define.
	* config/abi/pre/gnu.ver (bad_function_call::what()): Export.
	* testsuite/20_util/bad_function_call/what.cc: New.

Added:
    trunk/libstdc++-v3/testsuite/20_util/bad_function_call/what.cc
      - copied, changed from r194957, trunk/libstdc++-v3/testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/config/abi/pre/gnu.ver
    trunk/libstdc++-v3/include/std/functional
    trunk/libstdc++-v3/src/c++11/functional.cc
    trunk/libstdc++-v3/src/c++11/shared_ptr.cc
    trunk/libstdc++-v3/testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc
Comment 2 Jonathan Wakely 2013-01-07 00:53:33 UTC
fixed for 4.8