<p>I hate to say this, but this is indeed a bug in the Visual Studio compiler. Qiang's link is exactly the issue encountered here, and mtall's reply there is correct: Visual Studio should not be trying to implicitly cast an integer to <code>arma::span</code> when the constructor of <code>span</code> is marked <code>explicit</code>.</p>
<p>Digging a bit deeper, I discovered that this has been reported as a bug in the compiler:</p>
<p><a href="https://connect.microsoft.com/VisualStudio/feedback/details/811334/bug-in-vs-2013-support-for-explicit-conversion-operators">https://connect.microsoft.com/VisualStudio/feedback/details/811334/bug-in-vs-2013-support-for-explicit-conversion-operators</a></p>
<p>See also this useful Stack Overflow post describing the exact compiler issue in more detail:</p>
<p><a href="http://stackoverflow.com/questions/20498142/visual-studio-2013-explicit-keyword-bug">http://stackoverflow.com/questions/20498142/visual-studio-2013-explicit-keyword-bug</a></p>
<p>It may be possible to work around the issue, but this is only half of a solution. Replace the line <code>if (x(1) == 0)</code> in <code>lars.cpp</code> (line 431) with <code>if (x[1] == 0)</code>. That should (hopefully) resolve the issue, but I'm not certain. You can use the same strategy (replace <code>()</code> with <code>[]</code>) for the <code>radical.cpp</code> error too. If that doesn't fix it, the amount of voodoo necessary to make this compile simply isn't worth the time and you'll have to either find a more correct compiler or dig deep into the Armadillo sources to coax MSVC into compiling correctly.</p>
<p>Sorry for the bad news... :(</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/421#issuecomment-83872456">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFAROJ_6DD9hCn4JES5l_hg0zSNW8ks5n24zcgaJpZM4DwHqN.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/mlpack/mlpack/issues/421#issuecomment-83872456"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>