title: Difference between boost optional and std::experimental optional assignment
body: <p>Usually when a function returns <code>boost::optional</code> I've seen a lot of people returning an empty brace <code>{}</code> to designate an empty value, that works fine and is shorter than returning <code>boost::none</code>.</p>
  
  <p>I tried to do something similar to empty a <code>boost::optional&lt;int&gt;</code>, but when calling the copy assignment operator (or most probably the move assignment op) with an empty brace in the right side, the empty brace is converted to an int and then that value is assigned to the optional, so I end up with the variable set to 0 and not an empty value as I was expecting. Here's an example <a href="https://godbolt.org/g/HiF92v" rel="noreferrer">https://godbolt.org/g/HiF92v</a>, if I try the same with <code>std::experimental::optional</code> I get the result I'm expecting (just replace with std::experimental::optional in the example and you will see that the instruction becomes <code>mov eax, eax</code>).</p>
  
  <p>Also if I try with a different template argument for the boost optional (a non integer type) some compilers compile (with the behavior I'm expecting, an example here <a href="http://cpp.sh/5j7n" rel="noreferrer">http://cpp.sh/5j7n</a>) and others don't. So even for the same lib the behavior is different according to the template arg.</p>
  
  <p>I'd like to understand what is going on here, I know it has something to do with the fact that I'm using a C++14 feature for a library that doesn't consider that into the design. I read the <code>boost/optional</code> header but I got lost in the details, I also tried to study the compiled code without inlining with a similar result.</p>
  
  <p>I'm using gcc 4.9.2 with -std=c++14 and boost 1.57.</p>
  
  <p>btw: I known I should have used <code>boost::optional::reset</code> or <code>boost::none</code>, but I was trying to be consistent with the semantics in the rest of the code base.</p>