<p>This issue is similar to the load-save-test issue I raised earlier. But this time the error is in the test routine. Consider the following code from serial_test.cpp:<br>
<code><br>
/ Test function for loading and saving Armadillo objects.<br>
template
         typename IArchiveType,<br>
         typename OArchiveType&gt;<br>
void TestArmadilloSerialization(MatType&amp; x)<br>
{<br>
  // First save it.<br>
  ofstream ofs("test");<br>
  OArchiveType o(ofs);<br>
</code></p>

<p>If the (I/0)ArchiveType is binary then the test fails due to the two character CR-LF eol marker. There are two options: one is to open the file as binary always; the other is partial function template specialization or something like that. I tried some tests using ios::binary and they seem to pass. But I am not sure about the general repercussions of opening a text file as binary. </p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/482">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFFKiDx0L2x1epn3XAj9SQE9dnjfdks5pIkzCgaJpZM4GnOUr.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/482"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>