Re: [eigen] Compile bug: aligned_allocator, gcc 4.8.2

[ Thread Index | Date Index | More Archives ]

Thanks Christoph for the fast reply!

It seems strange,
I uniinstalled all gcc, clang compilers and only installed gcc 4.8.2 (libstdc++-4.8-dev:amd64 (4.8.2-19ubuntu1) )

compiling : g++-4.8 -std=c++11 -I/usr/local/include/eigen3 -o main src/main.cpp
with this working example as main.cpp

#include <unordered_map>
#include <Eigen/Dense>

class A{

template<typename Key, typename Type, typename Hash = std::hash<Key>, typename Pred = std::equal_to<Key> > using StdUMapAligned = std::unordered_map<Key, Type, Hash, Pred, Eigen::aligned_allocator<std::pair<const Key, Type> > >;

int  main(){
    StdUMapAligned<unsigned int , A > a;
    unsigned int i = 0;
    auto & r = a[i];

does not work?

I dont get it why it works with your configuration.

BR Gabriel

On 05/18/2015 06:21 PM, Christoph Hertzberg wrote:
Am 18.05.2015 um 17:54 schrieb Gabriel:
I recently switched to the newest dev version 3.2.90 and
the following compile bug (only under gcc 4.8.2, 4.9 compiles fine )
This code worked before or did I use something incorrectly up to now?

I don't get any errors compiling your code (after adding #include <unordered_map>) using g++ (Ubuntu 4.8.2-19ubuntu1) and the current head of the dev-branch. I guess you either removed something essential from your code snippet to reproduce this, or you have a buggy c++-library ...

From what Eigen version did you switch (i.e. what date or what hg-hash)?


Mail converted by MHonArc 2.6.19+