Thanks, and yes, I am using MSVC (6)
Your answer makes sense, and it works fine!
That problem is a fairly irritating however
I'm suprised the bug fell through to MSVC7
-Original Message-
From: Craig Henderson [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 07, 2003 12:32 AM
To: [EMAIL P
At TCS3, I met Leor Zolman, the author of STLFilt, the C++ error message
"decryptor." He asked what it would take for me to start using STLFilt, and
I told him I didn't care about most of what he was doing -- compressing STL
iterator types down to sensible typedefs, and removing information that m
I need a pointer that can store pointer or an ID. I thought maybe
I could make a policy set for smart_ptr, but that turns out to be
too tricky. I don't think this kind of thing is appropriate for a
smart pointer because of the interface, but I just wanted to get
some opinions on the technique, an
"Philippe A. Bouchard" <[EMAIL PROTECTED]> wrote in message
b1v0v8$k1s$[EMAIL PROTECTED]">news:b1v0v8$k1s$[EMAIL PROTECTED]...
> First, thanks!
No problem, but it was just to help you get started. You obviously
know more about shifted_ptr than I do, so use your own experience
here. ;)
> [...]
>
On Thu, 2003-02-06 at 18:52, Trey Jackson wrote:
> Hamish Mackenzie wrote:
> >These scoped locks will go out of scope before you "do stuff".
>
> Right, thanks for the catch.
>
> I started writing it thinking I'd be doing some cool new
> meta-programming, but it turned into just simple object inh
First, thanks!
David B. Held wrote:
> "Philippe A. Bouchard" <[EMAIL PROTECTED]> wrote in message
> b1tvp7$da3$[EMAIL PROTECTED]">news:b1tvp7$da3$[EMAIL PROTECTED]...
[...]
> Here's the "raw pointer c'tor":
>
> template
> smart_ptr(U const& p)
> : base_type(p, detail::in
From: "David B. Held" <[EMAIL PROTECTED]>
> "Dave Abrahams" <[EMAIL PROTECTED]> wrote in message
> 001201c2ce26$533cae40$6501a8c0@penguin">news:001201c2ce26$533cae40$6501a8c0@penguin...
> > [...]
> > It's clear to me why that could happen. It could be just a simple-
> > minded rule to avoid viola
"Dave Abrahams" <[EMAIL PROTECTED]> wrote in message
001201c2ce26$533cae40$6501a8c0@penguin">news:001201c2ce26$533cae40$6501a8c0@penguin...
> [...]
> It's clear to me why that could happen. It could be just a simple-
> minded rule to avoid violating the standard requirements, which
> are written s
Aleksey,
The attached code works like a dream on MSVC 7.1, but MSVC 7.0 again has its
problems:
Problem No. 1: Expression 1 does not seem to work, because Derived is an
incomplete type:
To reproduce, you might want to comment-out expression 3 and uncomment
expression 4.
Problem No. 2: mpl::fold
Greg,
>From the Linker Error, it looks like you're using Microsoft Visual C++. I
discovered a bug recently with MSVC7.0 which may be the same as you're
seeing here, but it is reported to be fixed in Everett.
The bug occurs if you pass a template function as a parameter to another
template function
Dave Abrahams wrote:
[...]
> > 2) You're still hiding the thread creation.
>
> Absolutely. High-level vs. low-level.
Yeah ...
>
> > This is a mistake to me for
> > two reasons. First, it's not as obvious that a thread is being created
> > here (though the new names help a lot).
>
> Unimport
"Trey Jackson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> [...]
> I was unable to get that to compile.
> Linux gcc 3.2.1, or HP aCC: HP ANSI C++ B3910B X.03.32
>
> The linux error gave me a syntax error before the '{' token on the lines
> declaring 'insertCo
From: "David B. Held" <[EMAIL PROTECTED]>
> "Dave Abrahams" <[EMAIL PROTECTED]> wrote in message
> 008c01c2ce1f$87ca8620$6501a8c0@penguin">news:008c01c2ce1f$87ca8620$6501a8c0@penguin...
> > [...]
> > What do you mean that its *place* in the hierarchy affects the size? If
> > it's in the hierarchy,
"Dave Abrahams" <[EMAIL PROTECTED]> wrote in message
008c01c2ce1f$87ca8620$6501a8c0@penguin">news:008c01c2ce1f$87ca8620$6501a8c0@penguin...
> On Thursday, February 06, 2003 3:13 PM [GMT+1=CET],
> David B. Held <[EMAIL PROTECTED]> wrote:
>
> > "David B. Held" <[EMAIL PROTECTED]> wrote in message
> >
"Dave Abrahams" <[EMAIL PROTECTED]> wrote in message
008c01c2ce1f$87ca8620$6501a8c0@penguin">news:008c01c2ce1f$87ca8620$6501a8c0@penguin...
> [...]
> What do you mean that its *place* in the hierarchy affects the size? If
> it's in the hierarchy, it's a base.
But if it's not in the smart_ptr hiera
>I don't think you need that document. Whatever could be:
>
>typedef void fn(); static fn
>
>In other words, make them static functions. userClass::function just needs
>to add a couple of parens after "insertCode" ;-)
I was unable to get that to compile.
Linux gcc 3.2.1, or HP aCC: HP
On Thursday, February 06, 2003 3:13 PM [GMT+1=CET],
David B. Held <[EMAIL PROTECTED]> wrote:
> "David B. Held" <[EMAIL PROTECTED]> wrote in message
> b1m57m$702$[EMAIL PROTECTED]">news:b1m57m$702$[EMAIL PROTECTED]...
> > > > [...]
> > > > I mean, the optimally_inherit eliminates the empty bases, a
> > > async_result later = spawn(foo)(a, b, c);
> >
> > Mustn't use the name spawn() here. It implies a thread/process/what ever
> > has been spawned at this point, which is not the case. Or has it (he says
> > later, having read on)?
>
> It has.
It must, because a/b/c might be temporaries.
Dave Abrahams said:
> On Thursday, February 06, 2003 12:33 PM [GMT+1=CET],
> William E. Kempf <[EMAIL PROTECTED]> wrote:
>
>> Dave Abrahams said:
>>
>> > > Hmm... that would be
>> > > an interesting alternative implementation. I'm not sure it's as
>> "obvious" as the syntax I suggested
>> >
>> >
"David B. Held" <[EMAIL PROTECTED]> wrote in message
b1m57m$702$[EMAIL PROTECTED]">news:b1m57m$702$[EMAIL PROTECTED]...
> > > [...]
> > > I mean, the optimally_inherit eliminates the empty bases, and
> > > yet there is size bloat. So VC++ makes the class bigger for
> > > some other reason than tha
On Thursday, February 06, 2003 2:43 PM [GMT+1=CET],
Gennaro Prota <[EMAIL PROTECTED]> wrote:
> On Thu, 6 Feb 2003 12:20:59 -0500 (EST), Ronald Garcia
> <[EMAIL PROTECTED]> wrote:
>
>
> > It looks like the intel compiler still supports long long when used with
> > the -ansi option.
>
> Do you mean
On Thursday, February 06, 2003 12:33 PM [GMT+1=CET],
William E. Kempf <[EMAIL PROTECTED]> wrote:
> Dave Abrahams said:
>
> > > Hmm... that would be
> > > an interesting alternative implementation. I'm not sure it's as
> > > "obvious" as the syntax I suggested
> >
> > Sorry, IMO there's nothing "o
On Thu, 6 Feb 2003 12:20:59 -0500 (EST), Ronald Garcia
<[EMAIL PROTECTED]> wrote:
>It looks like the intel compiler still supports long long when used with
>the -ansi option.
Do you mean /Za?
Genny.
___
Unsubscribe & other changes: http://lists.boo
"Philippe A. Bouchard" <[EMAIL PROTECTED]> wrote in message
b1tvp7$da3$[EMAIL PROTECTED]">news:b1tvp7$da3$[EMAIL PROTECTED]...
> [...]
> $100 Question:
> When I am looking at the "Storage Policy", p. 189, Modern C++ Design;
> the class must be initialized by a StoredType object while in my situatio
On Thu, 06 Feb 2003 18:54:16 +0100, Gennaro Prota
<[EMAIL PROTECTED]> wrote:
>and defined, the former to either
>
>BOOST_STATIC_CONSTANT(type, alias = expr) or nothing, and the latter
>to name or expr, according to the compiler.
To expr or alias.
Genny.
From: "Trey Jackson" <[EMAIL PROTECTED]>
> Hamish Mackenzie wrote:
> >These scoped locks will go out of scope before you "do stuff".
>
> Right, thanks for the catch.
>
> I started writing it thinking I'd be doing some cool new
> meta-programming, but it turned into just simple object inheritance
Peter Dimov wrote:
>Have you tried? ;-)
Nope, I'm afraid I'd mess it up - as in the point below.
>Nope. You still need the counter mutex penalty. See example 2, that modifies
>two different shared_ptr instances, with well defined results. Those two
>instances can well share a count.
Ahhh...,
Pavel Vasiliev wrote:
[...]
> I really think that having the only mutex for all short smart
> pointer-related interlocked operations will not harm performance of
> real-life applications in mp systems. In my code this mutex is used
> only for really short operations like "lock, increment, save to
Hamish Mackenzie wrote:
>These scoped locks will go out of scope before you "do stuff".
Right, thanks for the catch.
I started writing it thinking I'd be doing some cool new
meta-programming, but it turned into just simple object inheritance
(thus the function calls that let the locks go out of
From: "Gennadiy Rozental" <[EMAIL PROTECTED]>
> > Plain black on white please. Sorry to be so boring.
>
> Use btl-simple.css style instead of btl.css. Both are located in style
> subdirectory. You will need to change the header of doc files for that
It's hard to understand why you're still using
> I would like to suggest the addition of the test tool
> BOOST_CHECK_NO_THROW to the boost test library. It's purpose should be
> obvious from the name and I think it would be quite handy when testing
> construction of objects.
>
> Markus
Why would you need that? It's already checked automaticall
On Thu, 6 Feb 2003 06:05:23 -0600, Aleksey Gurtovoy
<[EMAIL PROTECTED]> wrote:
>Fernando Cacciola wrote:
>> I was suspicious of next/prior in integral_c<> from the beggining...
>> That's why I asked what was the intended role of integral_c<>,
>> and why does it feature next/prior.
>
>It has 'next'
> > > 1 Need to have language extensions enabled. (for WINNT?)
> >
> > Do I use any nonstandard language extensions?
>
> No, but code that gets pulled in (WINNT?)does, so the MS project
Properties
> requires /Za. This is a minor disadvantage if you like to be 'strict'.
Could you be more specific
From: "Ronald Garcia" <[EMAIL PROTECTED]>
> On Wed, 5 Feb 2003, Dave Abrahams wrote:
>
> > On Wednesday, February 05, 2003 7:26 PM [GMT+1=CET],
> > Ronald Garcia <[EMAIL PROTECTED]> wrote:
> >
> > > On Wed, 5 Feb 2003, Dave Abrahams wrote:
> > >
> > > > On Wednesday, February 05, 2003 5:58 PM [GM
> >test->add(BOOST_TEST_CASE(::boost::bind(&fn, 1)));
>
> I just tried this and MSVC7 tells me:
>
> test_charset.cpp(50) : error C2664:
> 'boost::unit_test_framework::test_case
> *boost::unit_test_framework::create_test_case(void (__cdecl
> *)(void),std::string)' : cannot convert parameter 1 fr
Dave Abrahams said:
>> Hmm... that would be
>> an interesting alternative implementation. I'm not sure it's as
>> "obvious" as the syntax I suggested
>
> Sorry, IMO there's nothing "obvious" about your syntax. It looks
> cumbersome and low-level to me. Let me suggest some other syntaxes for
>
On Wed, 5 Feb 2003, Dave Abrahams wrote:
> On Wednesday, February 05, 2003 7:26 PM [GMT+1=CET],
> Ronald Garcia <[EMAIL PROTECTED]> wrote:
>
> > On Wed, 5 Feb 2003, Dave Abrahams wrote:
> >
> > > On Wednesday, February 05, 2003 5:58 PM [GMT+1=CET],
> > > Ronald Garcia <[EMAIL PROTECTED]> wrote:
> >> async_result res;
> >> thread t(bind(res.call(), a, b, c));
> >> // do something else
> >> d = res.value(); // Explicitly waits for the thread to return a
> >> value?
> >
> > This does the same, indeed. Starting a thread this way is just a little
> > more complex (and -- in my view -- less o
I would like to suggest the addition of the test tool
BOOST_CHECK_NO_THROW to the boost test library. It's purpose should be
obvious from the name and I think it would be quite handy when testing
construction of objects.
Markus
___
Unsubscribe & oth
On Wed, 05 Feb 2003 14:37:34 +0100, Daniel Frey
<[EMAIL PROTECTED]> wrote:
>Maybe it's just me but the boost source is feeling more
>and more unmaintainable given the extrem use of MACROs to workaround
>each and every problem some compilers have. Am I the only one who feels
>uncomfortable with it?
Aleksey,
> Yep, I understand that; but I was specifically interested whether
> _incomplete types_ are an important case here. If it's more than
> just a corner-case situation, I'll look into fixing it.
[snip]
> But 'is_sequence' does work on MSVC 7.0, in general. So, unless
> passing an incomplete
From: "William E. Kempf" <[EMAIL PROTECTED]>
> > From: "Wolfgang Bangerth" <[EMAIL PROTECTED]>
> >> This does the same, indeed. Starting a thread this way is just a
> >> little more complex (and -- in my view -- less obvious to read) than
> >> writing
> >> thread t = spawn(foo)(a,b,c);
> >>
> >>
Jason House wrote:
> Terje Slettebø wrote:
>
> > Another possibility might be to have a sentry object, doing automatic state
> > saving and restoring in the constructor and destructor. In fact, there are
> > already such classes in Boost: Daryle Walker's I/O state savers, which fits
> > this sit
> From: "Wolfgang Bangerth" <[EMAIL PROTECTED]>
>> This does the same, indeed. Starting a thread this way is just a
>> little more complex (and -- in my view -- less obvious to read) than
>> writing
>> thread t = spawn(foo)(a,b,c);
>>
>> But that's just personal opinion, and I'm arguably biased
From: "Wolfgang Bangerth" <[EMAIL PROTECTED]>
> > > double d;
> > > thread t = spawn(foo)(a,b,c);
> > > // do something else
> > > d = thread.return_value();
> >
> > A solution like this has been proposed before, but I don't like it.
This
> > creates multiple thread types, instead
Hi,
I have a question about smart pointer policies. I feel this is some
missing link in shifted_ptr.
Definitions:
1)
struct shifted_header
{
union
{
int m_count;
void * m_owner;
};
...
};
2)
template
struct shifted_object
{
shifted_header m_
>
>> > double d;
>> > thread t = spawn(foo)(a,b,c);
>> > // do something else
>> > d = thread.return_value();
>>
>> A solution like this has been proposed before, but I don't like it.
>> This creates multiple thread types, instead of a single thread type.
>> I think this will only
On Wednesday, February 05, 2003 4:05 PM [GMT+1=CET],
William E. Kempf <[EMAIL PROTECTED]> wrote:
> > On Wednesday, February 05, 2003 3:04 PM [GMT+1=CET],
> > William E. Kempf <[EMAIL PROTECTED]> wrote:
> >
> > > > What I would like to see is a new boost::thread implementation
> > > which meets t
John Maddock wrote:
> > I'm reposting this, because I think, that this bug should be fixed,
> > but there wasn't any response to the first mail. I would
> try to fix it
> > myself, but the errors are so weird, that I'm not able to
> grasp, how
> > to do it :-)
>
> Sorry I missed the first one: the
Andrei Alexandrescu wrote:
>> (in short: "Parameterization discourages users", "Template parameters
>> affect the type", "Having a single pointer type is important for
>> stable library interfaces". Sorry for possible out-of-context citation)
> Your agreement with the statements above would natur
An absolutely invaluable tool.
> >
> > Perhaps worth documenting for MSVC 7.0 (and probably 6.5?)
> >
> > 1 Need to have language extensions enabled. (for WINNT?)
>
> Do I use any nonstandard language extensions?
No, but code that gets pulled in (WINNT?)does, so the MS project Properties
requires
Hi all,
Could someone please tell me how to achieve a functor binding to a templated
function?
I have a namespace GenAlg with this inside:
namespace GenAlg
{
template
unsigned long RouletteWheel(TControl
Alexander Terekhov wrote:
>>
>> "Pavel Vasiliev" <[EMAIL PROTECTED]> wrote in message
>> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> > [...]
>> > In my implementation of refc_ptr operator= performs
>> > incrementing/decrementing within a single guarded section (since
>> > the only global insta
Terje Slettebø wrote:
> >From: "Jason House" <[EMAIL PROTECTED]>
> > I thought of one thing that might work reasonably well.
> >
> > How about making ++io_format< T > save the current format in a stack.
> > and having io_format< T>-- restore the previously queuued format
>
> I've thought of the
On Wed, 2003-02-05 at 18:09, Trey Jackson wrote:
> template
> class mySuperLockedClass : public LockingStrategy
> {
> public:
> void read()
> {
> LockingStrategy::readlock();
> // do stuff
> }
> void write()
> {
> LockingStrategy::writelock();
> // do stuff
> }
> };
>
Peter Dimov wrote:
>
> intrusive_ptr will be "official" (read: I finally wrote something resembling
> a documentation) in the upcoming 1.30. But that's not my point. My point is
> that you need an intrusive smart pointer. Of course shared_ptr cannot offer
I know I needed an intrusive smart pointe
On Thursday, February 06, 2003 8:10 AM [GMT+1=CET],
David Bradley <[EMAIL PROTECTED]> wrote:
> I wonder if there may have been issues or holes in the policy based
> pointer implementation that I worked on years ago that we didn't
> encounter or think about at the time. I'm trying to figure out wh
John Maddock wrote:
>
> Seems I don't understand the current version in detail. Isn't the
> fall-back version basically:
>
> is_class =
>!is_union &&
>!is_array &&
>!is_reference &&
>!is_void &&
>!is_function
>
> No, you missed out is_pointer and is_member_pointer and maybe o
Daniel Frey wrote:
> Peter Dimov wrote:
>>
>> Daniel Frey wrote:
>>>
>>> I aim for a smart pointer which is 4 bytes and adds another 4 bytes
>>> to the intrusivly counted object - no more. AFAICS boost cannot
>>> offer this with the current design.
>>
>> If I understand correctly, you are saying th
Dave Abrahams wrote:
Not so for Boost 1.29.0: you didn't have to pay for a separate count object.
In the current CVS, you do.
However, using BOOST_SP_USE_QUICK_ALLOCATOR, having a separate count object
doesn't have to incur any "extra" storage per object. If the mozilla
designers want less stor
On Thursday, February 06, 2003 6:57 AM [GMT+1=CET],
Toon Knapen <[EMAIL PROTECTED]> wrote:
> Recently had a talk with a patent-laywer from Philips. I deduced following
> from this conversation (my own interpretation and IANAL)
>
> Copyright is automatic. From the moment you make something, you own
> I'm reposting this, because I think, that this bug should be fixed, but
> there wasn't any response to the first mail. I would try to fix it
> myself, but the errors are so weird, that I'm not able to grasp, how to
> do it :-)
Sorry I missed the first one: the problem is simple: the header you a
Seems I don't understand the current version in detail. Isn't the
fall-back version basically:
is_class =
!is_union &&
!is_array &&
!is_reference &&
!is_void &&
!is_function
No, you missed out is_pointer and is_member_pointer and maybe other from the
list.
John Maddock
http://ourw
I'm forced to halt my weekly updates of the Aix status pages for a while.
Both machines we have are at the end of their lease and we're still
discussing with IBM on the terms of a new machine.
I hope the situation will be resolved quickly. Sorry for the inconvenience.
still-commited-to-update-the
Peter Dimov wrote:
>
> Daniel Frey wrote:
> >
> > I aim for a smart pointer which is 4 bytes and adds another 4 bytes
> > to the intrusivly counted object - no more. AFAICS boost cannot offer
> > this with the current design.
>
> If I understand correctly, you are saying that you want something c
Trey Jackson wrote:
> Peter Dimov wrote:
> >The overhead is usually acceptable, even with a plain pthread_mutex.
>
> Agreed. With that in mind, why wasn't the shared_ptr *also* protected
> by a mutex?
Because that would be two mutexes instead of one, which directly translates
to twice as much ti
Daniel Frey wrote:
>
> I aim for a smart pointer which is 4 bytes and adds another 4 bytes
> to the intrusivly counted object - no more. AFAICS boost cannot offer
> this with the current design.
If I understand correctly, you are saying that you want something close to
boost::intrusive_ptr, but bo
Fernando Cacciola wrote:
> I was suspicious of next/prior in integral_c<> from the beggining...
> That's why I asked what was the intended role of integral_c<>,
> and why does it feature next/prior.
It has 'next'/'prior' members because it's the easiest/most efficient
way to implement 'next/prior
Hubert Holin wrote:
I am stumbling on another problem, though.
Given
boost::unit_test_framework::test_suite * test = BOOST_TEST_SUITE("");
if I have the following normal function
void fn(int)
{
}
then I can do the following
test->add(BOOST_TEST_CASE(::boost::bind(&fn,
On Wednesday 05 February 2003 23:26, Matthias Troyer wrote:
> On Wednesday, February 5, 2003, at 04:52 PM, Toon Knapen wrote:
> > On Wednesday 05 February 2003 10:27, Matthias Troyer wrote:
> >> After we get the regrssion tests to work, there will be a special
> >> challenge for ublas or MTL-3: Cal
Recently had a talk with a patent-laywer from Philips. I deduced following from this
conversation
(my own interpretation and IANAL)
Copyright is automatic. From the moment you make something, you own the copyright (so
actually no explicit copyright statement is necessary although it is advised).
Andreas Huber wrote:
> > It might be possible to fix it, but it will require some work. Let
> > me know if it's important for you, and I'll move it up in my TODO
> > list.
>
> Well, it is not that important since mpl::is_sequence<> is only used
> to provide some syntactic sugar.
Yep, I understa
On Thu, 06 Feb 2003 03:20:14 +0100, Dave Abrahams wrote:
> On Wednesday, February 05, 2003 3:53 PM [GMT+1=CET], Daniel Frey
> <[EMAIL PROTECTED]> wrote:
>
>> > Which compiler? How were you using intrusive counting?
>>
>> I used some benchmark code which compared several smart-pointers (my
>> own
73 matches
Mail list logo