stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Farid Zaripov <Farid_Zari...@epam.com>
Subject Re: [jira] Created: (STDCXX-1022) [MSVC x86 / optimized] ICE in std::__make_heap()
Date Tue, 18 Nov 2008 14:44:32 GMT
> This is close to what I had in mind when I saw the #ifdef but is it
> the same thing? IIUC, in the original version, the loop will execute
> at least once. In this version, it may not execute at all (i.e., if
> __parent is zero).

  In the original version __parent is 0 only for __dist in [ 1; 2; 3 ].

  In this version __parent is 1 (will become 0 before calling __adjust_heap() due to
predecrement) for __dist in [ 2; 3 ].

  But when __dist == 1 (the heap contain's the exactly one element) there's no
sence to call __adjust_heap().

Farid.

Mime
View raw message