Re: [eigen] Compile bug: aligned_allocator, gcc 4.8.2 |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Compile bug: aligned_allocator, gcc 4.8.2
- From: Gabriel <gnuetzi@xxxxxxxxx>
- Date: Mon, 18 May 2015 18:54:30 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=ty3K8GI7JVo/6FzPQwkp5A0rHHwdfwN5f9gGwOTCrEA=; b=hzxPp8qu5e0ootor409hR4eHaPeoM//OKSDMaMgGoaUXIxkCpV44GTOSJr9HgYZorj HhSEP0zd71sjntie8VVVuHUTqYB6MzGSQdQq36Akc65bFrXXZOFIDWEIRina/H9noKpJ eYdtrNJBNMif4GX26LU2iLqLlWj2koiOawRJjXVc1wqT30uG0zK8fi9Ncbj+1sKYSVAf qXyhp2CF23AVtSudiliLzcypjYdRix0CdL+IqwvHhT5wXHFf3RTAsfzxQeVrY9IhpRzH qxg5eJlM5TeFd1/EFOItoVK5wOM1y+uos2iCCsm1qWm/p8zK5EdcBKYjpqSiwgS2JuS4 XPBg==
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{
public:
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 )
arised:
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)?
Christoph