george.burgess.iv added inline comments.
================ Comment at: test/SemaCXX/diagnose_if.cpp:615 + // evaluator isn't able to evaluate `adl::Foo(1)` to a constexpr, though. + // I'm assuming this is because we assign it to a temporary. + for (void *p : adl::Foo(1)) {} ---------------- rsmith wrote: > The range-based for is desugared to > > ``` > auto &&__range = adl::Foo(1); > auto __begin = begin(__range); > auto __end = end(__range); > // ... > ``` > > so the argument in the call to `begin` is not considered constant. Good to know. Thanks! https://reviews.llvm.org/D28889 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits