<p>In <a href="https://github.com/mlpack/mlpack/pull/694#discussion_r69430620">src/mlpack/core/data/map_policies/missing_policy.hpp</a>:</p>
<pre style='color:#555'>&gt;  
&gt; -      typedef boost::bimap&lt;std::string, size_t&gt;::value_type PairType;
&gt; -      maps[dimension].first.insert(PairType(string, numMappings));
&gt; -      return numMappings++;
&gt; +      typedef boost::bimap&lt;std::string, mapped_type&gt;::value_type PairType;
&gt; +      maps[dimension].first.insert(PairType(string, NaN));
</pre>
<p>Execute ++numMappings at here maybe is better, because insert may throw exception.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/694/files/bace8b25ba703878a1348782e9e4feb210062a47..896a01819631f3a4a0d7ab3fb08189d02435f1c9#r69430620">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFL9osmub8k6nWVZ7A78xfIsuHHraks5qSNC0gaJpZM4I07W-">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFCJtr-kQcEDjYfzDI1RYFU9aPEFwks5qSNC0gaJpZM4I07W-.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/pull/694/files/bace8b25ba703878a1348782e9e4feb210062a47..896a01819631f3a4a0d7ab3fb08189d02435f1c9#r69430620"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>