Skip to content

Error result when using auto and expression

Submitted by new..@..il.com

Assigned to Nobody

Link to original bugzilla bug (#680)
Version: 3.2

Description

In the following code, vector res in test_auto() will contain incorrect data.

Eigen::VectorXd retVec()

{

Eigen::VectorXd val(2);  

val<<1, 2;  

return val;  

}

void test_auto()

{

// failure here  

auto res = retVec().transpose();  

cout<<res<<endl;  

}