Aren't you assuming that a wife isn't a POD? ;) :DQuote:
Originally Posted by RoboTact
Printable View
Aren't you assuming that a wife isn't a POD? ;) :DQuote:
Originally Posted by RoboTact
Sure, there's whole bunch of links to stuff, several bags at the least, with complex shared ownership issues. It's a vain try not to lose any resources.Quote:
Originally Posted by Siddhartha
Secondly, are you sure that you want to do away with random access? :D ;)Quote:
Originally Posted by RoboTact
One can use vector of pointers. Much safer, and you can use garbage collector to dispose of ones you removed pointers to instead of utilizing that unfair COM principle "deal with acquired problems yourself". :evil grin:Quote:
Originally Posted by Siddhartha
Well... A vector of pointers may result in more people using an object that the (original) owner trusts... :D ;)Quote:
Originally Posted by RoboTact
Does anyone want a "wife" object that also implements thread-synchronization to service multiple clients? :eek: :D
Not if you mastered encapsulation.Quote:
Originally Posted by Siddhartha
Trusting one's encapsulation, and leaving a precious resource in the open makes for what I'd call a security flaw... :D ;)
The good thing is that you've managed to get off list and on to vector... And the rest is detail. ;)
Besides all this - one needs to post at least one photo in this thread to gain rights in discusing off-topic issues... ;)
I mean has-a relation without exposing unnecessary detailes does it.Quote:
Originally Posted by Siddhartha
Its simpler to hold by value... And if one plans to hold so many that performance lost to resizing matters - use std::vector::reserve.Quote:
Originally Posted by RoboTact
However, I personally think that there ought to be no collection... The place holder for a wife is at best a singleton class. :D
yes, next wife 10,20,30 like clerics..:) ;)Quote:
Originally Posted by SiddHartha
You aren't a cleric - are you?Quote:
Originally Posted by Melvik12
Besides, clerics are allowed only 5... Right?
no limit,I'm not a cleric ,I'm against them intensively ;)Quote:
Besides, clerics are allowed only 5... Right?
And... If one is not a cleric - how many wives is one allowed to keep?
A std::vector<ClericWife>. But the container must be private.Quote:
Originally Posted by Siddhartha
dpends on money and such things.....