llvm-project
07e30043 - [Support] Modernize YAML traits with is_detected (NFC) (#156598)

Commit
5 days ago
[Support] Modernize YAML traits with is_detected (NFC) (#156598) This patch modernizes has_* YAML traits with is_detected. The resulting code should be a lot more readable because all the SFINAE logic is hidden behind is_detected. One note about has_FlowTraits. The original code uses a complex trick to detect a member variable named "flow", intentionally triggering ambiguity with "flow" in the two base classes. I've simplified the check down to: template <class U> using check = decltype(&U::flow); without using SameType. The use of SameType here would make the trait unnecessarily complicated. While I am at it, this patch switches to "static constexpr bool".
Parents
Loading