bug-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bitset template


From: yvan joffre
Subject: bitset template
Date: Thu, 21 Dec 2000 13:51:02 +0100

Hi,

I'm using g++ version 2.95.2.
(SunOS ensisun 5.7 Generic_106541-11 sun4u sparc SUNW,Ultra-Enterprise)

I have when I use "reference operator [ ]"  of the bitset template.
I get the following message :

In method `bitset<8,long unsigned
int>::reference::reference(bitset<8,long unsigned int> &, unsigned
int)':
/home/ann3/yjoffre/local/include/g++/bitset:753:   instantiated from
`bitset<8,long unsigned int>::operator [](unsigned int)'
rotation.cc:165:   instantiated from here
/home/ann3/yjoffre/local/include/g++/bitset:377: `long unsigned int &
_Base_bitset<1,long unsigned int>::_M_getword(unsigned int)' is
inaccessible
/home/ann3/yjoffre/local/include/g++/bitset:583: within this context


I think there is a little mistake in the bitset header, because the
class bitset::reference needs to use
a private member function of bitset (method _M_getword, inherited from
the _Base_bitset thank to
private inheritance).

I propose to add the two following lines in the bitset header just
before the definition of class
"bitset::reference" (line 568 in my version) :
"class reference ;
  friend reference"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]