value initialization and array data member

Paolo Carlini paolo.carlini@oracle.com
Sat Nov 6 02:24:00 GMT 2010


Hi,
> On 11/05/2010 09:03 PM, Gabriel Dos Reis wrote:
>> I'm looking into std::bitset with respect to constexpr issue.
>> My understanding has always been that one can use the
>> syntax `member()' to value-initialize an array data member
>> `member'.
> I believe so.
Thanks Gaby and Jason.

I wanted to apply the below patch, which seems correct to me in the
light of your exchange and triggered ICEs, for
23_containers/bitset/cons/constexpr.cc for example I got:

In file included from
/home/paolo/Gcc/svn-dirs/trunk/libstdc++-v3/testsuite/23_containers/bitset/cons/constexpr.cc:21:0:

/home/paolo/Gcc/svn-dirs/trunk-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/bitset:
In constructor 'constexpr std::_Base_bitset<_Nw>::_Base_bitset() [with
long unsigned int _Nw = 4ul]':
/home/paolo/Gcc/svn-dirs/trunk-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/bitset:814:7:  
instantiated from 'constexpr std::bitset<_Nb>::bitset() [with long
unsigned int _Nb = 256ul]'
/home/paolo/Gcc/svn-dirs/trunk/libstdc++-v3/testsuite/util/testsuite_common_types.h:627:20:  
instantiated from 'void
__gnu_test::constexpr_default_constructible::operator()()::_Concept::__constraint()
[with _Tp = std::bitset<256ul>]'
/home/paolo/Gcc/svn-dirs/trunk/libstdc++-v3/testsuite/util/testsuite_common_types.h:631:17:  
instantiated from 'void
__gnu_test::constexpr_default_constructible::operator()() [with _Tp =
std::bitset<256ul>]'
/home/paolo/Gcc/svn-dirs/trunk/libstdc++-v3/testsuite/23_containers/bitset/cons/constexpr.cc:29:38:  
instantiated from here
/home/paolo/Gcc/svn-dirs/trunk-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/bitset:76:18:
internal compiler error: in build_data_member_initialization, at
cp/semantics.c:5499

Can you have a look?

Thanks,
Paolo.

//////////////////////

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patchlet
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20101106/7f0fd30b/attachment.ksh>


More information about the Libstdc++ mailing list