[PATCH] D157240: [NFC][xray] Fix enable_if usage in XRay.h

Chris Cotter via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 6 12:18:39 PDT 2023


ccotter created this revision.
Herald added a subscriber: dberris.
Herald added a project: All.
ccotter requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The original usage of enable_if does not actually lookup
the nested type called `type`, so the SFINAE does not kick in.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D157240

Files:
  llvm/include/llvm/XRay/Graph.h


Index: llvm/include/llvm/XRay/Graph.h
===================================================================
--- llvm/include/llvm/XRay/Graph.h
+++ llvm/include/llvm/XRay/Graph.h
@@ -144,7 +144,7 @@
 
   public:
     template <bool IsConstDest,
-              typename = std::enable_if<IsConstDest && !IsConst>>
+              typename = std::enable_if_t<IsConstDest && !IsConst>>
     operator NeighborEdgeIteratorT<IsConstDest, IsOut, BaseIt,
                                    const EdgeValueType>() const {
       return NeighborEdgeIteratorT<IsConstDest, IsOut, BaseIt,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157240.547598.patch
Type: text/x-patch
Size: 573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230806/c157cbe8/attachment.bin>


More information about the llvm-commits mailing list