« first day (963 days earlier)      last day (4211 days later) » 

00:04
@ScottW "Willkommen hotel Gunge. Ausweis, creditcard"
@Xeo Now that you mention it, I may have changed some stuff now that GCC has ref qualifiers so it could in fact be closer to bind than it used to be.
00:37
lmao
@TonyTheLion No, it's been his Bitbucket and Dropbox name since he joined.
man
I lost another 2.5 pounds this week
I wonder how many I need to lose
If youre trying to loose weight: Congratz. If not, you might want to pay close attention to that =/
iirc he's overweight.
my doc prescribed weight loss, as it were
00:50
Ah, well congratulations then :)
@Rapptz Very much so. I don't want to give my exact weight here, but it's a lot more than it should be.
although frankly, considering that I'm doing a lot worse now, perhaps I'd be better staying off fat :(
I've also been thinking about my employability, or lack thereof
Time to play video games.
Oh, only output iterators may have void as difference_type. Input iterators can't.
so glad that I don't have iterators in Wide
01:00
I imagine you have something to take their place?
Morning guys.
Oh um, I need an operation to convert optional to either T or throw user-specified exception. Something that has the semantics of o ? *o : throw oh_noes {}; and can work for rvalues. What do I call it?
Eh, I guess that's an exception version of maybe.
@LucDanton Extract?
idk why i answered im ~sure~ he has me plonked xD
Ah, the problem if I decide to pass in the value to throw is that an exception is constructed every time. But if I don't, then it's not thrown directly from the calling code. There's no way to win so I guess I'll provide two overloads.
yiz
yiz
01:16
@Borgleader maybe he's semi-functional bot
that only programmed to answer a subset of the loungers
Hahaha, an interesting albeit implosable theory
He could be one of the early prototypes that culminated in the creation of @R.MartinhoFernandes
hi! I have a question about string encoding in c++, I noticed that if I changed the character encoding of my source code file, the integer value of some character changes, and if the encoding is not (ASCII or utf-8) something like utf-16 it doesn't compile.
What compiler are you using?
The flag -finput-charset controls that. GCC otherwise tries to get the information from the locale (or assumes UTF-8).
You can try something like -finput-charset=utf-16 but that's system dependent. (E.g. it would work on mine because iconv -l lists "UTF-16".)
Does that help at all?
01:24
@LucDanton assume
@DeadMG Not bad. I think I'll stick with maybe_throw, however awkward it is, because it underscores the link with plain maybe.
Damn, I'm deep inside ancient code. There even are some typedefs!
lol
Well, fuck. BOOST_THROW_EXCEPTION is a void expression, not a throw expression, so putting it in a conditional expression is somewhat problematic.
wtf is BOOST_THROW_EXCEPTION for?
Throwing exceptions.
01:29
what's wrong with throw expr?
More seriously it adds Boost.Exception specific stuff, and also __LINE__, __FILE__, __func__ info.
Hah, first workaround attempted was BOOST_THROW_EXCEPTION(e), throw but that's a comma expression so it doesn't work either. Guess I'mma try throw (BOOST_THROW_EXCEPTION(e), 0) now!
@LucD
@LucDanton it doesn't work, it throw errors like error: stray '\201' in program
@AlexDan I can reproduce as much. Kinda baffled, as iconv happily converts the sources on its own.
1
Q: How should I use g++'s -finput-charset compiler option correctly in order to compile a non-UTF-8 source file?

robI'm trying to compile a UTF-16BE C++ source file in g++ with -finput-charset compiler option but I'm always getting a bunch of errors. More details follow. My environment(in CentOS Linux): g++: 4.1.2 iconv: 2.5 Linux language(in Terminal): LANG="en_US.UTF-8" My sample source file(stored in ...

@AlexDan I may have sent you on a red herring, the ^above is interesting. Lots of caveats applies.
01:45
@LucDanton I will check it out, thanks.
Given that I can't get GCC to accept a program with no includes and no BOM I think the answer is very much relevant.
@yiz You'll miss the better part of the chat.
<- loves feeds. :P
@yiz Did you get my joke? (My last post)
I really need to replonk you
yiz
yiz
plonking deadMG too
3-5 days after I first I got my period I become extremely sensitive
Did I kill the conversation? Back to coding ... :p
02:01
s/co/cod/
@DeadMG Say, what do you have so far in lieu of output iterators?
@LucDanton It's a simple function. f(x) outputs x.
so for backinserter I have function(x) { cont.push_back(x); }
which also implies that an output range in Wide may be an output range for more than one type or generic rather than for a fixed type.
Do you have algorithms taking those?
currently, I only have Copy which actually takes an output range.
That seems to be about the only one of any use, right?
02:11
but it's a simple job really- just foreach(function(x) { f(x); });
@LucDanton I can't think of any others offhand, but I see no reason to be optimistic that Copy will be the only one.
whilst not having non-composable iterators certainly reduces my need for output ranges
the other thing about output ranges is that the same object can be both input and output range simultaneously.
although you obviously couldn't define such a thing as a lambda
I'm having so much trouble with names. I have range::move(r) which sprinkles std::move_iterator on top, and is thus unrelated to the algorithm; I have std::vector<T> v = range::copy(r); to 'adapt' ranges to types constructible from iterator pairs but that's probably a terrible name.
truth be told
I have come to the conclusion that the Standard containers need replacing
@DeadMG I'm thinking of reserving 'output iterator/range' to mean 'output iterator/range, and no better' exclusively. 'Mutable whatever iterator/range' is in fact Standard terminology for the other ones.
not substantially reworked, but a fresh interface for sure
in a range world, a lot of their functionality is redundant at best
@DeadMG Regardless it's going to be one of the escape hatch out of my range stuff.
02:14
and some of them like map have other defects
what, ye olde "convert to anything" operator?
Well it is constrained.
personally, I would save copy for something that takes an output- you copy from x to y.
I would use something more like to_container
std::vector<T> data = range::to_container(r); range::copy_to(r, ostream(std::cout)); range::move_to(r, ostream(std::cout));
Eh, to_container sounds a bit to specific. range::adapt?
that could work.
I must be the only one with the pretence that this could be useful for more than just containers though lol, Martinho not only calls it materialize but has a version that accepts template template parameters.
02:19
so what is your range design, exactly?
I take it that you don't use the optional-based design I used for Wide
0
A: What is the name of this operator: "-->"?

Khulja Sim SimUntil x tends to 0 by single step !

A range operation like zip composes/embeds its arguments and at the end of the day begin/end produce big-ass ginormous iterators, such that for(auto&& item: result) ... is the desired traversal in one go.
so ultimately, you offer an iterator-based interface?
@Mysticial Hah xD
People keep on posting stupid and duplicate answers to that question. lol
02:22
Depends. I was wondering about output iterators because that's one of the last hole to plug: spare the user from the need to e.g. write for(auto&& item: result) in the first place.
Then it becomes an implementation detail.
I don't think you can do that.
everybody will have their Favourite Iterator-based Algorithmâ„¢ and are going to be pissed when they can't use a range with it.
And I guess removing iterators altogether in favour of actual, honest Andrei-style ranges can be transparent. @R.MartinhoFernandes We can meet in the middle!
@DeadMG Let me measure up some Boost.Range iterators.
IMO, there is no range-based design that is a substantial improvement over iterators and offers backwards compatibility with iterators.
as long as you offer iterators, you always have to support the crazy shit users can do with them
Not true.
well, it'[s just my opinion, not something I hold as concretely proven
but I haven't yet seen a range design which offers an iterator interface to an arbitrary range, and doesn't suck because of it.
then again, I haven't seen yours, so who knows, maybe I'll be surprised
02:30
lol, produce small Boost.Range toy program, receive segfault.
urgh...my search tree is stored in nodes that contain a vector of nodes etc etc...and there's some pointers to the elements in these vectors kept in someplaces (the vector sizes never change once they are built, so those should stay fine...right?) ...and we delete some vectors once the search tree has chosen a different path.
yet, for some reason, some pointers to these nodes appear invalid - and the fault seems to be our deleting
but I can't find why deleting unused nodes deletes nodes we do still use ._.
sizeof std::make_tuple(std::vector<int>{}.begin(), std::vector<int>{}.begin()) reports 80. Anything I'm overlooking?
Oh right, the Boost version was using std::initializer_list<int>, not std::vector.
@DeadMG Let me paint the situation better: producing iterators is not a goal in and of itself. However as it so happens the ranges I have right now can be implemented naturally on top of iterators -- the 'natural' being the important part here: there's a lot of things to keep track of, and having the implementation as simple as possible is of value to me. What i'm really investigating is the potential for the interface, not the details.
02:38
How do you convert a bytes value to 8 bit binary values?
I have >> & << | operators available
so for example I have an unsigned byte value 129
then I want binary values in an array like 1000 0001
byte & (1 << 1) gets you one bit, byte & (1 << 2) gets you another
@LucDanton Ah, I think you're misunderstanding me. I'm not talking about implementing ranges on top of iterators, because that's simple. I'm talking about implementing iterators on top of ranges- that is, for some arbitrary range r that meets your range concepts, producing iterators which act as iterators into that range for arbitrary iterator algorithms. If that's what you meant too then ignore what I just said.
@DeadMG Right now it's probably ill-advised to use iterator-oriented algorithms (and data structures, and programs really). Not because of the library or its implementation, but thanks to it (with tongue in cheek): one easily ends up with ginormous iterators because the library makes it easy and convenient to compose. But what you end up is what you want anyway!
indeed
melak47, I am not strictly working with C++ but
when I do 129 & (1<<1) it prints me 0
02:43
so ultimately, I think what I'm saying is that either you address the pitfalls of iterators- i.e., no ginormous sizes due to composition, permitting rvalues from non-input, etc, or you don't offer backwards compat with iterator-based algorithms.
So the 'problem' really is actually that past code worked under the assumption that an iterator is cheap to copy. There's no grand-fathering that: it's not true in actuality (88 bytes of iterator for zipping over two vectors? wut?), and it's not true in principle once non-trivial range composition comes into play.
@O0oO0oOO0ooO 129 & 2 == 0
@DeadMG Yeah, I'm trying to see if I can close 'holes' so that nobody has to resort to the latter.
hmm
However I'm not going to put 'remove iterators for good once they're only an invisible implementation detail' in my goals, it's waaaayy too far ahead.
02:45
I believe that it can't be done because the problem with iterators is inherently due to their over-generous design, too many interface functions, too many semantics. I think the source of the benefits of ranges is directly derived from not offering backwards compatibility.
@Rapptz but 129 & 3 == 1
Okay.
it is suppose to be 0
= /
@DeadMG It's not compability. It's an implementation technique.
@O0oO0oOO0ooO ?_?
02:45
hmm
Okay I think I've got it.
intuitively, it's easy to say "Implementation is implementation's problem", but I think that some algorithms have proven that it's, a) a real problem, and b) that iterators are that problem.
129 in 8 bit binary must be 1000 0001
10000001 & 00000011 == 000000001
@Rapptz I'm sad to find there is no way to use std::ios::binary to do such a thing :( or im just too incompetent to find it
02:47
There is std::bitset
for example, I bet that a Wide range "View a UTF-8 input range as UTF-16" range would be vastly easier to write and test than an iterator version
I'm working on two sides of a coin: on one side I have 'a range is begin/end over a pair of iterators'. It might not look like an improvement but I can code against that. On the other side I have 'a range is either something in range/source/, or it's the result of using something from range/composite/ with one or more range'. If I can definitively 'close over', then the former disappears.
sorry; remind me what "close over" is
02:49
If you take an alphabet A = {a, b, c, ... } and close over with the operation a . b = ab then you get A*, i.e. all words over the alphabet.
so if you can produce all useful ranges strictly with the latter, you no longer need the former
So I use iterators to implement e.g. zip and so on, but zip and so on are the interesting bits of any use.
anyone can answer my question?
Use std::bitset if you're bad at bitwise manip, I feel as if it makes it easy.
I guess that you could implement some totally dirty hacks like copying the range content out.
02:51
@DeadMG And right now I'm ensuring that the 'consuming' end of ranges, and not just the combining bit, is useful without iterators.
std::vector<T> v = range::to_container(r); doesn't leak iterators, neither does range::copy_to(r, ostream(std::cout)) and so on.
I think that it will be no problem to get by for your own code without ever having iterators except for range-based for, and calling into other people's iterator-based algorithms.
although I think that with polymorphic lambdas, range::for(r, [&](auto&& r) { ... }); isn't too unattractive.
(Btw I have to go back over my 'ginormous iterators' comments from earlier, I completely overlooked that debug iterators for std::vector start at 80 byte apiece.)
@DeadMG Oh, I forgot about range-for. FWIW I consider for an anti-pattern to an extent. An anti-range at least.
@Rapptz i don't have luxury of using all those nifty libraries =/
I agree.
if you recall, I argued against it's inclusion into the language in the first place.
02:54
@DeadMG I'm pretty much unlikely to ever forbid range::map(r, f) to do wild stuff, as long as the user knows what they're doing. That would be missing the point of using an impure imperative language.
E.g. right now it calls the functor non-const unless it has to, so it can modify itself or the world which includes the input range or the range itself being mapped and so on.
I found a surprising use for hashing functions taking non-const arguments recently.
As I've said, the most natural thing, which is producing a range of [f(item)...] for each item.
@DeadMG Ew.
ah, you'd probably argue that it should really be a case for mutable (it was just a hash cache)
likely!
range::adapt is too unspecific. I'm tempted to have std::vector<T> v = range::copy(r); and range::copy_to(r, back_inserter(v)); and ditto move.
eh, I'd be fine with copy(r) and copy(r, output) to be overloads
02:59
Good point! I was annoyed that copy was shorter, which might suggest it's the 'default' thing to use. Except that auto v = range::copy(r); may be surprising for what I think ought to be a plain, surpriseless operation.
I have a range thing but it blows. :<
@LucDanton No auto overriding in the language is a bitch.
@Rapptz Anything to do with Python?
Yeah it follows Py2 semantics
Told you I'm a psychic.
03:01
Well, I've never used Boost.Range so I don't know why it sucks.
I also don't know why you guys dislike iterators.
The end iterator is useless. But I still have to write code for, around, and against it.
What do you suggest?
No end iterators.
What would other things return to mean "invalid pos"?
optional?
That's a different question. What I said is why I dislike iterators to do a range's job.
03:03
the issue isn't why iterators suck, there are plenty of reasons
Well not really -- it's relevant because it's a current use case for end iterators.
that's kinda like asking why C arrays or raw new suck, it's well-known and infinitely rehashed and it's 4am here
@Rapptz Iterators are clumsy. Since you also need two separate items, it's impossible to have a function return what you need, so chaining things together to do filtering and such is essentially impossible.
the question is what we're going to do instead
(I'm indifferent to iterators to be perfectly honest)
03:04
speaking of which
@JerryCoffin I don't follow.
it's 4am
@JerryCoffin So you "pack" them using ranges, right?
@MarkGarcia Er, no.
the lack of composition is just the most frequent problem.
there are several others
@MarkGarcia Maybe. Depends where the items reside.
03:05
Hm.
Oh. I just got the C++ bronze badge. :)
Replacing all begin()/end() pairs by actual std::make_pair(begin(), end()) pairs doesn't improve the situation much.
Got to learn from Boost.Range then.
@MarkGarcia It's fine to use, but it doesn't help e.g. with writing new kinds of range compositions. It also comes with few compositions of its own.
@Rapptz A function can only return a single item, but an algorithm takes the begin and end iterators as two separate items. You can't get a function to return those two separate iterators.
Non-issue because tuples
03:11
@MarkGarcia That's pretty much what Boost range does -- its version of Range (itself) isn't much different than std::pair<iterator, iterator>. That helps some things, but not quite a bit else (e.g., it's still easy to do `std::make_pair(a.begin(), b.end()), and get a completely invalid range.
Well, for "basic usages", it sure will suffice.
I would have thought zipping is basic :v
As well as concat_map. Well, 'primitive' might be a better epithet.
@CatPlusPlus You can mash two together into a tuple, but that doesn't help all that much. With a conventional algorithm that expects iterators, you still need to take them apart and pass them individually to the algorithm. You can do it, (with or without tuple) but leads to ugly, clumsy code that spends a lot of time putting things together and taking them apart, which obscures what you're really trying to accomplish.
When I tried to do zipping I had issues with it
yiz
yiz
how does anyone think of static async functions?
03:14
I'm just saying that returning more than one thing from a function is not an issue
Not questioning that ranges are better
@CatPlusPlus From that perspective, it quit being an issue long before std::tuple was invented -- you could do it in C by returning a struct. Problem is that in this case, it doesn't accomplish much by itself.
Struct is a tuple :v:
@CatPlusPlus tuple is an ad hoc struct.
I find tuples more fundamental than struct/records
@DeadMG Hah, another situation where the copy name is problematic: assuming I keep range::move(r) for a range which items are moved-from items of r, then you'd write std::vector<T> v = copy(move(r));. Kinda daft, no?
auto v = range::convert_to<std::vector<int>>(r);, so that the user properly feels dirty when doing that.
03:27
> 0xC0000005: Access violation writing location 0x00000000032D3968.
when I add that pointer to my list it's valid, when I retrieve it from the list it's not.
Spent a week working on getting a good user experience from a third-party hardware accessory; looks like their software bugs may be covering up their hardware bugs >_>
03:53
@melak47 It probably points to something that dies in the meantime.
yeah :/
The more I do C++11, the less I like const&. Aliasing and lifetime considerations are not cheap.
But move constructors are.
I've been avoiding reference parameters since I started my last job and had to explain why I was using them
Passing copies seems to work just as well (until it doesn't)
what's a good creative career in computer science?
@Crowz Game programming.
04:06
@crowz robotics
@rvalue that sounds terrifyingly difficult
@Crowz The bugs can be way more fun, at least.
@DeadMG Wow, I must thank you again for that earlier discussion. Something just went click in my head. I'll look into it!
Time to write concepts.
@Crowz Computer Science these days is almost entirely software, which leads to pretty much "Business" or "Entertainment"; the actual segment you want to go for depends a lot on what you mean by 'creative'
04:35
@rvalue is there anything computer-science-y working with film?
@Crowz Quite a bit, from visual effects and compositing to encoding and distribution, and that's not even getting into the publicity side.
@rvalue Visual effects? I wanna do that!
@Crowz Good choice ;-)
Essentially, there are a handful of established products for any particular aspect of film effects; and the main CS entry points to these are either in software development for the distributors, or effects development for the users.
i.e. working with people like Autodesk to make their software (or building your own), or dealing with the visual effects artists and creating specific plugins, tools, and shaders for their use
There's a big cross-over in the technology for games, as @MarkGarcia said, btw.
If you're specifically interested in film, I'd suggest getting to know the complete production process and trying to spot your opening.
It could be you have a great idea for an app that does lighting design, or finding problems with soundstage reverb, or...
05:06
okay what's a good non-fiction type science show? Brain stuff especially good
I didn't know they made those...
Does Mythbusters count?
05:23
> error| 'delcval' is not a member of 'std'
Nice typo.
I had my first bug which was probably caused by usage of auto.
I captured an object which I thought was a future<void>, but actually was a future<future<void>>
And called .wait() on it.
And I spent hours figuring out why it didn't wait until operation was complete.
Xeo
Xeo
@LucDanton istreamstring
@StackedCrooked Ha, join. :D
05:44
Quick attempt at implementing join. Failed.
I don't really understand the error though.
Oh, this works. (Doesn't work for void yet.)
06:08
@Xeo < insert meme here>
o_0 you have to see GB's intro @xeo, brace your self for madness though :P
@Xeo I would expect std::async(_); to fail because it tries to make a copy.
Ah, but decltype(f) is actually std::future<std::future<int> >&&
Xeo
Xeo
Hm, I'm actually making a lot of assumptions in that code... that's bad.
Xeo
Xeo
06:38
anyways, off to work~
Or not, I forgot they changed the time the busses go
06:59
Do you guys understand CriticalSections in the WinAPI?
Xeo
Xeo
07:18
Yes, but we won't tell you.
@Xeo sounds like Microsoft
07:36
It's a critical section
more like a section that is critical
This is very much what it is like when your password is constrained by loads of stupid Rul35
5
In java synchronous{} stops everything but critical sections don't seem to do that in Windows. Furthermore, I don't understand why the separated the lock and unlock part of the lock.
07:53
so... my friend sent be a link to an album... sfw
fuck. ---strike--- doesn't work on SO
Do <strike></strike>
@Abyx you've added it as a code
Bit verbose though.
08:06
@Rapptz yep, I found it
it's stupid to have different syntax =\
Yep.
@GManNickG Good advice, I shall follow that. Thank you!
Xeo
Xeo
oooh, @GMan was here again?
He should be here more often. :(
08:39
What is the reputation supposed to mean, here on SO?
@Jeffrey trustworthiness, but also just brownie points.
How to get other PC's MAC address?I found the command "arp -a" does well,where is the code?
Xeo
Xeo
08:54
> I don't think you know who you're talking to, The Dennett also knows everything. :)
lol
sbi
sbi
Good morning, folks.
Hi.
End of sabbatical?
sbi
sbi
What do you men, "sabbatical"? Wouldn't that word imply, um, relaxation?
Who is Mr. Karabasov?
09:09
@Potatoswatt That code does't work for widnows.HELP: How to get other PC's MAC address?
sbi
sbi
Have you tried "windows", rather than "widnows"? You never know...
user142019
Even better, try "Windows".
Or Windowsâ„¢.
user142019
Switch to Gentoo.
user142019
Also maybe that program compiles with Cygwin.
09:15
greetings
I have been sick since yesterday, and when you're sick, life is very boring without the Lounge.
user142019
@FredOverflow You came out of your cave!
sbi
sbi
7 mins ago, by sbi
Who is Mr. Karabasov?
@rightfold How long was I in?
user142019
@FredOverflow Since May 15. Singletons took your place.
Just three weeks? It feels like eternity :)
09:18
Holy crap @Sbi used a meme
sbi
sbi
What?
better a meme than a muumuu
user142019
muh ehme-eh.
sbi
sbi
10 mins ago, by sbi
7 mins ago, by sbi
Who is Mr. Karabasov?
morning
user142019
09:29
Hello.
@sbi a Russian, probably.
sbi
sbi
@Abyx Or Urkrainian. Yeah, I knew that much.
@sbi it would be Mr. Karabasko if he was Urkrainian.
so sbi are you rejoining us on a more regular/permanent basis?
or just happening to show up more than one day in a row by coincidence?
sbi
sbi
@Abyx Maybe he could be an Ukranian with a Russian name?
@DeadMG Um. I had a lot of time those last four days while I was waiting for data to transfer from my old machine (which was a new model) to the new one (which is an old model), which is why I was here, um, more than usual. I am not sure how long this is gonna hold, though.
09:35
@sbi maybe. who is he, anyway?
sbi
sbi
9 mins ago, by sbi
10 mins ago, by sbi
7 mins ago, by sbi
Who is Mr. Karabasov?
Why are you asking me?
user142019
sbi
sbi
Ugh. Anyone got a hanky handy? My eyes are bleeding.
that doesn't sound healthy
it sounds creepy. did you catch an alien disease and all we shall die?
09:41
I feel like I have an alien disease
sbi
sbi
We think you are an alien disease.
you are an alien disease.
yup.
is exactly what I would have said if I had focus on the chat
sbi
sbi
09:42
@Xeo The only good noob is a silent noob.
@Kivin I'd think: "Game developers. Really. Who else?"
@JerryCoffin I wouldn't qualify this with "usually", but otherwise...
@TonyTheLion You are easy to please, that's why.
@Xeo So do we. It's a great tool.
Xeo
Xeo
Mmm, my coworker just mentioned that he needs to "get rid" of two of his four rats - damn, this is tempting.
Just got a C++ syntax proposal idea:
struct s : base {
    int some, aggregate, fields;
    s( ... ) = default;
    /* equivalent to:
    s( int a = {}, int b = {}, int c = {} )
        : some( a ), aggregate( b ), fields( c ) {}
};
sbi
sbi
@MartinJames I almost always fancy a beer. Unfortunately (as @R.Martinho knows), I don't always have the opportunity to enjoy a beer. So What time are you talking about?
Yea nor nay?
sbi
sbi
@Xeo I thought you just got rid of a little brother to watch over?
09:47
the main issue here is uniform initialization.
@sbi Isn't there a magazine for bear fancy?
the proponents will argue it's wasted because s { 1,1,1 } already does what you want.
sbi
sbi
@Potatoswatter How would I know? I don't fancy magazines about beer.
@DeadMG Only for aggregates. I want to restore aggregate initialization for non-aggregates, where the equivalent constructor would still work.
user142019
Hmm.
sbi
sbi
09:49
@R.MartinhoFernandes See here: spiegel.de/international/zeitgeist/…
Actually it would be better to have it implicitly define a series of separate constructors, not to use default arguments, so as to leave members default-initialized not zero-initialized.
btw, recently I often use [&](...){ statements; } for callbacks when I don't need its arguments
Xeo
Xeo
Bad idea
ewwwwww don't do that!
@sbi Well, I arrive on 11th, goto gig with robot on 12th late, leave late-ish 13th, so I have plenty time free to fit in. All playee, no workee, for meee :)
09:50
what if the argument is non-POD?
Xeo
Xeo
... requires triviality
bam UB
A compiler upgrade might make [&](auto && ...){} kosher, though.
@DeadMG well, yeah. but fortunately they are always PODs
I'm not sure what the implementation is allowed or required to do when you use that.
Actually receiving a <varargs> list requires a preceding parameter.
The syntax (...) should be deprecated. IIRC it's a syntax error in C.
sbi
sbi
09:54
@MartinJames Given that I have to work, that's only two nights, one of which you'll be at a concert, IIUC. That leaves the 11th. Um. I might be able to get away after 8pm, but I'd have to organize that.
void f(...) is legal C, I think. You just can't ever access the arguments.
58
Q: What is the meaning of "... ..." token?

VitusWhile browsing through gcc's current implementation of new C++11 headers, I stumbled upon "......" token. You can check, that the following code compiles fine [via ideone.com]. template <typename T> struct X { /* ... */ }; template <typename T, typename ... U> struct X<T(U......)> // this line ...

> Cross-referencing with C99, it is illegal in plain C. So, this is most bizarre.
@sbi OK. If you can get away, I'll get beer :)
@DeadMG The issue is whether a comma is syntactically required before the .... It's easier to specify the syntax which disallows the nonsense.
Xeo
Xeo
@Potatoswatter Noooo!
I like that for traits :(
09:58
@Xeo SFINAE did make a good hack of it, but there's no reason to write traits that way any more.
Xeo
Xeo
Why not?
template< typename t, typename = void > struct my_trait : std::false_type {};
template< typename t > struct my_trait< t, decltype( something( t() ), void() ) >
    : true_type {};

« first day (963 days earlier)      last day (4211 days later) »