PiotrZSL wrote: @5chmidti I did some testing with this. And in example that you provided there is no issue. This is because if optional will be uninitialized, then this code won't compile regardless if .value() or operator * is used. Compiler will simply complain that expression is not constexpr.
When used normally, you will get undefined behavior or exception. https://github.com/llvm/llvm-project/pull/90410 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits