Re: std::string clobbers memory when compiling without optimizations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3 October 2014 11:30, Henrik Mannerström wrote:
> On 10/03/2014 01:20 PM, Jonathan Wakely wrote:
>> My guess is that Sigma holds a dangling reference to some temporary
>> object that has gone out of scope, and the function call t2s
>> overwrites that stack memory, then when you return to main you go
>> through the dangling reference.
>>
>> Are you sure you're using the Eigen types correctly?
> You are right, the auto type does not force the evaluation of Sigma,
> which leaves the dangling reference. Yet again I get burned by trying to
> combine Eigen and C++11. How would you classify this, could you call it
> a bug in Eigen, or just incompatibility with C++11?

As Marc says, expression templates are often incompatible with 'auto',
that doesn't mean Eigen is incompatible with C++11 in general.





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux