Boost logo

Boost :

Subject: [boost] [GIL] runtime assertion error
From: Stephan Menzel (stephan.menzel_at_[hidden])
Date: 2015-01-03 12:51:39


Hello,

I was playing with GIL a little and started out with the tutorial. After
adapting it a bit I noticed a runtime assertion error here in
color_base.hpp +343:

template <typename Element, typename Layout, int K>
typename element_reference_type<homogeneous_color_base<Element,Layout,K>
>::type
dynamic_at_c(homogeneous_color_base<Element,Layout,K>& cb, std::size_t i) {
    assert(i<K);
    return (gil_reinterpret_cast<Element*>(&cb))[i];
}

The example works if I compile in release but I still wanted to bring it up
because of an extensive comment above this template that states that this
assertion checks for compiler specific behavior and mentions flags that
need to be set but not which flags.

I believe there might be a bug there. Also, since it's the tutorial, I
suppose it should work under most circumstances.

I have a sample of the code attached. It's gcc 4.8 here in Linux 64.
Nothing fancy. Boost 1.56.

Cheers,
Stephan




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk