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...
Greg Colvin
gcolvin@...
Feb 1, 2000 10:52 am
2050
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...
Gavin Collings
gcollings@...
Feb 1, 2000 11:15 am
2051
Alexy, ... #if defined(__BORLANDC__) || ( defined(_MSC_VER) && !defined(__MWERKS__) )< Thanks, got it, I've updated the zip file in the vault. - John....
John Maddock
John_Maddock@...
Feb 1, 2000 12:01 pm
2052
... 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...
Dave Abrahams
abrahams@...
Feb 1, 2000 2:03 pm
2053
... That would explain it :-). Nothing like a juicy misunderstanding. ... have SGI ... Hmm, I will examine the implementation of these allocators. I was ...
Miki Jovanovic
miki@...
Feb 1, 2000 3:26 pm
2054
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...
Beman Dawes
beman@...
Feb 1, 2000 3:30 pm
2055
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...
Beman Dawes
beman@...
Feb 1, 2000 4:06 pm
2056
... 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...
Miki Jovanovic
miki@...
Feb 1, 2000 8:38 pm
2057
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,...
Dave Steffen
steffend@...
Feb 1, 2000 9:10 pm
2058
... 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 ...
Aleksey Gurtovoy
alexy@...
Feb 1, 2000 10:57 pm
2059
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 { ...
Doncho Angelov
DonAngel@...
Feb 2, 2000 1:08 pm
2060
... Why would we bother with the one taking a const ref to its first argument?...
Dave Abrahams
abrahams@...
Feb 2, 2000 1:22 pm
2061
... [...] ... [...] ... 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...
Kevlin Henney
Kevlin.Henney@...
Feb 2, 2000 2:11 pm
2062
... 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...
Valentin Bonnard
Bonnard.V@...
Feb 2, 2000 3:08 pm
2063
... 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...
Beman Dawes
beman@...
Feb 2, 2000 7:28 pm
2064
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:\greg\Boost>java TestPtr...
Greg Colvin
gcolvin@...
Feb 2, 2000 8:09 pm
2065
... vs. ... MSDN says: "clock() returns the number of clock ticks of elapsed processor time." vs. currentTimeMillis() returns the difference, measured in...
Miki Jovanovic
miki@...
Feb 2, 2000 8:37 pm
2066
From: Miki Jovanovic <miki@...> ... No, I print the elapsed time in milliseconds: printf("fill vector: %ld\n", ((long)clock() -...
Greg Colvin
gcolvin@...
Feb 2, 2000 8:51 pm
2067
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...
Aleksey Gurtovoy
alexy@...
Feb 3, 2000 12:23 am
2070
... You're right the const version. I wasn't thinking clearly. Do we also need the non-const version?...
Dave Abrahams
abrahams@...
Feb 3, 2000 2:30 am
2071
... We can live without it, but in that case some operations seem to be ... temporary to p2 - Alexy...
Aleksey Gurtovoy
alexy@...
Feb 3, 2000 2:52 am
2072
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...
Aleksey Gurtovoy
alexy@...
Feb 3, 2000 10:22 am
2073
... 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...
Dave Abrahams
abrahams@...
Feb 3, 2000 12:37 pm
2074
... 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...
Dave Abrahams
abrahams@...
Feb 3, 2000 12:47 pm
2075
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...
Ed Brey
brey@...
Feb 3, 2000 4:19 pm
2076
... of the core ... classes ... this test ... normally has also a ... port. To ... original ... slightly to ... code of a ... but ... (e.g. using ... standard ...
Beman Dawes
beman@...
Feb 3, 2000 9:25 pm
2077
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...
(no author) ...
Feb 3, 2000 9:42 pm
2078
... 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...