One of the requirements is that types must be comparable and in the case of non-type templates that means comparing values. E.g. jf you have a 'const char*' value then what does it mean for two of these values to be equal?
Rob.
Hi,Currently, non-type templates still have several limitations:- must be structural (no private members)- no allocations even if the type has a constexpr destructor- can't contain floating point (double or float)- can't hold strings of the "const char *" formand so on...
These limitations have a good reason behind them for templated class and function as they produce symbols in assembly and need to be resolved.
But as consteval functions never produce assembly/symbols and will never be resolved by another translation unit than their own these restrictions should be lifted.
What are your thoughts on this?Am I missing something?
Thanks in advance,Bastien Penavayre