Boost logo

Boost Users :

Subject: [Boost-users] Compile error with low_bits_mask_t
From: Michael Kaes (michael.kaes_at_[hidden])
Date: 2017-03-27 12:40:38


Hi,

I discovered a compile issue when using boosts integer_mask.
The following simple program compiles fine with clang but fails with gcc.

#include <iostream>
#include <boost/integer.hpp>
#include <boost/integer/integer_mask.hpp>

int main()
{
    typedef boost::low_bits_mask_t<2> mask_type_t;
    std::cout << mask_type_t::sig_bits << std::endl;
    return 0;
}

I took both clang and gcc from the svn trunk and boost in version 1.63.

I did not have the time yet to dig through the boost implementation but I
could not find anything in the issue tracker.
So is this a compiler error of gcc or is this a bug in boost.
I was able to find a stackoverflow question:
http://stackoverflow.com/questions/40291949/boostinteger-mask-gcc-compiler-error
And the answer sounds reasonable to me that this is a bug in boost.

Can anyone confirm this? And why does clang accept this?

Thanks,
Michael



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net