C++: Armadillo column matrix initialization ambiguous
<p>I define an armadillo matrix and I try to initialize it via initialiser lists according to its <a href="http://arma.sourceforge.net/docs.html#element_initialisation" rel="nofollow">manual</a>.</p>

<p>It is fine unless I try to define a column matrix.</p>

<p>Why is it ambigious?</p>

<pre><code>#include &lt;armadillo&gt;

int main()
{
    // ok : square matrix
    arma::mat A={{1.0,2.0},{3.0,4.5}};

    // ok: row matrix
    arma::mat B={3.5,4.0};

    // error: conversion from ‘&lt;brace-enclosed initializer list&gt;’ to 
    // ‘arma::mat {aka arma::Mat&lt;double&gt;}’ is ambiguous
    arma::mat C={{3.5},{4.0}};

    // ok: column matrix
    arma::mat D=arma::mat({3.5,4.0}).t();

    return 0;
}
</code></pre>