« first day (453 days earlier)      last day (4478 days later) » 

6:00 PM
You don't f*ck the placement-new conspiracy, the placement-conspiracy f*cks you (or not)
 
user784668
@Grizzly That's what happens in Soviet Russia.
 
@Grizzly How can a conspiracy f*ck me?
 
user784668
@IntermediateHacker look behind you. Oh, and STFU.
 
@IntermediateHacker: Are you sure you really want to know?
 
@Grizzly yeah.
ok. for the 2nd time... I give up.
 
6:03 PM
@IntermediateHacker: Well tough luck
@RMartinhoFernandes: Since we were so sloppy you bookmarked the conspiracy to make it even easier to find?
 
@TonyTheLion k, I'm here, and I have NO idea what you guys are talking about
winkwink
@IntermediateHacker placement new is a expression that creates an object in a buffer that you specify, instead of allocating memory and creating there.
Right as he leaves the room.
 
6:22 PM
An array member of a struct is NULL initialized. I believe read some where in standard. Could someone give reference to it ?
 
user784668
@Mahesh Nobody could, cuz it's not there.
 
user784668
First and foremost, what "NULL initialization" is?
 
user784668
The standard doesn't use this term anywhere.
 
I mean Zero initialized.
 
user784668
So what do you mean?
 
user784668
6:25 PM
Okay. That makes sense.
 
no, it isn't
 
int a[10]; std::fill(a, a+10, '\0');
 
zero initialization is globals only
 
@DeadMG Yep. Just verified.
Globals are.
 
user784668
But no member is zero-initialized.
 
user784668
6:26 PM
Unless you explicitly initialize it with a zero, of course.
 
user784668
But then it's not a zero-initialization, strictly speaking.
 
You could make a wrapper that forces value initialization.
 
Xeo
Member arrays are initialized the same way the struct itself is initialized if it's an aggregate struct.
 
I had a look at this stackoverflow.com/questions/456042/… and decided to try the first answer. It seems to work the first time and then from the fourth consecutive call. So 1 ok, 2 and 3 empty results, 4 an on ok.
ASIO
 
Xeo
If the struct has a default ctor, it depends on how you initialize the array inside of it
 
6:30 PM
Could this be related to the serial device I am communicating with? Or could it be something in asio?
I have tried this with 500ms in between a write and a async read.
 
user784668
I gotta go now, see you guys.
 
What this placement new conspiracy thing?
 
Bye
 
@MooingDuck conspiracies on placement new
seems like everyone is intrigued
 
I'm intrigued.
 
6:35 PM
@TonyTheLion why? There's no conspiracy.
 
Xeo
10
Q: Can I get a fresh start in C++ without failing again?

Kerrek SBSometimes it's nice to start over. In C++ I can employ this following simple manoeuvre: { T x(31, Blue, false); x.~T(); // enough with the old x ::new (&x) T(22, Brown, true); // in with the new! // ... } At the end of the scope, the destructor wi...

 
@MooingDuck per the tag line there is
 
@TonyTheLion SHHH
 
@EtiennedeMartel It's about replacing your ex-girlfriend.
 
Xeo
Is @Kerrek here?
 
6:37 PM
@RMartinhoFernandes That's a bit harsh, when you think about it.
 
Xeo
@EtiennedeMartel Read the comments on the question I posted. Hilarious
I was literally laughing my ass off yesterday
 
@RMartinhoFernandes hahah :P
 

The Great Placement new Conspiracy

16 hours ago, 30 minutes total – 118 messages, 6 users, 2 stars

Bookmarked 32 mins ago by R. Martinho Fernandes

for the conspiracy itself (since it seems out of the bag anyways)
 
Hmm, we should have called it The Great Replacement new Conspiracy.
Dammit, my name is in there.
 
Xeo
@RMartinhoFernandes Sorry, no upvote. You're missing free-hand circles or squares.
 
6:40 PM
:(
 
@RMartinhoFernandes: trying a distraction to make everyone forget about your contribution to the conspiracy?
 
@RMartinhoFernandes I like pictures, but I would have preferred if the "automatic" variable had something around it to suggest a stack, with the "dynamic" obviously not part of it. As it is, the pictures do not clarify why some get cleaned automatically
 
Xeo
@RMartinhoFernandes Argh! That's like a confession that the question was rigged!
 
What's a stack?
 
@RMartinhoFernandes to suggest that it is part of a grouping of objects that will automatically be destructed in order
 
6:42 PM
@RMartinhoFernandes It's this thing:
 
@MooingDuck Good point. I'll see what I can do.
 
wait, I already asked stackoverflow.com/questions/8829548/…! Just... with bad wording. Or, at least, something very similar stackoverflow.com/questions/8176057/…
 
@RMartinhoFernandes "pop!"
 
Xeo
@RMartinhoFernandes Don't forget adding free-hand circles / squares
 
though mine specifically also mentions if virtual functions will be correct
 
Xeo
6:43 PM
@MooingDuck No, yours is an entirely different story
 
@MooingDuck: Significant difference
 
Xeo
You create a dynamic storage duration object
 
you did recreate it with another class type
 
Xeo
Which will not be cleaned up when the pointer goes out of scope
 
@Xeo right, I reread my question, completely different
@Xeo I need to put a 5 minute delay on everything I think
@RMartinhoFernandes if you don't want to suggest a stack, maybe like a linked structure?
 
6:45 PM
@MooingDuck: Btw: did you see the edit containing the example from the standard in my answer?
 
@Grizzly I just looked at the pictures :(
 
I think I'll just stick a line in there :P
 
@MooingDuck: To your question
 
@Xeo I have a freehand "pop!"
 
Xeo
Heeyooo, @Kerrek ~
@RMartinhoFernandes pff, I demand circles!
Or better, stars!
 
6:47 PM
seems like the standard doesn't like doing that either
 
Xeo
Instead of those line-thingies around the new object, put stars there!
Or as an extra to those line-thingies
 
@RMartinhoFernandes also, you have automatic, dynamic, dynamic later in a row, which suggests they are either all different or similar. They need a line at least to seperate automatic/dynamic. EDIT: I misread.
 
Xeo
Damn, why doesn't he react? I can stalk his profile to see that he was active on SO a minute ago..
 
I can never recall if static objects are technically automatic or not
 
Xeo
6:51 PM
No
 
They have static storage duration.
 
Xeo
static and automatic refer to different storage duration categories
You couldn't declare stuff static auto int x; before C++11
(And even with C++11 you can't, since auto and int both refer to types)
 
I'm making yet another fixed point implementation. Should I go with "default" rounding for speed, or "nearest" rounding for accuracy?
 
@MooingDuck: Depends on what you need
 
6:56 PM
Uploaded new pics.
 
Xeo
@MooingDuck make it a policy and don't bother
 
@Xeo I think I'll figure out how to do that
 
Xeo
@RMartinhoFernandes Now you get my upvote
 
Added a line separating dynamic and auto, and individually crafted freehand stars.
 
@MooingDuck: Did you give up on the vector based map?
 
6:58 PM
@Grizzly Kinda? I realized the pros and cons are different than I had expected and accepted that. The vector was faster for creation/insertion/deletion, but slower for lookup
 
So, if you do lots of writes, but no lookups, it's preferable.
 
for a very small number of writes at least
 
Well, at least ordered traversal is fast.
 
@RMartinhoFernandes the speed difference in lookup was small. And it's only for small numbers, so...
@RMartinhoFernandes not much faster than the binary, but the binary scaled better. I stuck with that
 
Ah, so worthless.
 
7:00 PM
@RMartinhoFernandes yes
 
btw: did you actually look at how fast boost::flat_map was in comparison? Just out of curiosity
 
@Grizzly I didn't test the speed no. But they use a linear search.
 
@MooingDuck: They do linear search for find?
 
@Grizzly yeah. It's designed for small sets of small objects so...
 
how do they get logarithmic complexity then
 
7:01 PM
@Grizzly they don't. They also have mutable keys.
 
iterator find(const key_type & x);
Returns: An iterator pointing to an element with the key equivalent to x, or end() if such an element is not found.
Complexity: Logarithmic.
their documentation says differently
 
Xeo
@RMartinhoFernandes maybe you should add a simple class showing cleanup in the destructor, and mention RAII.
 
@Grizzly I'll check again, but those docs might be wrong
 
@Xeo Dammit, making those pictures was tiresome. But the worse is I think you're right. Working on it.
 
@MooingDuck: And who would use linear search if the underlying vector is ordered?
 
7:03 PM
@Grizzly if it's faster, anyone. I checked again, I'd misread. It's a binary search
@Grizzly I may or may not get around to profiling it later
 
7:16 PM
Oooh, badge.
@Xeo Done.
Feedback (or edits) still welcome :)
 
Xeo
RAII also goes by the name SBRM. :) (scope-bound resource management), which is endlessly more descriptive
Sadly, it's also endlessly less pronounceable
 
And sounds like a MAD weapon.
Super Ballistic Range Missile.
Or something.
 
Xeo
Super Ballistic Resource Magic!
 
@Xeo I also heard another one, Resouce Release In Destructor or something, I don't recall exactly.
 
Xeo
RRID - Red Ribbon ID
Yes, I'm just making things up now.
Plus points for whoever remembers Red Ribbon, though!
 
7:27 PM
oh hey, just found coliveira.net/software/raii-is-overrated. Seems intersting :D Blatently misinformed/misinforming, but amusing to me. "When a system has a large number of objects with virtual destructors, which is a common case on object oriented systems, the result is that destructors are called all the time for no good reason."
 
Xeo
As if that got anything to do with virtual destructors oO
 
@Xeo the preceeding point was virtual destructors can't be inlined/removed by the compiler
 
@MooingDuck: They can't?
 
@Grizzly in some cases they can, but not the normal case. They can only inline/elide if they know the most derived type the whole way through. Which means it must be allocated in the same TU, possibly the same function depending on your compiler.
 
Xeo
God, that blog post is stupid.
 
7:32 PM
Arrgh, those arguments always assume crappy compilers (i.e. like the ones we have).
 
@MooingDuck: That depends on the design. I have read some code where basically all destructors where virtual
 
There's no technical reason preventing such inlining.
 
so most of those virtuality could be compiled out
 
@Grizzly only if the function's stack unwinding code knows the most derived type. So, it can't most of the time. Depends on the program.
 
@MooingDuck: TU?
 
Xeo
7:34 PM
> If no exceptions are used in code (which is a common case even on C++), this is all one needs to have correct programs.
 
@Grizzly cpp file-ish
 
Xeo
I wonder if I should laugh or cry...
@Grizzly "translation unit", one "cpp" file (or "cc", "cxx", whatever suits you"
 
ah right
In this case: isn't that what link time optimization is there for?
 
A smart LTO can inline across TUs.
 
@Grizzly yes, but it can only do so much
 
7:36 PM
> In fact, there are many languages such as Java, Python, Javascript, and Rubi that don’t have an idiom for RAII.
I don't know Rubi, but all of Java, Python, and Ruby have.
(Though Java only very recently)
 
C# and VB.NET have as well.
 
@RMartinhoFernandes Ruby. It's a japanese-made language that's slower than anything but Python and PHP
 
@MooingDuck No, it's actually slower than anything. Period.
MRI.
JRuby is pretty damn fast.
Yes, the Java implementation is faster than the C one.
 
@RMartinhoFernandes Hotspot has a great jitter.
 
@RMartinhoFernandes shootout.alioth.debian.org/u64/… debatable
 
7:38 PM
And MRI is very crappy code.
@MooingDuck The problem is that the MRI is very slow even on trivial code (which is probably not counted in those benchmarks)
 
@RMartinhoFernandes shootout.alioth.debian.org/u32/… shows JRuby was slower than "Ruby 1.9", by an infitesmal margin
 
It's the standard Ruby interpreter.
Stands for "Matz Ruby Interpreter".
@MooingDuck Averages are very similar, but look the upper and lower bounds.
 
@RMartinhoFernandes I saw
 
Anyway, benchmarks are mostly bullshit.
 
@EtiennedeMartel they're slightly better than nothing
 
It's a bear
 
Shit's getting real.
@TonyTheLion A bat-bear.
 
oh lol
 
Anyone know which whois server does whois use on linux?
 
7:49 PM
Yeah I saw that but it doesn't say which whois server is used...
I mean, basically, where is it getting the reply from
 
From the cloud!
 
lol
seriously, anyone know where or how to find out? I reaally need to know
 
DNS servers advertise whois servers.
 
so its random?
 
And there's whois-servers.net
 
7:51 PM
@RMartinhoFernandes What's Java's idiom / construct for RAII?
 
but raw ubuntu, with whois installed, what would that have as its whois server for the whois command?
 
@David19801 Each TLD has its own.
 
.com
 
@robjb they have a finalize don't they?
 
@Martinho so theres just one whois server?
 
7:52 PM
com.whois-servers.net provides the DNS records for that.
I think whois on Linus uses whois-servers.net by default.
 
I see...can I get banned if I hit it too much?
 
@robjb It's like C#'s using. It's try.
@David19801 No idea.
 
Xeo
Isn't it called "try-with-resource"?
 
k thx
 
@AndresLeay Just pirate it. If you still like it when you can afford it in the future, buy it then. Also don't forget to feel bad. ;)
 
7:55 PM
Java apperently has try { } finally { } for functions, and the finalize member for objects, which may or may not ever be called
 
notch is awesome!
@MooingDuck Java 7 has a better try.
 
@MooingDuck I wouldn't consider finalize to be sufficient for RAII for that reason
 
Xeo
try(bla = blub()){ ... } or something like that, right?
 
try(FileInputStream f = new FileInputStream("blah") {
    // mess with the file
}
 
Since it doesn't guarantee finalization
 
7:56 PM
Just like C#'s using.
 
@robjb neither do I, but it's about all they got
 
@MooingDuck It sounds like try { ... } finally { ... } is a better approach
 
@robjb it is, if everyone remembers to do it
 
Yea :/
 
@robjb which is why that "RAII is overrated" article makes me laugh
 
7:59 PM
@robjb Or the new improved try block.
 
Xeo
@RMartinhoFernandes They're ignoring you since you first mentioned it. It's a bit like people ignoring you when you tell them about smart pointers xD
 
@RMartinhoFernandes What do you mean improved try block? I thought you were talking about a try-finally?
Oh, I missed the 7 in your statement earlier.
 
5 mins ago, by R. Martinho Fernandes
try(FileInputStream f = new FileInputStream("blah") {
    // mess with the file
}
Dammit.
 
Sorry. facepalm
 
Also, I'm missing a closing parens. :(
 
8:02 PM
I'm sure there's good reason for it, but as of right now I'm not fond of Haskell's numerics
Too much fromIntegral
 
@robjb It's not perfect, but a lot better than what the pre-Java 7 code would look like.
Nov 9 '11 at 9:17, by R. Martinho Fernandes
try {
    FileInputStream f = new FileInputStream("blah");
    try {
        // do stuff
    } finally {
        try {
            f.close();
        } catch(IOException e) {
            // what now?
        }
    }
} catch(FileNotFoundException e) {
    // oops
}
 
Yea, that's horribly ugly... and something I've seen in code as well
 
Could I get some help here? The accepted answer is incorrect
 
as far as I understand it, it is impossible for a resource deallocation to fail, unless there is a bug in the code
 
Get the Downvote Squad of Doom ready.
 
8:05 PM
which I would flag as an assertion failure, not an exception
 
@DeadMG I could imagine a resource who's deallocation could fail. We just pretend it doesn't happen because it's rare and makes life nigh-impossible.
 
@Pubby Why is it incorrect?
 
@MooingDuck The fact that you can imagine it doesn't make it a reality.
I'll bet that you can't name a single resource whose deallocation can fail if there is no bug
 
@DeadMG My code at work has one such resource. We use temporary files, and once a virus scan or something prevented it from being erased/destructed properly
 
Resource deallocation failure is a doomsday scenario. All you can do is convince the nearest interesting member of the opposite sex to spend the world's last 15 minutes doing it.
3
 
8:09 PM
@RMartinhoFernandes He's confusing projection rays with coordinate axes.
 
Hello all , how's everyone doing ?
 
then that's a bug in the virus scanner
if you make a temporary file and you own that file, then the scanner interferes with it, the result is the scanner's problem
 
Xeo
Err
 
@DeadMG Same problem crops up if the user interacts with the file in many ways. So there's a resource leak and you're saying it's the users problem?
 
Shouldn't you claim exclusive access to your temp files?
 
8:10 PM
then that's the user's problem
if you have temporary files, and you own them, then you own them
anyone who fiddles with them gets what they ask for
 
@RMartinhoFernandes sure, but had to release that exclusive access to destroy it
 
@MooingDuck Ah, then that sounds like an OS with poor support for temp files :(
Anyway, that's protecting against Machiavelli. It's just not worth doing it.
If the user is bold enough to mess with the temp files while in use, he should be bold enough to delete them itself.
 
@RMartinhoFernandes well, it's not the OS's fault, my predecessors put the temp file in the same folder as the user's file, and I haven't relocated it yet.
 
oh, right
so it's a bug in your program, then
 
Does anyone know of any scenario where "remove_if" would not call the destructor for elements being removed from and array ?
 
8:13 PM
remove_if doesn't remove things.
 
*a list
 
It's badly named :(
 
@angryInsomniac all of them.
 
Grrr cplusplus.com/reference/stl/list/remove_if says it does !! Can you confirm its wrong ?
 
@DeadMG I'm looking for a new example :(
 
8:14 PM
Hey, anyone know how to check out a specific branch from github?
 
@angryInsomniac cplusplus.com is a notoriously bad reference.
 
@angryInsomniac oh, std::list::remove_if is very different than std::remove_if
 
I'm not used to checking out anything than the main branch.
 
@angryInsomniac Prefer this: en.cppreference.com/w/cpp/algorithm/remove as reference.
 
@EtiennedeMartel stop saying that. IN this case, I think it's right
 
8:15 PM
@MooingDuck Can you elaborate ?
 
remove_if only moves things around.
 
@RMartinhoFernandes Will do !
 
It will call operator= or swaps, but won't destroy things.
 
@RMartinhoFernandes Yeah , thats what I read here "http://docs.oracle.com/cd/E19422-01/819-3704/rem_0514.htm"
 
@RMartinhoFernandes std::remove_if only moves things around. std::list::remove_if removes the objects
 
8:15 PM
but cplusplus was messing with me
 
@MooingDuck Oh, I assumed std::remove_if.
 
@angryInsomniac which remove_if function is in question? There's two and they're different
 
@MooingDuck std::list::remove_if
 
@angryInsomniac that one should call destructors then
 
there is a list in which I add elements and remove them if they get "deactivated" (my predicate returns a bool value for that)
 
8:18 PM
@angryInsomniac show us the list's declaration, and the line of code with remove_if
 
@MooingDuck I've put breakpoints all over the place, I confirmed that the elements are getting deleted from the list , but it never hits the breakpoint in the destructor
@MooingDuck Ok , I'll pastebin it
 
sbi
@Fanael had to look up what a hard-on is here, today. (Really, it's @Tony's fault. Who else did you think would bring this up here?)
Anyway, that made me go to YouTube and watch Nick Cave perform Hard On For Love. There's many videos of it there, but few of good quality. This one isn't exactly good quality either, but it has a lot of spirit, and comes with a great dedication. :D
 
@sbi you remind me of this
 
@MooingDuck There you go : pastebin.com/jKDQ4yCC
 
8:24 PM
@angryInsomniac Oh, calling the destructor of pointer does nothing.
 
so I guess if you didn't know, I tend to mention sex a lot
 
You need to store owning pointers (i.e. smart ones) if you want them to destroy the underlying objects.
 
don't know why, just troll boredom
 
@RMartinhoFernandes Oh , so because its an array of pointers
@RMartinhoFernandes Oh , so because its a list of pointers, it wont call the destructors ?
 
sbi
@TonyTheLion I remind you of gameData? That certainly is most surprising.
 
8:25 PM
@angryInsomniac Exactly.
 
@RMartinhoFernandes Well that sucks !
 
It only destroys the pointers.
 
@RMartinhoFernandes std::list<std::unique_ptr<bullet> >
 
@sbi no, you remind me of the picture I posted, TrollDad (even though you're not my dad, but you're trolling me :P)
 
I like boost::ptr_list<bullet>.
 
8:26 PM
@angryInsomniac because a pointer can point to anything, so doesn't always want to destroy what it points at
 
@MooingDuck : I'll have to read up on unique_ptr , thanks
 
Are you sure you need to store pointers?
 
@angryInsomniac unique_ptr is pretty simple.
 
@sbi ok, @MooingDuck got in between my messages
 
8:27 PM
Or is there some subtyping going on?
 
sbi
On #stackoverflow it can be rather difficult to tell the difference between a frustrated, new programmer and a troll. #patience
 
Hmm , I can see your point (no pun intended :D )
Is there any real reason for that though ? Its basically not trusting the user to check their pointers , or is it something deeper ?
@MooingDuck Hope so :)
 
@sbi lol, you're not new, don't know if you're frustrated though :P
 
@angryInsomniac what? The reason is so I can use a pointer to point at anything. In C++ we use smart pointers if they own stuff.
 
@angryInsomniac std::list<int*> l; int* x = new int; l.push_back(x); l.push_back(x);
You can store two pointers to the same object if you want.
That's probably a bit contrived.
 
8:30 PM
@RMartinhoFernandes Obviously :) ! Well that clears that up !
 
You could have two different collections and store a pointer to the same object on both.
 
@RMartinhoFernandes So if one reference was allowed to destroy something then the other would be left hanging
 
@angryInsomniac Worse, it would eventually try to destroy it again!
 
@RMartinhoFernandes Invalid heap ?
 
Don't know. It's undefined behaviour. You could get a crash if you were lucky.
But if the destructor took money from your bank account...
 
8:32 PM
@RMartinhoFernandes hehe !
@RMartinhoFernandes wouldn't that be a horrible design decision though !! Deducting from someones balance in a destructor ?
 
Probably. I was trying to scare you ;)
 
@RMartinhoFernandes :D Message received
 
What you should do with sliding glass doors at your place of lodging
Horse_ebooks is the only thing I like about Twitter.
 
@angryInsomniac: That's called incompetent programmers tax
 
@RMartinhoFernandes I think all I really need to do is change from bullet* to std::unique_ptr<bullet> and I should be good to go ? Given that I can still use the * operator to pass arund references to elements of the list ?
@Grizzly :D Why is it levied on the poor customers though ?
 
8:40 PM
@angryInsomniac yeah, the changes should be very minimal
 
@angryInsomniac Yes, that should solve it.
Alternatives are boost::ptr_list<bullet> (it's a list of pointers that destroys upon removal) or simply std::list<bullet> (if bullet is not polymorphic, you can just store them directly).
 
@angryInsomniac: Is it? I didn't see it specified who is charged
well incompetent customers tax then
afterall I wouldn't want to use such a piece of software
 
@RMartinhoFernandes Hmm , might look into that later :) deadlines
@Grizzly That's the problem .. how would you know :D For all you know your bank software was designed by an incompetent programmer :) Lots of those where I work :D And we actually make a banking software
 
maybe a strange question, but if I call operator++ on a reverse iterator, do I walk the container up or down?
 
Advancing a reverse iterator means going back in container order.
 
8:45 PM
It's like -- on a normal iterator
 
ok thanks
 
What is correct term for "normal" iterator?
 
If I use unique_ptr , can I do this ?
bullet *currentBullet = *bulletArrayIt;
Where bulletArrayIt is of type std::list<std::unique_ptr<bullet>>::iterator bulletArrayIt
 
Use a reference: bullet& currentBullet = *bulletArrayIt;
Hmm.
 
8:49 PM
If you want a pointer you can do bullet* currentBullet = bulletArrayIt->get();
@RMartinhoFernandes: Shouldn't that be bullet& currentBullet = **bulletArrayIt;?
 
Hmm, yeah.
 
@RMartinhoFernandes Doesnt work , gives me an error
 
Right, needs two stars :(
Now this reminds me exactly why I prefer ptr_list.
 
@Grizzly Ok .. how did wander into the realm of multilevel references ? Can you please tell me why ?
 
@angryInsomniac because you have an iterator (pointer) to a unique_ptr (pointer)
 
8:51 PM
@angryInsomniac: *bulletArrayIt; has type std::unique_ptr<bullet>, so dereferencing that gives you bullet&
 
oh .. I thought that like earlier bulletArrayIt gave me a bullet
 
it would have been exactly the same with std::list<bullet*>::iterator
 
@angryInsomniac: I though you had a list of bullet*
 
@Grizzly Markdown ate his stars.
 
Ah that makes sense
 
8:53 PM
> oh .. I thought that like earlier *bulletArrayIt gave me a bullet*
 
@Grizzly Aaaaaaa , too much Info at once :D let me try to wrap my head around all of this :)
@RMartinhoFernandes Thanks for the help :) how to I make sure hat doesn't happen in future ?
 
@angryInsomniac Yes, and to get a reference from that you would have to do **it anyway.
@angryInsomniac You should have typed something like oh .. I thought that like earlier `*bulletArrayIt` gave me a `bullet*`
Have you read the newbie hints?
 
@RMartinhoFernandes I have , but I cant remember everything at all times can I ?
 
just keep a finger on the backtick button while you type :P
 
8:57 PM
I am in pointer hell now :D
 
@angryInsomniac: You dereferenced a nullpointer?
 
@MooingDuck I have to either switch my keyboard layout to English or type a space after the backtick if I'm in the Portuguese layout.
Anyway with boost::ptr_list<bullet>::iterator it; you can do bullet& r = *it;, because boost::ptr_list hides away one level of indirection.
 
@RMartinhoFernandes: really?
 
@Grizzly ? Is that the technical explanation for pointer hell ?
 
@angryInsomniac: I thought that was the way to get there
 
8:59 PM
@Grizzly Sorry, which message are you referring to? The one about keyboard layouts, or the one about ptr_list?
 
@Grizzly I was just saying that I have to contend with multiple places where unique_ptr is causing mayhem !
 

« first day (453 days earlier)      last day (4478 days later) »