In MSVC optional<T&>::value() emits a warning C4702: unreachable code because throw_exception is marked BOOST_RETURN.
Otherwise the ternary code might have been preferable.
This change addresses the warning while preserving the functionality. It replicates optional<T>::value() for consistency.
It caused too many problems. I left only specialiation for scalar types.
I will need to devise clever type traits for reconizing trivial types with working constructor.