As you explained, you cannot implement std :: optional this way because you change its semantics (is_trivially_default_constructible is part of the class interface).
However, if you need this semantics for some reason in your code, there is no reason why you could not implement a very similar optional class, which is by default constructive by default. Then, when used, just zero initializes it with {} and - if that is what you want - treat zero as true in the bool statement.
source share