Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4022: dynamic_bitset compiler issue
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-03-21 05:09:43
#4022: dynamic_bitset compiler issue
---------------------------+------------------------------------------------
Reporter: anonymous | Owner: gennaro_prota
Type: Bugs | Status: reopened
Milestone: Boost 1.43.0 | Component: dynamic_bitset
Version: Boost 1.38.0 | Severity: Problem
Resolution: | Keywords:
---------------------------+------------------------------------------------
Comment(by steven_watanabe):
Of course, you have to use an unsigned type. With that the code does
compile, although it emits a warning. The warning is harmless in this
case, although it would be better to fix it as you suggest.
{{{
#include <boost/dynamic_bitset/dynamic_bitset.hpp>
int main() {
boost::dynamic_bitset<unsigned long long> bitset_type;
bitset_type.resize(10, false);
}
}}}
{{{
boost/dynamic_bitset/dynamic_bitset.hpp(673) : warning C4244:
'initializing' : conversion from 'unsigned __int64' to 'const
boost::dynamic_bitset<Block>::size_type', possible loss of data
with
[
Block=unsigned __int64
]
boost/dynamic_bitset/dynamic_bitset.hpp(649) : while compiling
class template member function 'void
boost::dynamic_bitset<Block>::resize(boost::dynamic_bitset<Block>::size_type,bool)'
with
[
Block=unsigned __int64
]
.\scratch.cpp(4) : see reference to class template instantiation
'boost::dynamic_bitset<Block>' being compiled
with
[
Block=unsigned __int64
]
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4022#comment:4> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC