« first day (1040 days earlier)      last day (3915 days later) » 

8:01 AM
@MarkGarcia deleted :<
 
@TonyTheLion been more than a week since I heard from them, aka dead in the water
@EtiennedeMartel well excuse me for applying somewhere that does not consider transatlantic rehoming giving up a free house and stable job is not a clear sign I want to work somewhere ಠ_ಠ
 
@Rapptz I think not. shared_ptr<derived> is implicitly convertible to shared_ptr<base> though. (I don't think unique_ptr can do this.)
 
@StackedCrooked It can.
 
Ah.
If you privately inherit a class then I guess you can't easily 'inherit' it's operator<?
 
operator< is sometimes defined outside of the class.
 
8:15 AM
@Rapptz Yes, but if you publicly inherit the class, then your objects become a match for that operator<.
And that's a "benefit" (or disaster) that you don't have when using private inheritance.
 
1
Q: How can a [[noreturn]] function have a return type?

OleksiyI encountered this beautiful example of highly readable and elegant code, but I'm having troubles understanding it: struct S { [[noreturn]] virtual inline auto f(const unsigned long int *const) –> void const noexcept; }; Here's what I understand (please correct me...

 
I probably just need to make that operator< a friend function.
 
could someone vote for reopen there? its bullshit closing a 4-part question just because one part has been answered elsewhere
 
user1804599
@ArneMertz That isn't a dupe. :|
 
SO is obsessed with closure :)
 
8:22 AM
@not-rightfold indeed
 
user1804599
It's like.
 
@Rapptz Basically you want type erasure? The design used for boost::any might give you some ideas..
 
I have my own any class, my point was that I didn't want to use it because I only want to accept a single type, not any type.
 
user1804599
One question is "Why is [[noreturn]] there when we have void?" and the other one is "Why do we need to declare a return type for a function that never returns? Why can't it be polymorphic?".
 
@StackedCrooked I guess they're just after some badge and trying to get it by close-voting anything that comes across
 
user1804599
8:23 AM
Arrg.
 
user1804599
I want finally or scope.
 
@not-rightfold what for?
 
@not-rightfold why?
 
user1804599
I need to restore some state before returning from a function.
 
The same reason people want scope-guard..
 
user1804599
8:24 AM
Writing a scope guard class for this is fucking cumbersome.
 
user1804599
It should be a language feature.
 
user1804599
I don't want to name my scope guards.
 
oh, finalLY... those two extra letters change things :D
 
user1804599
hmm
 
@not-rightfold ah okay, some kind of do-undo pair definition on the fly? ;)
 
user1804599
8:26 AM
#define finally(code) catch (...) { code throw; } code
 
user1804599
:D
 
user1804599
Token peek() {
    auto old_begin = begin; // need scope guard
    auto token = read();
    begin = old_begin;
    return token;
}
 
user1804599
@ArneMertz This.
 
user1804599
Hmm. GCC cleanup attribute.
 
I had something like this: ideone.com/clone/dNLO6H
Token peek() {
  auto old_begin = save(begin);
  auto token = read();
  return token;
}
 
user1804599
8:40 AM
Hmm nice.
 
but tbh, I only used it once or twice, so there could be issues.
e.g. op=(ScopedSave const&) should be default, while op=(ScopedSave&&) should be deleted explicitly
 
user1804599
> Due to the fact that nonmember functions can be called with the first argument using the dot notation, array.popBack is equivalent to popBack(array).
 
user1804599
Holy shit, I didn't know that. (D)
 
sbi
David made this an FAQ question. Has there been any discussion on this here? Because from the comments now I feel like there's been a much broader discussion which I am missing.
 
user1804599
19 hours ago, by Feeds
7
Q: Why is enum class preferred over plain enum?

OleksiyI heard a few people recommending to use enum class because of its type safety. But what does that really mean? I hate it when people say something is good or something is evil without explaining exactly why they say these things. I couldn't find a clear answer on StackOverflow, so I looked i...

 
user1804599
8:54 AM
I think Xeo's response "Erm" is everything.
 
ah got it
 
sbi
@not-rightfold So you still have that feed. Good. (I once set that up.) But what do you guys (aside from @Xeo) think about this?
 
user1804599
I think it's fine.
 
user1804599
Virtually every C++ feature has a question. :P
 
I think so, too. Yes, you can read that one up in any C++11 book/article covering that feature, but there will be lots of people asking that again and again on SO, so at least its a good basis for dup closing :P
 
9:02 AM
@sbi It's a duplicate.
 
sbi
@Rapptz I see no close-vote.
@not-rightfold Fair 'nuff.
 
21
Q: Do we really need "enum class" in C++11?

iammilindWhen we have, struct E { enum E_ { HELLO }; }; // 'E' is inheritable then why do we need, enum class E { HELLO }; // 'E' is not inheritable IMO 2nd version doesn't offer more features than the 1st. I don't think that enum class is introduced just to save 2 curly braces {};! Am I missing an...

similar question, been discussed before
 
The best advice that can be given is to move away from Spirit. There are many other alternatives out there. — Jared Krumsie Dec 29 '11 at 5:00
seriously.
 
sbi
@ArneMertz That you can the read stuff elsewhere and that you can find it through google is never been a hindrance to have a question on SO. That's because SO aims to be the place google links to.
@Rapptz Is it similar enough to be a dupe?
Note: I'm not even reading these two, let alone form my own opinion. I'm too lazy to do that today. It's just that I want to keep that tag clean. If you guys decide the question is fine, I'm fine with it. All I want is a discussion going.
@TonyTheLion During that day something important came up regarding our housing trouble and there was no way I could avoid going to a meeting regarding this in the evening. So I didn't meet @MartinJames.
 
The newer answer is a simple explanation to the older answer (which was already simple). This one seems to do a direct comparison while the older one was more about telling why it's needed and better.
 
sbi
9:08 AM
@R.MartinhoFernandes 'course you don't remember. You were drunk.
 
Just my two cents I guess
 
sbi
@TonyTheLion Second only to trolling the tigress.
@Rapptz So you think one of them should be closed as a dupe?
@CatPlusPlus Just keep that android away from everything (including me). You never know...
 
It's not an exact dupe, so I don't know if it's worth closing. The newer one is a direct comparison so it might be a better format. The older question has the assumption that the reader is smart enough to know the pitfalls of a regular enum.
 
@sbi I think there's a potential FAQ there, but neither of these is really it. At least IMO, a real FAQ should probably be closer to "How is an enum class different from a "plain" enum?", and possibly something about "and when would I prefer one over the other?" It should at least attempt to be reasonably neutral, however, and leave it to the reader to draw value-oriented conclusions about why these differences are improvements.
 
11
Q: Is taking the address of a local variable a constant expression in C++11?

user1131467The following C++11 program: int x = 42; void f() { int y = 43; static_assert(&x < &y, "foo"); } int main() { f(); } Doesn't compile with gcc 4.7 as it complains: error: ‘&y’ is not a constant expression This would agree with my intuition. The address of y potent...

seems more related to pointer comparisons, not to const expressions per se
 
sbi
9:13 AM
@MartinJames Have you seen this?
@Rapptz Ok.
@JerryCoffin I take this down as a Nay vote then.
 
Bottom line, a good Q&A should focus on the technical aspects, not cheerleading for the committee and how wonderful everything new is. This is particularly true in the case of a FAQ.
@sbi Pretty much, yeah.
 
I'll do a Nay vote too.
 
@sbi Meh - it's security services. I don't know what information they were acting on, nor is it ever likely to come out in public. These secret services are like C-style system calls - nobody likes the hassle, but you have to have them and put up with the pain sometimes.
 
sbi
@StackedCrooked You should google for static_vector. There's a few of them out there. Here's one of them that deals with non-PODs (which @R.Martinho said his doesn't).
 
Actually, rather than just "how Does enum class differ from plain enum?", it should probably be more like "What is an enum class and how does it differ from plain enum?" Primary focus should be on what it is, how to use it, how to write code well. Contrasting with plain enum should (IMO) be secondary.
 
9:17 AM
@Borgleader "SS"?
 
@sbi A Lounger was drunk? there's strange and unusual:)
 
sbi
@MartinJames Not strange for the robot. When he came to Berlin, he was drunk after half a glass of beer. (I think he's worked his way up to a full glass now. If he doesn't watch for this, he might end up a beer-consuming German.)
 
On that note, I need to go get some sleep. TTYL.
 
sbi
@JerryCoffin Good night!
 
@JerryCoffin night
 
9:19 AM
@sbi Woah.
 
@sbi Oh, IME, he's well past the 'full glass' stage :)
 
yo
morning
 
sbi
@MartinJames Coke, that would be, right?
 
@sbi Well... it's difficult for me to say - I don't drink and tell :)
 
@Borgleader If anyone cares, it might be about time to talk to a mod/take it to meta. This is clearly trolling on unwanted levels
 
9:22 AM
@MarkGarcia That looks like PS/2 to USB adapter.
 
@nightcracker I think it was you on about it yesturday, rss icons in context
 
@Borgleader also, in the category of SS, in case the comments got/get nuked: i.imgur.com/GFTk6Ea.png
 
icon has slightly too much gloss (remove it a bit, but don't make it entirely flat)
still don't like the header/footer gradients though
 
@wilx Heh - we've probably all had strings of serial adaptors, but that is indeed a serious outbreak :)
 
@thecoshman the gradients are especially bad because the dark side is on the body side, resulting in a high contrast between the header/body
 
9:28 AM
@sehe Is that some kind of addon in the menu bar?
 
@FlorisVelleman hmm?
 
@sehe The icon's before review and chat
 
user1804599
> core.exception.SwitchError@yard.lex(62): No appropriate switch clause found
 
user1804599
Heh.
 
@nightcracker I was more on about the rss icons :P
 
9:34 AM
@thecoshman I also replied to that ;)
@thecoshman but it comes preshipped with hate ;D
 
@nightcracker so you did.... can't really do much about the gloss, I 'borrowed' that image, but I might look at making my own version, I think slightly less bright a gloss, and slightly more diffused.
@nightcracker is the problem that the gradients them selves have too much contrast, or that those bars contrast too much with the main background?
 
@thecoshman both, more the latter than the former though
@thecoshman also, have you tried floating the RSS symbols all the way on the right?
 
@nightcracker I thought about that actually.
 
@sbi Thanks!
 
@thecoshman imgur.com/r9tAaux
@thecoshman if you follow that idea however, you should make the rss icons a bit less heavy
 
9:39 AM
@thecoshman got a typo on that site methinks ;-)
 
@ArneMertz ¬_¬ care you point out where?
 
It appears most people missed the point of my parody on meta.
 
I can share my opinion with those who care to here it. <- care to HEAR it
 
@R.MartinhoFernandes link or it didn't happen
@ArneMertz are, thanks, any more you see?
 
9:41 AM
Overtime should be Over time
love to get feed back -> feedback
I think that's it :-)
 
@ArneMertz if you are in the mood, I have two posts written that wouldn't mind a proof read
 
why not - waiting for a 40 minute "unit test" suite to complete ;)
 
Woah you're actually going to be blogging
 
@ArneMertz here
 
I tried that once, I got as far as the intro
 
9:45 AM
this is so painful
 
and then never continued
 
@TonyTheLion well, it's a plan :P
 
THERES EVEN PEOPLE IN THE COMMENTS COMPLIMENTING THE PIANIST
 
@thecoshman oooh, I like the grayscale RSS icons.
 
9:45 AM
@TonyTheLion ... that's what she said!
 
user1804599
Wtf.
 
inb4 PHP
 
@R.MartinhoFernandes feel free to steal (note that whilst I did edit them... I may not have created them all by my self)
 
the piano "starts" at 1:00
 
user1804599
9:46 AM
@TonyTheLion Twitter. :V
 
@thecoshman going through them, will throw my comments at you later ;)
 
@ArneMertz cool stuff
@TonyTheLion you have seen /r/outside right?
 
nope
I've been to r/nope
lots of NOPE NOPE NOPE NOPE
 
@R.MartinhoFernandes original source
@TonyTheLion I assume NSFW
 
9:48 AM
@thecoshman spiders
NOPE
 
nice :P
 
Hihi
 
user1804599
Hmm, graphene.
 
user1804599
Cool stuff they say.
 
9:56 AM
@TonyTheLion One transistor...
 
