forked from iains/gcc-14-branch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
re PR libstdc++/57465 (Failed postcondition for std::function constru…
…cted with null function pointer) PR libstdc++/57465 * include/std/functional (_Function_base::_Base_manager::_M_not_empty_function): Fix overload for pointers. * testsuite/20_util/function/cons/57465.cc: New. From-SVN: r202974
- Loading branch information
Showing
3 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
2013-08-07 Jonathan Wakely <[email protected]> | ||
|
||
PR libstdc++/57465 | ||
* include/std/functional | ||
(_Function_base::_Base_manager::_M_not_empty_function): Fix overload | ||
for pointers. | ||
* testsuite/20_util/function/cons/57465.cc: New. | ||
|
||
2013-09-26 Tim Shen <[email protected]> | ||
|
||
* regex_error.h: Remove _S_error_last to follow the standard. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright (C) 2013 Free Software Foundation, Inc. | ||
// | ||
// This file is part of the GNU ISO C++ Library. This library is free | ||
// software; you can redistribute it and/or modify it under the | ||
// terms of the GNU General Public License as published by the | ||
// Free Software Foundation; either version 3, or (at your option) | ||
// any later version. | ||
// | ||
// This library is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License along | ||
// with this library; see the file COPYING3. If not see | ||
// <http://www.gnu.org/licenses/>. | ||
|
||
// libstdc++/57465 | ||
|
||
// { dg-options "-std=gnu++11" } | ||
|
||
#include <functional> | ||
#include <testsuite_hooks.h> | ||
|
||
int main() | ||
{ | ||
using F = void(); | ||
F* f = nullptr; | ||
std::function<F> x(f); | ||
VERIFY( !x ); | ||
} |