Vector Class Discussion

more on vectorclass and STL problems
Author: Agner Date: 2014-10-21 13:52
This is the same error. The myClass must be aligned to an address divisible by 32. The compiler makes the correct alignment when creating an instance of myClass. But the STL vector knows nothing about alignment, so it can place its element at any address. This causes the crash in the extract function when the compiler assumes that all instances of Vec4d are properly aligned.

So don't ever put vector classes into STL or other containers.

 
thread gcc vector class+std::list crash new - Marco Belli - 2013-10-22
reply gcc vector class+std::list crash new - Agner - 2013-10-23
last replythread more on vectorclass and STL problems new - renato talucci - 2014-10-21
last reply more on vectorclass and STL problems - Agner - 2014-10-21