yea well, gotta start somewhere I suppose
 
I like how the article implicitly claims that CPU speeds are limited by their internal transistor clock speed
 
It's just a horribly-written article anyway.
 
@FlorisVelleman That's the gold/silver/bronze badge counts, I guess
 
@MartinJames so far...
 
user1804599
9:59 AM
Fuck transistors.
 
@thecoshman Until they can manufacture loads of them and connect them up in one operation sequence , like silicon transistors, they're not going mainstream.
 
@MartinJames yeah, even I can't stick to that article (╯°□°)╯︵ ┻━┻
 
user1804599
Those fuckers emit heat.
 
@not-rightfold oh, so you want you sistors ALL female! well that's just so typically ignorant of you.
 
@not-rightfold Keeps my office warm in winter.
 
10:02 AM
@thecoshman He's bi.
 
Though, to be fair, there's the aircon power use in summer :(
 
@R.MartinhoFernandes what's your point?
 
@thecoshman He'll fuck any transistors regardless of gender.
 
Hi! I'm having problems with my eclipse CDT syntax coloring. For example in one of my projects I have one cpp file where the coloring seem to work just fine, but in another file the coloring doesn't seem to work so good (colors in int's and includes work, but not for classes or functions)? anyone got an idea?
 
@R.MartinhoFernandes Maybe transistors, (of any switch-sexuality), are all he can fuck?
 
user1804599
10:05 AM
@Markus I see a severe lack of decent editor there.
 
@R.MartinhoFernandes are you trying to be funny?
 
@Markus Dell Support: Reinstall Windows
 
@Markus Eclipse != C++
 
@thecoshman It's working for me :)
 
@thecoshman Were you trying to be serious?
 
10:06 AM
@nightcracker :) didn't help
 
user1804599
@nightcracker rightfold Support: Upgrade to Gentoo
 
@thecoshman I know, but maybe someone of you had the same problem when working with c++ in eclipse cdt
 
@R.MartinhoFernandes no, just was not sure if I should take you seriously
 
Seriously, seriously in here?
 
@Markus AFAIK no regular here is that sadistic
 
10:07 AM
@not-rightfold I'm sorry sir, but installing anything but Windows OS Enterprise Masterclass Business Edition Home Pro XP Me Ultimate on your Dell™ machine will void the warranty
 
user1804599
Make love, not war.
Use Vim, not Eclipse.
 
@Markus If it happened to me, I would draw the obvious conclusion: bugsiness as usual with Eclipse.
 
user1804599
@nightcracker But I don't have a Dell box.
 
@not-rightfold That will void your warranty, then.
 
user1804599
@nightcracker But I do not care.
 
user1804599
10:09 AM
(void)warranty;
 
@not-rightfold Our billing system will send an invoice for this call to your address this week. Have a nice day.
 
user1804599
Yello makes weird music.
 
user1804599
@nightcracker Good; I'm running out of toilet paper.
 
@thecoshman I invited you to another room and pasted my findings there :-)
 
@not-rightfold It'll be an e-bill, so you'll need a virtual asshole.
 
user1804599
10:11 AM
@MartinJames I need Linus Torvalds?
 
@not-rightfold LOLOL!
 
@ArneMertz thanks for that
 
@thecoshman any time
 
@StackedCrooked Doesn't ring a bell, but most of my brain seems to be /tmp, so...
 
10:36 AM
Ugh, someone escaped my sarcasm tags.
 
I can not believe I missed the troll feast, now I am devastated
 
@R.MartinhoFernandes I'd fix it, but I don't have edit rights (without stupid queue) IIRC
 
@Telkitty猫咪咪 I missed it too, but I wasn't hungry.
 
@thecoshman I did so already.
 
@R.MartinhoFernandes good for you!
 
10:39 AM
I am starving, have not trolled decently for ages. I think I am devolving :'(
 
@Telkitty猫咪咪 Try and hang on - one will surely turn up soon.
 
but would I be able to smash in on time and get a piece?
 
@Telkitty猫咪咪 If 'xdotool' guy makes another sockpuppet, I'll let you know :)
 
$ ... so thoughtful for your fella lounger trolls :')
 
 
10:49 AM
does anyone know of IO libraries other than C's or C++'s stdlib IO?
 
ergh... fonts... so tricky to pick
 
-1
Q: what will be the output of the following program and why?

vikiwhy the following program outputs 3 6 1 ?please explain. #include<stdio.h> int main() { int a[2][3][2]={ {{1,2},{9,8},{3,7}}, {{2,2},{1,4},{5,4}} }; printf("%d %d %d",a[1]-a[0], a[1][0]-a[0][0], a[1][0][0]-a[0][0][0]); return 0; }

close
 
who the hell upvoted that?
 
Gladly. We had a 'b=++a + ++a' sequence-point thing already today :(
 
10:57 AM
how about ++b = ++a + a++;
 
@Telkitty猫咪咪 Don't..... :)
 
Dear Spotify, if you must force me to listen to your advertisers at least let me veto and skip the ones I find abhorrent.
 
@MartinJames why would I? ... normally :p
 
I'll skip through the first 3 seconds of 5 ads not to have to listen to British Airways.
 
we don't care
 
11:00 AM
why use spotify
grooveshark, pandora, etc
 
@DrewR What's wrong with British Airways?
@nightcracker It's legal, and with a direct source from labels it has correct artist/title/album tags and guaranteed track quality. Not random rips from some spotty dickweed's USB drive
 
@LightnessRacesinOrbit so are the others, at least in the netherlands
 
@nightcracker No, because they do not pay the artist for plays.
 
@LightnessRacesinOrbit pandora does
 
The old "but I'm in a different country" argument is really fucking retarded. You take, you pay. END OF STORY
@nightcracker Okay
 
11:03 AM
@LightnessRacesinOrbit I don't think grooveshark does, but that doesn't make it illegal for YOU
 
> We are deeply, deeply sorry to say that due to licensing constraints, we can no longer allow access to Pandora for listeners located outside of the U.S., Australia and New Zealand.
@nightcracker I didn't say it was illegal to use.
 
there's plugins to use pandora outside of the us
 
So... "why use spotify when you can use an alternative that doesn't give back to the artists or an alternative that requires workarounds?"
Can you figure out the answer to that?
 
yes
no ads
 
@LightnessRacesinOrbit Stop taking away my right to get stuff for free, you capitalist pig.
(Are pigs the capitalist or the communist ones? I can never recall)
 
11:10 AM
@LightnessRacesinOrbit everything!!
 
@R.MartinhoFernandes both
 
@StackedCrooked I'd make an array of StorageFor thingies.
 
Is throw; legal out of catch blocks?
 
£9.99 per month, no ads.
don't be tight.
@wilx What happened when you tried it?
 
@wilx if not , what would you catch ?
 
11:12 AM
@wilx I think it's legal, but easily UB.
(non-UB-ish example coming up)
 
oh nvm you mean literally throw;
 
I like being tight. it keeps me wealthy.
;)
 
> [C++11: 15.1/9]: If no exception is presently being handled, executing a throw-expression with no operand calls std::terminate() (15.5.1).
next
 
@R.MartinhoFernandes That's not really "out of a catch block" but I'll grant it to you...
 
11:16 AM
@LightnessRacesinOrbit Well, throw; is out of one.
I thought it worth making the distinction between the syntactic level and the execution.
 
that's why I grant it :D
 
@LightnessRacesinOrbit I agree.
 
@sbi That's a lie! When I moved to Berlin I didn't drink beer at all (I still don't do that with any noticeable frequency).
 
One of my coworkers thinks singletons are a good idea
 
@R.MartinhoFernandes so if you had drunk half a glass of beer, you surely would have been drunk ;)
@TonyTheLion several of mine do also. We've about 200 singletons in our codebase, and implemented in a very ugly way...
 
11:25 AM
:/
 
@ArneMertz Oh gosh.
 
If I ever start a company, I will never hire anyone that thinks singletons are a good idea
 
I know for a fact that there are no singletons in the codebase at my new job.
 
How do you know that?
Your new boss wrote all the code?
 
@R.MartinhoFernandes What? You've seen all the source already, or is that what they told you at interview?
 
11:28 AM
@TonyTheLion There are only two other programmers there and they don't like singletons.
@MartinJames Yes, it came up on the interview.
 
