sort_heap complexity guarantee

Paolo Carlini paolo.carlini@oracle.com
Wed Oct 22 23:53:00 GMT 2014


Hi,

On 10/22/2014 11:05 PM, François Dumont wrote:
> +  VERIFY( counter_type::less_compare_count <= 2.0 * std::log2(nb_values) );
Nit: log2 isn't in C89, thus we shouldn't use it unconditionally, ie, if 
the test isn't guarded by { dg-require-cmath "" }. Thus, either the 
latter, or just express log_2 in terms of log / log10.

Paolo.



More information about the Libstdc++ mailing list