libstdc++: Micro-optimizaion for std::bitset stream extraction
Don't bother trying to copy any characters for bitset<0>. libstdc++-v3/ChangeLog: * include/std/bitset (operator>>): Do not copy for N==0. * testsuite/20_util/bitset/io/input.cc: Add comment.
This commit is contained in:
parent
af611afe5f
commit
ab98b4c072
2 changed files with 2 additions and 2 deletions
|
@ -1615,7 +1615,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
|
|||
|
||||
if (__tmp.empty() && _Nb)
|
||||
__state |= __ios_base::failbit;
|
||||
else
|
||||
else if _GLIBCXX17_CONSTEXPR (_Nb)
|
||||
__x._M_copy_from_string(__tmp, static_cast<size_t>(0), _Nb,
|
||||
__zero, __one);
|
||||
if (__state)
|
||||
|
|
|
@ -39,7 +39,7 @@ void test01()
|
|||
ss.clear();
|
||||
ss.str("*");
|
||||
ss >> b0;
|
||||
VERIFY( ss.rdstate() == ios_base::goodbit );
|
||||
VERIFY( ss.rdstate() == ios_base::goodbit ); // LWG 3199
|
||||
}
|
||||
|
||||
int main()
|
||||
|
|
Loading…
Add table
Reference in a new issue