oh good
 
you mean ... there are 2 mains?
 
@R.MartinhoFernandes like this:
class Singleton {
static Singleton* mpcoExemplar;

Singleton * Singleton ::getExemplar() {
if(mpcoExemplar == 0) {
mpcoExemplar = new Singleton ();
}
return mpcoExemplar;
}

~Singleton() {
mpcoExemplar = 0;
}
};

int main() {
int x = Singleton::getExemplar()->foo();

//later
delete Singleton::getExemplar();
}
 
@R.MartinhoFernandes I meant something like this: coliru.stacked-crooked.com/…
 
that would be awesome ... could be confusing for your OS though
 
11:30 AM
@ArneMertz oh gawd my eyes
they are bleeding
 
@wilx That's UB, but not ill-formed.
 
Hmm.. I wonder what happens if you start some threads with main() as the start address?
 
Oh fuck - Kaspersky upgrade completed and it wants me to reboot :(
 
11:34 AM
..and then it will do things on restart. If I never return to the Lounge, blame AV. Goodbye all...
 
@R.MartinhoFernandes shouldn't be UB, it just calls terminate, doesn't it?
 
Wow, I just realized how disturbing my dream was.
 
(§15.1,9)
 
For starters, my sister had a serious drug problem
 
11:36 AM
u really want to disturb US as well with your dreams? ;)
 
It was weird because it's like it could happen irl.
Nothing was too out of the ordinary.
And yes, your induced nightmares are my pleasure.
 
@ArneMertz Oh right, true.
@chris You think people will have nightmares with your sister?
 
Bastards - all my tabs have gone from FF :((
 
@MartinJames Isn't there "Restore previous session" in the default home page?
 
@R.MartinhoFernandes I don't know, I said serious drug problem. That could evolve into who knows what in yours.
@MartinJames Happens to me in Chrome when I restart the computer with two Chrome windows open.
 
11:43 AM
@R.MartinhoFernandes Oh yeah! It worked, thanks!
 
Or just close one I guess.
 
Session Manager ftw.
 
@chris I hope you won't have nightmares about people dreaming with your sister.
 
@MartinJames you could configure FF to restore them ;)
 
@R.MartinhoFernandes lol
 
11:45 AM
@ArneMertz It normally does do exactly that. This time, they just disappeared after the reboot. Robot to the rescue:)
 
@chris depends on the drug, I guess ;)
 
> Shadow home secretary Yvette Cooper said the government had questions to answer, adding: "We still don't know on whose legal advice this crucial decision was taken to use terrorism powers."
I like how they refer to it as "terrorism powers".
 
@ArneMertz It was possibly weed. There was some weird video on how to sit down with them and talk about it, too. My brain sure is creative when I don't actively use it.
 
@R.MartinhoFernandes I guess 'anti-terrorism powers' would have been better, yes:)
 
@MartinJames Would it?
I personally think "terrorism powers" is fine.
 
11:53 AM
@R.MartinhoFernandes It would have sounded better;)
 
It feels like the Govt's of this world will use Terrorism as a guise to justify just about anything.
Soon we'll have a curfew under the guise of terrorism
 
@TonyTheLion of course they will, as long as they get away with it.
 
Charity tin is rattled in my face at supermarket entrance.. "Hi, what are you collecting for", "Childhood cancer", "Sod off, I'm not giving you anything for that!".
 
@ArneMertz Its kind of sad, tbh
 
This tweet from yesterday was really hilarious:
Edward #Snowden stole it and thanks to our first rate security police at LHR, our security forces have it back. Well done to the police
 
11:57 AM
lol
 
@TonyTheLion It's not sad. It's disgusting and revolting, like having Charybdis in your stomach.
 
@R.MartinhoFernandes I suppose I was putting it a bit mild.
0
Q: how is cmp defined in c++? with < or with <=?

user2703375I asked me how the cmp function in std::sort and std::is_sorted is defined. here are two documentations for is_sorted_until how say it should be operator< : en.cppreference.com cplusplus But i think there should be a problem with equal elements. The list {1,1,1} should not be sorted because 1<...

what?
 

« first day (1040 days earlier)      last day (3915 days later) »