On 31 Aug 2008, at 21:57, Tim Moore wrote:
> I guess you're not using map::lower_bound because you want to
> support an
> arbitrary ordering different from the map? What will the lower bound
> result mean
> in that case?
Actually my logic is busted anyway, I was hoping to avoid a linear
se
James Turner wrote:
> On 31 Aug 2008, at 11:58, Stefan C. Müller wrote:
>
>> OK, here's the patch.
>> But we need a total of 3 overloaded operator(). Not realy nice to
>> look at.
>> Anyway, I'm happy with both variants.
>
> As you say, not ideal, but I'm still working on this code, so a little
Frederic Bouvier schrieb:
Stefan C. Müller a écrit :
* Replaced an rint() call with floor() (MSVC does not offer rint).
I am a bit worried that floor and rint are not the same. I don't know if
it matters in this context but how about using the code below instead ?
// round double to 1
Stefan C. Müller a écrit :
> * Replaced an rint() call with floor() (MSVC does not offer rint).
I am a bit worried that floor and rint are not the same. I don't know if
it matters in this context but how about using the code below instead ?
// round double to 10^g
double rnd(double r, int g = 0)
Frederic Bouvier a écrit :
> Stefan C. Müller a écrit :
>
>> * Replaced an rint() call with floor() (MSVC does not offer rint).
>>
>
> Are you sure you don't need
> #include
> ?
> because rint is already used in Main/Options.cxx
>
Forget that. I missed the #ifdef HAVE_RINT around it
-
Stefan C. Müller a écrit :
> * Replaced an rint() call with floor() (MSVC does not offer rint).
Are you sure you don't need
#include
?
because rint is already used in Main/Options.cxx
-Fred
--
Frédéric Bouvier
http://my.fotolia.com/frfoto/ Photo gallery
http://fgsd.sourceforge.net/Flight
On 31 Aug 2008, at 11:58, Stefan C. Müller wrote:
> OK, here's the patch.
> But we need a total of 3 overloaded operator(). Not realy nice to
> look at.
> Anyway, I'm happy with both variants.
As you say, not ideal, but I'm still working on this code, so a little
bit of uglyness, I can live
James Turner schrieb:
Adding the commutative operator is fine with me, seems like the
cleanest solution.
OK, here's the patch.
But we need a total of 3 overloaded operator(). Not realy nice to look at.
Anyway, I'm happy with both variants.
Stefan
Index: Airports/simple.cxx
Frederic Bouvier schrieb:
> As Stefan says, the ( debugging ) code expects the predicate is
> commutative. Maybe there is a symbol to disable debugging code to be
> generated,
Ah, yes there is one way, but I forgot to mention. It's prossible to
#define _HAS_INTERATOR_DEBUGGING 0 (default for rele
On 31 Aug 2008, at 08:30, Frederic Bouvier wrote:
> As Stefan says, the ( debugging ) code expects the predicate is
> commutative. Maybe there is a symbol to disable debugging code to be
> generated, or we could provide the class a second operator() :
>
>
> bool operator()(const std::string& aB,
James Turner a écrit :
> On 30 Aug 2008, at 23:16, Stefan C. Müller wrote:
>
>
>>> As far as I can tell, this is not true. The third parameter type is
>>> independant from the type of the container, and should only match
>>> the type of the second parameter of the predicate. The current code
On 30 Aug 2008, at 23:16, Stefan C. Müller wrote:
>> As far as I can tell, this is not true. The third parameter type is
>> independant from the type of the container, and should only match
>> the type of the second parameter of the predicate. The current code
>> compile under MSVC 7.1 and
Frederic Bouvier schrieb:
> Hi Stefan,
>
> - "Stefan C. Müller" a écrit :
>
>> Small patch fixing bugs I've encountered while getting the current CVS
>> to build in MSVC.
>> * std::lower_bound was used with the key-type of a map, but
>> lower_bound expects the value-type of the collection it
Hi Stefan,
- "Stefan C. Müller" a écrit :
> Small patch fixing bugs I've encountered while getting the current CVS
> to build in MSVC.
> * std::lower_bound was used with the key-type of a map, but
> lower_bound expects the value-type of the collection it works on, with is
> std::pair. MSVC see
Small patch fixing bugs I've encountered while getting the current CVS
to build in MSVC.
* std::lower_bound was used with the key-type of a map, but lower_bound
expects the value-type of the collection it works on, with is std::pair.
MSVC seems to be more strict about this.
* Added an missing i
15 matches
Mail list logo