dblaikie added a comment. This usage doesn't seem to quite match the standard - which provides an existing instance of in_place_t for callers to use:
std::optional<std::string> o4(std::in_place, {'a', 'b', 'c'}); (to quote https://en.cppreference.com/w/cpp/utility/optional/optional ) Probably good to match this sort of behavior. ================ Comment at: llvm/unittests/ADT/OptionalTest.cpp:227 + const MultiArgConstructor &RHS) { + return LHS.x == RHS.x && LHS.y == RHS.y; + } ---------------- Could write this as: `return std::tie(LHS.x, LHS.y) == std::tie(RHS.x, RHS.y);` which I think is a bit tidier/easier to generalize to other comparisons, etc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100671/new/ https://reviews.llvm.org/D100671 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits