This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
C++ Standard Question
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Thu, 22 Jan 2015 15:31:34 -0600
- Subject: C++ Standard Question
- Authentication-results: sourceware.org; auth=none
Hi
I think this is a glibc issue but since this method is defined in the C++
standards, I thought there were plenty of language lawyers here. :)
<strstream>
class strstreambuf : public basic_streambuf<char, char_traits<char> >
ISSUE ====> int pcount() const; <===== ISSUE
My reading of the C++03 and draft C++14 says that the int pcount() method
in this class is not const. glibc has it const in the glibc shipped with
Fedora 20
and CentOS 6.
This is a simple test case:
#include <strstream>
int main() {
int (std::strstreambuf::*dummy)() = &std::strstreambuf::pcount;
/*-- pcount is conformant --*/
return 0;
}
What's the consensus?
Thanks.
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985