Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
fcf0430b
Commit
fcf0430b
authored
Feb 07, 2013
by
Edward Smith-Rowland
Committed by
Edward Smith-Rowland
Feb 07, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PR56193 - Wrong test operator for basic_ios in C++11.
From-SVN: r195849
parent
3e508131
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
0 deletions
+26
-0
libstdc++-v3/ChangeLog
+6
-0
libstdc++-v3/include/bits/basic_ios.h
+5
-0
libstdc++-v3/testsuite/27_io/basic_ios/pr56193.cc
+15
-0
No files found.
libstdc++-v3/ChangeLog
View file @
fcf0430b
2013-02-06 Edward Smith-Rowland <3dw4rd@verizon.net>
* include/bits/basic_ios.h: Replace operator void*() const
with explicit operator bool() const in C++11 and greater.
* testsuite/27_io/basic_ios/pr56193.cc: New file.
2013-02-04 Dodji Seketeli <dodji@redhat.com>
Add missing explicit instantiation for std::lower_bound template
...
...
libstdc++-v3/include/bits/basic_ios.h
View file @
fcf0430b
...
...
@@ -112,8 +112,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* This allows you to write constructs such as
* <code>if (!a_stream) ...</code> and <code>while (a_stream) ...</code>
*/
#if __cplusplus >= 201103L
explicit
operator
bool
()
const
{
return
!
this
->
fail
();
}
#else
operator
void
*
()
const
{
return
this
->
fail
()
?
0
:
const_cast
<
basic_ios
*>
(
this
);
}
#endif
bool
operator
!
()
const
...
...
libstdc++-v3/testsuite/27_io/basic_ios/pr56193.cc
0 → 100644
View file @
fcf0430b
// { dg-do compile }
// { dg-options "-std=gnu++11" }
// Copyright (C) 2013 Free Software Foundation, Inc.
#include <iostream>
// PR libstdc++/56193
int
test01
()
{
std
::
cout
<<
std
::
cout
;
// { dg-error "cannot bind" }
}
// { dg-error "initializing argument" "" { target *-*-* } 602 }
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment