Sunday, June 11, 2017

Digest for comp.lang.c++@googlegroups.com - 8 updates in 4 topics

Gert-Jan de Vos <gert-jan.de.vos@onsneteindhoven.nl>: Jun 11 05:41AM -0700

Allocate a shared_ptr<bool> in Game and pass shared_ptr's to all Player objects involved in the Game.
Paavo Helde <myfirstname@osa.pri.ee>: Jun 11 09:02PM +0300

On 11.06.2017 0:14, JiiPee wrote:
> variable if its a pointer. If there any way to solve the problem that
> assignment cannot be done If I use your reference method? how can i copy
> Point's if it has that reference?
 
In the callback mechanisms you would have the same conceptual problem,
namely that the callback pointer may have become invalid meanwhile if
you are not careful.
 
As Gert-Jan suggested, every conceptual problem in computer programming
can be solved by extra redirection, so yes you can use std::shared_ptr
to either the bool variable or to the object holding the bool variable.
In the latter case I would actually suggest to hold std::weak_ptr
pointers instead, to reduce the possibility of creating cyclic data
structures (aka memory leaks).
JiiPee <no@notvalid.com>: Jun 11 09:32PM +0100

On 11/06/2017 19:02, Paavo Helde wrote:
> the bool variable. In the latter case I would actually suggest to hold
> std::weak_ptr pointers instead, to reduce the possibility of creating
> cyclic data structures (aka memory leaks).
 
 
ok thanks, I ll investiagate this.
JiiPee <no@notvalid.com>: Jun 11 09:32PM +0100

On 11/06/2017 13:41, Gert-Jan de Vos wrote:
> Allocate a shared_ptr<bool> in Game and pass shared_ptr's to all Player objects involved in the Game.
 
ok thanks, I ll investiagate this.
David Brown <david.brown@hesbynett.no>: Jun 11 10:01PM +0200

>> users,
 
> They are Intel employees. One of them works on supporting the
> Intel C++ compiler.
 
That does not matter in the slightest.
 
If you wanted to buy an apple, and you happened to meet an employee of
your local supermarket while walking in a fruit orchard, would you
expect him to sell you an apple there?
 
If you want support for some software, contact the support department
for that software through the appropriate channels. Don't try to make
personal direct contacts with people who happen to work at that support
site.
 
Chris Ahlstrom <OFeem1987@teleworm.us>: Jun 11 09:42AM -0400

Melzzzzz wrote this copyrighted missive and expects royalties:
 
 
>> Apparently the support for the C++ multi-threading classes is not yet
>> mature.
 
> Try newer compiler.
 
gcc/g++ are up to version 6.3 (at least) now.
 
Maybe Fred doesn't want to pay the license fee to upgrade :-).
 
--
The lunatic, the lover, and the poet,
Are of imagination all compact...
-- Wm. Shakespeare, "A Midsummer Night's Dream"
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jun 11 05:43AM +0100

On 10/06/2017 22:29, Alf P. Steinbach wrote:
> ungood behavior of the standard library fixed, that's true. So maybe
> `bugfixed_stdlib` would be better, but that's quite verbose! :-o
 
Based on that the hubris I mentioned seems to be real.
 
/Flibble
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Jun 11 09:02AM +0200

On 11-Jun-17 6:43 AM, Mr Flibble wrote:
>> ungood behavior of the standard library fixed, that's true. So maybe
>> `bugfixed_stdlib` would be better, but that's quite verbose! :-o
 
> Based on that the hubris I mentioned seems to be real.
 
This seems to be an uninformed person's opinion that the standard
library is perfect, that the workarounds and fixes are not needed.
 
Oh well.
 
 
Cheers!,
 
- Alf
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: