Boost logo

Boost :

From: (noreply_at_[hidden])
Date: 2003-11-29 12:27:38

Bugs item #851225, was opened at 2003-11-29 18:27
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Thomas Rösner (dtrauma)
Assigned to: Nobody/Anonymous (nobody)
Summary: compiler error using multi_array w/ <algorithm>

Initial Comment:
[boost 1.30.2, gcc3.3.2]

Hi there,

when using multi_array I get compile time errors if I
try to use them with <algorithm> like this:

#include <algorithm>
#include <boost/multi_array.hpp>

int main () {
        //straight from the docs
        typedef boost::multi_array<double, 3> array_type;
        typedef array_type::extent_range range;

        array_type::extent_gen extents;
        array_type A(extents[2][3][4]);
        //each of those will fail with
        //enough errors to fill a novel

        //read access
        std::find(A.begin(), A.end(), 42.);
        //write access
        std::fill(A.begin(), A.end(), 42.);

Is it my fault? I tried it with boost/array.hpp and it
worked, so I assumed it should work with multi-array, too.
So there are three possibilities:
        1.) I am a fool
        2.) multi_array fools me
        3.) gcc fools me
or any combination of those; could someone de-fool the
situation? :-)

compiler output attached


You can respond by visiting:

This email is sponsored by: Giveback Program.
Does help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here:
Boost-bugs mailing list

Boost list run by bdawes at, gregod at, cpdaniel at, john at