Bug 491537

Summary: dynamic_bitset/dynamic_bitset.hpp won't compile
Product: [Fedora] Fedora Reporter: Mamoru TASAKA <mtasaka>
Component: boostAssignee: Benjamin Kosnik <bkoz>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: bkoz, dirtyepic, mnewsome, pmachata, thomas.moschny
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: https://svn.boost.org/trac/boost/ticket/2842
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-23 11:09:04 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 476346    
Description Flags
Patch to workaround for this issue none

Description Mamoru TASAKA 2009-03-22 15:47:45 EDT
Created attachment 336217 [details]
Patch to workaround for this issue

Description of problem:

The following "boost.cpp":
#include <boost/dynamic_bitset.hpp>
won't compile like:

$ g++ -c -o boost.o boost.cpp
In file included from /usr/include/boost/dynamic_bitset.hpp:15,
                 from boost.cpp:1:
/usr/include/boost/dynamic_bitset/dynamic_bitset.hpp: In member function ‘size_t boost::dynamic_bitset<Block, Allocator>::count() const’:
/usr/include/boost/dynamic_bitset/dynamic_bitset.hpp:1021: error: ‘mode’ cannot appear in a constant-expression
/usr/include/boost/dynamic_bitset/dynamic_bitset.hpp:1021: error: template argument 1 is invalid
/usr/include/boost/dynamic_bitset/dynamic_bitset.hpp:1021: error: expected ‘>’ before ‘*’ token
/usr/include/boost/dynamic_bitset/dynamic_bitset.hpp:1021: error: expected ‘(’ before ‘*’ token
/usr/include/boost/dynamic_bitset/dynamic_bitset.hpp:1021: error: expected primary-expression before ‘>’ token

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. See above

Expected results:
Should compile

Additional info:
Workaround patch attached, although I don't know exactly
why this is needed...
Comment 1 Petr Machata 2009-03-23 09:47:00 EDT
Weird.  It's all const values, I think gcc should be able to instantiate it.
Anyway, I applied the patch, and the build is currently spinning (I'm thinking that bugfixes like this don't break the freeze policy).
Comment 2 Thomas Moschny 2009-03-24 13:51:50 EDT
Shouldn't that issue be presented to the gcc packagers/devs then?