title: Boost property tree ini parsing gives error if any comment is appended to key-value
body: <p>I have a working example program which parses ini formatted data with boost property_tree. 
  When I append a comment to the key-value pairs I get coredump. I have searched any comment trim function on property_tree but cannot find anything. </p>
  
  <p>The working program:</p>
  
  <pre><code>static std::string inidata =
  R"(
      # comment
  
      [SECTION1]  
      key1 = 15
      key2=val        
  )";
  
  void read_data(std::istream &amp;is)
  {
      using boost::property_tree::ptree;
  
      ptree pt;
  
      read_ini(is, pt);
  
      boost::optional&lt;uint32_t&gt;    sect1_key1 = pt.get_optional&lt;uint32_t&gt;(ptree::path_type("SECTION1/key1", '/'));
      boost::optional&lt;std::string&gt; sect1_key2 = pt.get_optional&lt;std::string&gt;(ptree::path_type("SECTION1/key2", '/'));
  
      std::cout &lt;&lt; "SECTION1.key1: " &lt;&lt; *sect1_key1 &lt;&lt; std::endl;
      std::cout &lt;&lt; "SECTION1.key2: " &lt;&lt; *sect1_key2 &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>The comment appended config:</p>
  
  <pre><code>static std::string inidata =
  R"(
      # comment
  
      [SECTION1]  
      key1 = 15           # COMMENT ADDED!
      key2=val        
  )";
  </code></pre>
  
  <p>The core dump output:</p>
  
  <pre><code>/usr/local/include/boost/optional/optional.hpp:992: boost::optional&lt;T&gt;::reference_type boost::optional&lt;T&gt;::get() [with T = unsigned int; boost::optional&lt;T&gt;::reference_type = unsigned int&amp;]: Assertion `this-&gt;is_initialized()' failed.
  Aborted (core dumped)
  </code></pre>