mardi 27 octobre 2015

Armadillo initializer list is not working

I am using the MSVC2013 64bit compiler under Windows 10.

According to:

std::cout << arma::arma_version::as_string() << std::endl;

I have version 6.100.1 (Midnight Blue) of the Armadillio library.

I have C++11 enabled, for example

auto il = { 10, 20, 30 };
for(auto ele : il)
    cout<<ele<<endl;

is working. Also the library is correctly added, as the following code runs:

vec v;
v<<10<<20<<30;
cout<<v;

But trying to use initializer lists for Armadillio fails!!!

vec v = { 1.0, 2.0, 3.0 };

causes the compile error:

error: C2440: 'initializing' : cannot convert from 'initializer-list' to 'arma::Col' No constructor could take the source type, or constructor overload resolution was ambiguous

Any clue how to fix that???

Aucun commentaire:

Enregistrer un commentaire