Simplifing tuples

Giovanni Bajo giovannibajo@libero.it
Tue Oct 19 04:15:00 GMT 2004


Gabriel Dos Reis wrote:


>> template<typename T, int N>
>> void error()
>> {
>>   __builtin_static_assert(sizeof(T)>N, "type %qT too small", T);
>> }
>>
>> int main()
>> {
>>   error<int, 2>();
>
> That requires execution.


What do you mean? It is evaluated at compile time, and generates a compile-time
diagnostic. Otherwise my whole mail would be totally nonsense.

Giovanni Bajo




More information about the Libstdc++ mailing list