Displaying 2 results from an estimated 2 matches for "nulcheck".
Did you mean:
nullcheck
2019 Apr 10
2
[RFC] Should we add isa_or_null<>?
Don Hinton via llvm-dev <llvm-dev at lists.llvm.org> writes:
> Used like this: isa<T,1>(v) or isa<T, true>(v)
I don't think I would know what that means when I see it in code.
-David
> On Sat, Apr 6, 2019 at 9:45 AM Mehdi AMINI via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> On Fri, Apr 5, 2019 at 5:15 AM Aaron Ballman via
2019 Apr 22
3
[RFC] Should we add isa_or_null<>?
...>(v) or isa<T, true>(v)
>>
>> I don't think I would know what that means when I see it in code.
>>
>
> Sorry, I was just trying to highlight a different way of doing it, and
> lazily used a bool. Here's something a little more realistic:
>
> struct NulCheck : std::true_type {};
>
> template <class X, class Check, class Y,
> typename std::enable_if<Check::value, X>::type * = nullptr>
> LLVM_NODISCARD inline bool isa(const Y *Val) {
> return Val && isa<X>(Val);
> }
>
> isa<foo,NulCheck>...