I have appended a simple test that fills up and sorts a list and a vector of allocated ints, using either a raw or a smart pointer. Here are some results (best...
2050
Gavin Collings
gcollings@...
Feb 1, 2000 11:15 am
I re-ran your code on my machine (after moving the elapsed function out of the output statement to avoid timing writes to cout) with Dave's fast shared_ptr...
2051
John Maddock
John_Maddock@...
Feb 1, 2000 12:01 pm
Alexy, ... #if defined(__BORLANDC__) || ( defined(_MSC_VER) && !defined(__MWERKS__) )< Thanks, got it, I've updated the zip file in the vault. - John....
2052
Dave Abrahams
abrahams@...
Feb 1, 2000 2:03 pm
... I guess so, but the 2nd usage will need qualification. Koenig lookup can't help you there. I just had a kooky idea. We could get Koenig lookup to work even...
2053
Miki Jovanovic
miki@...
Feb 1, 2000 3:26 pm
... That would explain it :-). Nothing like a juicy misunderstanding. ... have SGI ... Hmm, I will examine the implementation of these allocators. I was ...
2054
Beman Dawes
beman@...
Feb 1, 2000 3:30 pm
In private email, Paul Baxter asked if there was any way to download the entire vault as a .zip file for offline browsing. I also have wanted to download all...
2055
Beman Dawes
beman@...
Feb 1, 2000 4:06 pm
Version 1.11.0 * Added Rational Number Library. * Minor fixes to cast.hpp, config.hpp, smart_ptr.hpp, utility.hpp, and to the min_rand sample programs. * Minor...
2056
Miki Jovanovic
miki@...
Feb 1, 2000 8:38 pm
... Hi Greg, I just wanted to point out that using smart pointers is not a convinience, it is much closer to necessity. If you even mention the word exception...
2057
Dave Steffen
steffend@...
Feb 1, 2000 9:10 pm
O Masters of C++, your humble apprentice begs audience... ;-) I've got a bit of code I'd like to contribute, if it's appropriate. It's a simple thing - nay,...
2058
Aleksey Gurtovoy
alexy@...
Feb 1, 2000 10:57 pm
... I was sure you will catch the error =). I wasn't very glad to realize that we need the qualification here, but after a few seconds I came to a some vague ...
2059
Doncho Angelov
DonAngel@...
Feb 2, 2000 1:08 pm
Hi! I've recently downloaded the boost 1_11_0 and I think there is a problem with bad_numeric_cast. <code> class bad_numeric_cast : public std::bad_cast { ...
2060
Dave Abrahams
abrahams@...
Feb 2, 2000 1:22 pm
... Why would we bother with the one taking a const ref to its first argument?...
2061
Kevlin Henney
Kevlin.Henney@...
Feb 2, 2000 2:11 pm
... [...] ... [...] ... at all. I think you're right! However, I'm not sure when that semi-colon crept in there, as the original certainly didn't have it, and...
2062
Valentin Bonnard
Bonnard.V@...
Feb 2, 2000 3:08 pm
... char* sure isn't convertible to myUDT<T>* ? I fail to see how your overload introduces a problem here. ... The worst problem is that there is culprit at...
2063
Beman Dawes
beman@...
Feb 2, 2000 7:28 pm
... problem ... compiled ... crept in ... I have ... It crept in when my fumble fingers added "throw()" (and then failed to rerun the test program). Thanks to...
2064
Greg Colvin
gcolvin@...
Feb 2, 2000 8:09 pm
For those who think that the challenge of C++ memory management means we should just use Java (this is with Sun's latest JIT) ... D:\greg92;Boost>java TestPtr...
2065
Miki Jovanovic
miki@...
Feb 2, 2000 8:37 pm
... vs. ... MSDN says: "clock() returns the number of clock ticks of elapsed processor time." vs. currentTimeMillis() returns the difference, measured in...
2066
Greg Colvin
gcolvin@...
Feb 2, 2000 8:51 pm
From: Miki Jovanovic <miki@...> ... No, I print the elapsed time in milliseconds: printf("fill vector: %ld\n", ((long)clock() -...
2067
Greg Colvin
gcolvin@...
Feb 2, 2000 9:10 pm
From: Greg Colvin <gcolvin@...> ... Never mind -- I see what you mean. I doubt it matters on my system, but I'll recode my C++ test to use real...
... Because if we sank it, we would lose a possibility to initialize point objects by converted values, e.g. ... I hate to write such a code and I think this...
2070
Dave Abrahams
abrahams@...
Feb 3, 2000 2:30 am
... You're right the const version. I wasn't thinking clearly. Do we also need the non-const version?...
2071
Aleksey Gurtovoy
alexy@...
Feb 3, 2000 2:52 am
... We can live without it, but in that case some operations seem to be ... temporary to p2 - Alexy...
2072
Aleksey Gurtovoy
alexy@...
Feb 3, 2000 10:22 am
I have in mind a small (pretty??) class, which seems to me to be a yet another candidate to our boost utility library. I've seen it to be reinvented at least 2...
2073
Dave Abrahams
abrahams@...
Feb 3, 2000 12:37 pm
... I once designed a more flexible variation on this called set_on_exit, which would assign a value into a reference upon destruction. This lets you restore...
2074
Dave Abrahams
abrahams@...
Feb 3, 2000 12:47 pm
... I find the idea of relying on "p2 << p1" to change p2 when p2 is non-const but still being able to use the same expression to produce a temporary when p2...
2075
Ed Brey
brey@...
Feb 3, 2000 4:19 pm
I'd like to suggest that we put the cstdint definitions into a nested namespace, so that this subset can be pulled into a given context all at once. The boost...
2076
Beman Dawes
beman@...
Feb 3, 2000 9:25 pm
... of the core ... classes ... this test ... normally has also a ... port. To ... original ... slightly to ... code of a ... but ... (e.g. using ... standard ...
2077
(no author) ...
Feb 3, 2000 9:42 pm
I think we're almost done! There's just one little change I'd like now. . . While reviewing the definition of a POD type, I noticed that not all POD types...
2078
Aleksey Gurtovoy
alexy@...
Feb 3, 2000 11:18 pm
... which ... It's true.. I've named it 'temporary_value' because I couldn't come to any better name ;). It was supposed to reflect the assignment of a new...