title: Getting Boost.Spirit to handle optional elements
body: <p>I have an AST element defined roughly as</p>
  
  <pre><code>struct Something
  {
    boost::optional&lt;string&gt; foo;
    string bar;
  }
  </code></pre>
  
  <p>in my parsing code, I parse it as</p>
  
  <pre><code>-(identifier &gt;&gt; ':')
  &gt;&gt; type
  </code></pre>
  
  <p>Now, here's the problem: if I feed the parser the string <code>hello:world</code>, everything works correctly, i.e.,</p>
  
  <pre><code>foo = hello
  bar = world
  </code></pre>
  
  <p>If, however, I feed the parser the string <code>hello</code>, I get</p>
  
  <pre><code>foo = hello
  bar = hello
  </code></pre>
  
  <p>whereas what I want is</p>
  
  <pre><code>foo = boost::optional&lt;string&gt;()
  bar = hello
  </code></pre>
  
  <p>How can I achieve this in Boost.Spirit?</p>