Subject: Re: type_traits vs value-based reflection world
From: Andrew Sutton (asutton.list_at_[hidden])
Date: 2020-11-02 08:02:02
> Why is needed is_arithmetic in the "reflection world" ?
> Does std::is_arithmetic< typename(reflexpr(int)) >::value is the same as
> reflexpr(int)::is_arithmetic() ?
A constexpr-based model for type traits should reduce the number of class
template instantiations needed during compilation. Instantiating classes
can be costly (in terms of analyses performed and memory required for
specializations). Calling a non-template constexpr function is relatively
cheap by comparison.
Also, reflexpr doesn't return classes, so it would be
SG7 list run by email@example.com
Older Archives on Google Groups