[PATCH] D38806: DepthFirstIterator.h: Use C++11 features to call a completed method onthe set type, instead of requiring that one exists.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 20 12:14:06 PDT 2017


dblaikie accepted this revision.
dblaikie added a comment.

In https://reviews.llvm.org/D38806#902356, @dberlin wrote:

> I'll add a unit test.
>
> FWIW, you can get rid of the overload hack, i just can't get it to work in all compilers.
>
> You can now nice create a class that has a ::value of true or false if the method exists,


Ah, yeah, I think I've written traits classes like that - but at least the ones I've done would take a lot more code (& eventually involve a similar overload set or the like) than this approach.

> but passing that as a template parameter doesn't work so well yet, and using constexpr functions to achieve the same goal doesn't quite work yet either.




https://reviews.llvm.org/D38806





More information about the llvm-commits mailing list