« first day (1663 days earlier)      last day (3284 days later) » 

2:00 PM
@rightfold The term is generic enough to apply to any sequence, regardless of meaning.
 
user1804599
OK.
 
I.e. it can even apply to invalid sequences.
 
Ell
What do you call the thing that UTF8, UCS-2, UTF16 encodes?
 
user3010322
code points?
 
Usually context makes it clear you are referring to only the well-formed sequences, but sometimes you have to make it clear.
 
user3010322
2:02 PM
I need a C++03 friendly SFINAE test that can test for a free function....
 
Why isn't everyone using UTF-8 as opposed to UTF-16 and UTF-32 for everything? It seems superior in every sense (compatible with ASCII and minimizes space).
 
Ell
@Jefffrey it's not superior for some scripts IIRC
it uses more space than necessary
 
@ThePhD Yes.
 
@ThePhD smells
 
@Ell It compresses just as well as the other encodings because it doesn't really carry more information. If you care about space, why are you not compressing?
 
user1804599
2:04 PM
@Jefffrey encoding and decoding UTF-8 may be more expensive than encoding and decoding UTF-32.
 
user3010322
@Jefffrey UTF16 exists solely to interop with old systems that jumped on the old UCS-2 bandwagon.
 
user3010322
E.g., Microsoft, IBM, etc.
 
@ThePhD Asia called
they want you on the phone
 
@BartekBanachewicz lolwut
 
user3010322
Until we exhaust the ~2.1million codepoint space we have (a limit that is there because of UTF16), UTF16 will continue to exist.
 
2:05 PM
@R.MartinhoFernandes all those funny non-letter things are apparently shorter in utf16, from what I heard
 
@ThePhD 10 millions.
 
Ell
Is there a limit to the number of codeunits?
 
1 min ago, by R. Martinho Fernandes
@Ell It compresses just as well as the other encodings because it doesn't really carry more information. If you care about space, why are you not compressing?
 
@rightfold I thought about that, but really, how much can it be? You are just checking if the current byte & 1000'0000 returns 0, for the first byte, and if that is, then you do another & and so on up to 3 times.
 
user3010322
@R.MartinhoFernandes 10? 21 bits, right?
 
2:06 PM
@R.MartinhoFernandes compressing in RAM?
 
user1804599
Also, if you need random access of code points by index and you need contiguous storage, UTF-32 is good.
 
user1804599
However I can't think of why you'd want that.
 
@ThePhD Ooops, sorry, 1 million.
 
user3010322
Wah. Why 1 million?
 
Ok, random access seems more like a pain in the ass. I'll give you that.
 
user3010322
2:06 PM
Is one of the bits in the 21 codepoint bits reserved or something?
 
user1804599
Weird protocols perhaps.
 
@BartekBanachewicz The KJV Bible requires a whopping sixteen megabytes of memory in UTF-32.
 
user3010322
Why is it not surprising that my UTF8 XML files are bigger than the KJV Bible. :v
 
@ThePhD Because of the way the code point space is structured.
 
Exhausting the Unicode pool shouldn't be easy, granted we stop adding characters like PILE OF POO.
 
2:07 PM
@R.MartinhoFernandes changing you emails around again?
 
user1804599
Also, don't use UTF-8 if the requirement is that you are not backwards-compatible with ASCII!
 
@ThePhD The highest code point is 0x10FFFF.
 
user3010322
@R.MartinhoFernandes Oooh. Right.
 
@rightfold lolwat
 
@rightfold Ok, but UTF-16 takes the worst of both UTF-8 and UTF-32
You can't have random access either, and you are taking more space than necessary.
 
2:10 PM
@BartekBanachewicz Seriously, the amounts of text you need to have in RAM at any point are not large enough to worry about in pretty much any process.
If you have archive-sized amounts of text, you'll be storing it on disk.
@Jefffrey Random access is not necessary.
 
@R.MartinhoFernandes So what's the deal with UTF-16 and UTF-32?
 
UTF-32 is merely the trivial encoding from ISO10646 (aka UCS-4), and UTF-16 is a historical migration path from UCS-2, which was the trivial encoding from Unicode 1.0.
 
Also are you saying that random access is not necessary because any given code point in isolation doesn't really tell you much because it could depend on previous codepoints in the sequence.
 
@Jefffrey Because there are almost no text manipulations that actually need random access.
 
2:16 PM
No one actually uses wide characters on Linux, though.
 
That might be because the interface of std::basic_string requires random access?
 
"widely used" is a bit... wrong.
@Jefffrey std::string is just a low-level primitive in this context. Random access makes sense there because you need it for manipulations at that level.
Well, not quite "need", but it's not completely useless.
op[] is kinda useless, but the random access iterators aren't.
 
Right, but if wchar_t was in UTF-8, then std::basic_string<wchar_t> would be difficult if not impossible to implement correctly.
Correct?
Or even just wchar_t[N]
 
No. std::basic_string provides a container for a sequence of code units.
It is about as hard to implement as std::vector.
 
@R.MartinhoFernandes You should work on Ogonek again.
 
2:19 PM
@R.MartinhoFernandes Oh. I see.
So, sizeof(wchar_t) for wchar_t as UTF-8 would actually always be 1?
 
Can I post an image that will link to an article?
 
@Jefffrey Yeah.
> The strings library provides us basic_string, which is merely a sequence of what the standard calls "char-like objects". I call them code units. If you want a high-level view of text, this is not what you are looking for. This is a view of text suitable for serialization/deserialization/storage.
96
A: How well is Unicode supported in C++11?

R. Martinho Fernandes How well does the C++ standard library support unicode? Terribly. A quick scan through the library facilities that might provide Unicode support gives me this list: Strings library Localization library Input/output library Regular expressions library I think all but the first one provid...

 
Bah.
 
You might want to read that, or at least part of it.
 
user3010322
I like how love is like there's a fire in your chest.
 
user3010322
2:22 PM
And how depression is like you're made of Ice.
 
user3010322
Hahahaha, pride is all in your head and chest.
 
user3010322
(But not in your pants, HIIIYOOOOOOOOOO.)
 
user3010322
Shame, right in the cheeks.
 
user3010322
Surprise is like an uppercut.
 
2:23 PM
@wilx lol Shame looks like Spiderman
 
user3010322
Disgust, like hot vomit in your throat.
 
@AndyProwl lol, it does.
 
user3010322
@AndyProwl Sadness is like Venom.
 
@ThePhD I don't know that one :(
I'm quite ignorant
let me google it
 
user3010322
 
user3010322
2:25 PM
Don't worry, I don't know the comic book lore either.
 
user3010322
I just know he exists.
 
11
Q: static_assert dependent on non-type template parameter (different behavior on gcc and clang)

bolovtemplate <int answer> struct Hitchhiker { static_assert(sizeof(answer) != sizeof(answer), "Invalid answer"); }; template <> struct Hitchhiker<42> {}; While trying to disable general template instantiation with static_assert I discovered that the above code in clang generates the assert error...

 
@wilx Yeah, I know :|
 
I suppose this is a duplicate of stackoverflow.com/questions/14637356/…
 
@ThePhD it also resembles carnage
 
2:25 PM
can someone confirm?
 
> Venom is a symbiote, a sentient alien, with a gooey, almost liquid-like form
 
@R.MartinhoFernandes I see.
 
user3010322
Fear is most intensely felt in the heart.
 
probably so you can get heart attacks
and die
because fuck nature
 
2:27 PM
uh it is not, sorry
 
@wilx Yeah. I'm rather busy with all sorts of things like traveling and wooing girls and getting my drunk friends home.
 
@R.MartinhoFernandes :D
 
user3010322
Well, to be fair,
 
@MarcoA. it is not what
 
user3010322
the heatmaps are self-colored.
 
Xeo
2:28 PM
@R.MartinhoFernandes " "ß" uppercases to "SS" but tolower can only return one character code unit." - I think you meant toupper there? :P (although both apply)
 
Stack Overflow is now experiencing a DDoS attack. We are working to mitigate.
 
user3010322
So, it's not as if they're actually measuring emittance (of any kind (is that even a word?)) from certain place.
 
user3010322
These people are just coloring things in themselves.
 
user3010322
The good news is, they used hundreds of peoples and from different cultures. West Europeans and East Asians seemed to color things in the same.
 
user3010322
2:31 PM
Ugh.
 
user3010322
void* iterators.
 
user3010322
I'm just going to cast them to unsigned char*.
 
@AlexM. what I thought
 
@MarcoA. ooh
I thought you referred to the heart thing
you should normally be able to @ your own message w/o weird hacks
meh
 
user1804599
@Feeds Excellent.
 
2:40 PM
the fact you have to explicitely pass things as const ref in C++ is a freaking joke
 
who would DDOS SO?
 
I'm just hitting the f5 key waiting on an answer....
 
@ThePhD is there such thing as a negative char?
 
user3010322
@nick Yes?
 
user3010322
char is a "character type" that is signed.
 
user3010322
2:42 PM
signed char is not the same as char
 
user3010322
unsigned char is different from char and signed char.
 
is there such thing as a character anyway, or is it just the program you're using interpreting the numbers however it wants
Lounge<Philosophy>
 
@ThePhD ah, makes sense
@AlexM. i shall ponder this question
 
How do you call the amount of possible rotation of a car?
Like when a car turns left or right it has a specific angle of turn and it can't be shorter.
 
@R.MartinhoFernandes After years of contemplating things, I've decided that the real problem here is less C++ and more Unicode. Rather than providing a meaningful abstraction to represent the concept of a "character", Unicode actually reduces the level of abstraction below where it started. For example, rather than making a decision about whether an accented character is one code point or two, it leaves it to us to deal with both possibilities, all the time.
 
2:46 PM
does "CD3" mean something was accepted into the standard? I think not
 
"radius of curvature"?
 
This is just bad engineering.
 
@Jefffrey maximum steering angle?
 
user3010322
@JerryCoffin That always irked me. Greatly. :/
 
user3010322
2:47 PM
I still wonder why they decided to use both.
 
multiple possibilities at the same time.. sounds like quantum physics
 
user3010322
I think the reason I came up with was something about being able to "pepper on" or "add" things like accents or marks to whatever letters by just "inserting" the marking codepoints wherever needed.
 
user3010322
But that sounds like a silly reason.
 
user3010322
Maybe they did it for back-compat.
 
There are algorithms for reducing those combined characters to several normal forms though, aren't there?
 
2:49 PM
@ThePhD I'm pretty sure that at least played a part. Still poor reasoning, IMO.
 
user3010322
@AndyProwl Lol, several.
 
There's like 4 of them no?
or more, I don't remember atm
 
@AndyProwl Yes.
 
user3010322
NFKd, NFKc, NFC, and... one other I think.
 
@ThePhD nfd, nfc, nfkd, nfkc.
 
user3010322
2:51 PM
the k is for like Canonical or something.
 
So having different (combinations of) code points for the same character should not be such a serious issue for practical purposes: you can just normalize to the normal form that's more convenient and manipulate the normalized code points
@ThePhD Yeah
@ThePhD No wait
K is for compatibility IIRC
 
user3010322
Oh.
 
Ell
@Jefffrey minimum turning circle?
 
user3010322
Righty-o, then.
 
Ell
@JerryCoffin you forgot mmmKFC
 
2:52 PM
That's an abnormal form
 
@JerryCoffin Yes, you've said that countless times.
 
@R.MartinhoFernandes He's getting old.
 
@AndyProwl There are two more, but they're specific for certain algorithms.
 
All right, I had some reminiscence about more normal forms existing but didn't remember the details
 
@EtiennedeMartel I must be--although I've probably said things that hinted in that direction before, I thought this was the first time I'd come out and stated it anywhere close to directly.
 
Ell
2:54 PM
Kentucky Fried Normal Form
Northern Friend Kentucky chicken
 
I don't see how any of that excuses C++, though.
 
@AndyProwl There's a bit more to it than that. Just for example, you're supposed to use different normal forms for different purposes, so a single program could easily end up converting from one form to another to another on a semi-regular basis (and each of these being an O(N) operation on potentially large amounts of data, and many of them requiring ancillary data that's potentially a lot larger still).
 
That sounds like choosing the worst possible implementation.
 
user3010322
I wish decltype SFINAE wasn't only partially supported in VC++. =/
 
Normalization is only really needed for a few particular manipulations and many of those don't care which form is used.
 
user3010322
2:59 PM
Finding C++03 SFINAE for all these traits involves macros and tears.
 
Man, Paul Simon's Graceland is fucking great.
 
@R.MartinhoFernandes I haven't said (nor do I believe) that any of it excuses much of anything (C++ or anything else). At the same time, I do think it would be drastically more productive (for everybody) to work on developing a decent character standard, rather than trying to have everybody on earth jump through the flaming hoops defined by Unicode. While some of those reflect real language complexity, others are purely an artifact of the current standard, and could well be eliminated.
 
Ell
@EtiennedeMartel I saw him live a couple weeks ago
or maybe longer
it was awesome
 
Ell
he was with sting
they played together also :P
it was really great
 
Ell
@LightnessRacesinOrbit pretty silly of them and of her really :P
 
They didn't specify a limit, it's their fault.
 
Ell
I agree that it's their fault
 
@EtiennedeMartel Yes if you look at it according to the letter of their agreement, but it's also extremely clear that she took the piss.
Whatever happened to common sense?
 
3:09 PM
Actually they must have ordered a lot more stuff than what's listed there, unless I'm very bad at maths
 
I hate that we live in a world where you have to use legal language every time you offer something, and this dappy woman just made that world a little worse.
@AndyProwl Yes... the breakdown is explained later on in the article.
 
Ell
@LightnessRacesinOrbit I agree with this also
 
@LightnessRacesinOrbit You mean this part: "While at L'Atelier de Joel Robuchon, Ms Yap and her mother enjoyed four glasses of champagne, [...]"?
 
Looks like they spent £263 on champagne
 
@EtiennedeMartel Who cares. She was a complete dick.
 
3:10 PM
From the prices given that doesn't seem unlikely
 
Yeah, well, Audi drivers.
 
@EtiennedeMartel :D
 
Ell
@EtiennedeMartel haha
 
> Etiquette expert
 
Ell
Why aren't there function_traits in the stdlib?
 
3:12 PM
Also, 20,000 £ for a second-hand car. Fucking hell, She can probably afford the other half of the bill.
 
@Ell Why would there be?
 
Ell
@EtiennedeMartel it doesn't matter if she can afford it or not
@R.MartinhoFernandes cos it's useful :D
I want to get the return type of a lambda
 
@Ell Try again.
 
Ell
Because a lot of people would find it useful?
 
They're wrong.
@Ell There is an unbounded number of lambdas for which that is not possible.
 
3:14 PM
#NotAllLambdas
 
@Ell Do you need something like function_traits<Signature>::return_type?
@R.MartinhoFernandes Why? What's wrong with having a trait that takes apart the components of a signature and lets you inspect them?
 
@Ell Beyond that, lambdas are not special, and if you frame your needs in terms of them, you're wrong.
 
Ell
@R.MartinhoFernandes well, it just so happens that it's a lambda this time
I meant generally for function types
@AndyProwl I just realised I don't any more in this case :P But I have needed it before
 
@AndyProwl It's not particularly useful :P
It all starts with the fact that save for one degenerate case, all callable objects in C++ can be called polymorphically.
 
Yay KDE Plasma 5.3!
 
3:18 PM
@EtiennedeMartel Audis are expensive
 
Working with vectors in clojure is just impossible.
Every fucking function converts back to a list.
Why.
 
I use gnome, it's the best of the worst
 
user1804599
No, it doesn't.
 
@EtiennedeMartel Maybe she could before she went and spent £20,000 on a second-hand car.
 
user1804599
They convert it to lazy sequences.
 
3:19 PM
Whatever they convert to is not a vector.
 
user1804599
Use Scala.
 
@Ell For each lambda for which that is not possible, there is an unbounded number of callable types for which that is not possible!
 
Today I fixed a bug in my promotor's "C++" program.
it took me less than 10 minutes.
Granted, the guy that told me about it did succeed in providing a test case and enough information.
 
Ell
@R.MartinhoFernandes Like what?
 
But I mean, I navigated a hellish, unknown codebase, and bam, fixed something.
 
Ell
3:21 PM
what callable can't you determine from? unless it's a template
 
Well, "fixed". More like put a bandaid on a rattling engine.
 
user1804599
Templates.
 
@Ell Well, that's a lot of them already.
 
Still proud of myself.
 
But there are overloads as well.
 
Ell
Oh yah
 
@rubenvb What is a "promotor"?
 
@LightnessRacesinOrbit I think the title is wrong
 
@AndyProwl rude
 
Just my opinion
Although they do look cute in other pictures
 
3:23 PM
@AndyProwl But then, assuming you get that information, what do you do with it?
 
@LightnessRacesinOrbit supervising academic person for a (PhD) thesis.
 
hum I can't forward declare a set of types with an inheritance heirarchy, can I
 
So kinda my boss but not really.
 
:(
@rubenvb ok supervisor
 
Ell
3:25 PM
@R.MartinhoFernandes use it to allocate storage for parameters in my case :D
 
@LightnessRacesinOrbit yeah. That's the term.
 
> java.lang.NullPointerException
Nice. I love dynamic languages.
 
@R.MartinhoFernandes It depends. I found the need for it here for instance, and also elsewhere
 
> A handler with N parameters is invoked if and only if the types of the first N arguments to fire() match exactly the types of the handler's parameters, with no implicit conversions being performed
 
Yes, that's a limitation
 
user3010322
3:28 PM
function_traits are useful for when you have a scripting system and you'd like to iterate over args / return types to go to and from that system.
 
And that's why it's a poor use case and why putting it in the standard should be discouraged.
 
user3010322
But other than that...
 
re
 
user3010322
mi
 
That's not the only use case. Inspecting the components of a signature is a fundamental (meta-)operation that can be done on signatures. The fact that it is not possible to always extract a non-polymorphic signature from a callable object is a separate issue.
 
3:30 PM
@Ell What are you writing? If you have the parameters available the functionality you need is already in the standard.
@AndyProwl "that can be done on signatures".
12 mins ago, by R. Martinho Fernandes
It all starts with the fact that save for one degenerate case, all callable objects in C++ can be called polymorphically.
void(*)(void) is the degenerate case.
 
Ell
@R.MartinhoFernandes open multi methods library version
 
@R.MartinhoFernandes Ok, non-template signatures
 
Too tired to double check my answer in case I wrote stupid stuff: stackoverflow.com/a/30080375/1938163
 
@AndyProwl signatures
 
if anyone wants, feel free to take a look at it and/or repost.
 
3:32 PM
@R.MartinhoFernandes I don't understand
 
Let's all write a generic system which threat all data the same way. and with some NoSql !
 
void(int) is a signature. struct foo { void operator()(int) const; } x; isn't; it's just an object.
 
@R.MartinhoFernandes So?
 
It can be called polymorphically and fulfill an unbounded number of signatures.
 
void(int) is a type, and extracting the components of it is a meaningful basic operation on that type
 
3:33 PM
@AndyProwl That's not what @Ell wanted, though.
 
the fact that obtaining the signature(s) of interest may be impossible is a separate issue
 
Ell
I have actually changed my requirements
I just need to look at the parameter types I think
 
user3010322
I had a question open before about free function SFINAE...
 
user3010322
And then I lost it. =/
 
@R.MartinhoFernandes I understood he wanted a function_traits thing, and I assumed it was something that takes a signature and defines type aliases like return_type, parameter_types, etc.
 
user3010322
3:34 PM
Why am I so bad at this.
 
21 mins ago, by Ell
I want to get the return type of a lambda
 
Ell
@AndyProwl I'm probably causing confusion in this
originally I wanted the return type
but then I realised I didn't need it half way through
 
user3010322
Everything uses decltype SFINAE.
 
user3010322
Some people even answer about concepts.
 
user3010322
How is this useful to me now. ;~;
 
3:36 PM
morning
 
user3010322
Uh
 
user3010322
Did ideone go down?
 
user3010322
Also morning.
 
Afternoon'
 
user3010322
Shitty MFers not using coliru.
 
3:37 PM
@R.MartinhoFernandes OK, however if the lambda is not generic, decltype + function traits would let him to that
 
user3010322
Using all of that inferior liveworkspace and ideone GARBAGE.
 
@Tony Did you died again
 
@AndyProwl Yes, but again, that's a really poor motivation for having such thing in the standard.
 
explicit specialization 'void purchaseItem<Sword>(Player &,Sword)' is not a specialization of a function template
what does that mean? im following the SO question, but it still gives me errors
 
user3010322
EVERYTHING USES DECTYPE DwajdwadhwajdWAdhwajdahwdjkwad
 
3:39 PM
@ThePhD What are you trying to do?
 
@R.MartinhoFernandes For me the motivation is that it's a fundamental operation that can be done on a type (by "fundamental" I mean "basic", not "often reached for" or "unavoidable").
 
user3010322
@R.MartinhoFernandes Detect if this free function is callable / compilable with Args...
 
user3010322
Specifically, if I can have adl_begin( T ) compile with this thing.
 
Doesn't result_of do that?
Oh.
It's an overload set.
You're screwed.
 
user3010322
There's actually only one adl_begin.
 
user3010322
3:40 PM
There are multiple begins, though, but that's what adl_begin is supposed to handle.
 
@ThePhD Well, then just copy what it itself does?
 
@R.MartinhoFernandes if he's a nail it's ok then
 
If it doesn't SFINAE anything itself, there's no way you will be able to do what you want.
 
@ThePhD isn't adl supposed to handle multiple begins?
 
@ThePhD frep posted a snippet some time ago showing how to find the address of a function in an overload set that would be called given some argument types, maybe you could use something like that?
 
user3010322
3:42 PM
The adl_begin doesn't SFINAE, it just... fails, if it doesn't work.
 
It used his constexpr black magic though so I don't know how that would work on VS
 
user3010322
(It's just using std::begin and then calling return begin( thing );)
 
@AndyProwl I usually save "fundamental" to mean that it is necessary to build the other features and cannot be built using only other features.
But yes, it's basic and is done by simple pattern matching.
 
@R.MartinhoFernandes What other features allow you to get return type of a non-polymorphic lambda, though?
 
Every time I've done that sort of breakdown thing, I've done it with pattern matching, and wouldn't change that to function traits at all.
 
user3010322
3:43 PM
I can use std::result_of<&adl_begin<T>>, right?
 
user3010322
And then I can use result_of as my SFINAE?
 
@R.MartinhoFernandes That's how function traits would do it. It sounds like you've implemented function traits, just with a different name or in a larger context. SRP and stuff
 
@AndyProwl Oh that? It would exist only for its own sake.
 
user3010322
Let's try it...
 
@AndyProwl Sorry, I meant about just signatures.
 
3:45 PM
All right. I see your point anyway
 
Basically, I'll take an API that forces me to specify a signature over one that doesn't but only works with lesser callables any day.
 
Yeah, but how would you specify that signature?
 
user3010322
Shit.
 
If you can just provide it as void(int), then the API might still need to split its components, for whatever purpose
 
<void, int>
 
3:49 PM
if you an only specify it as void, int then the burden of splitting it lies on you - in case you get it e.g. from an instance of std::function
 
@AndyProwl I find doing that with pattern matching superior because it ends up with less cruft.
 
@R.MartinhoFernandes But the signature traits would do just that. It's a basic operation that can be done in pretty much just one way and it's sometimes needed. Why not having it as a standard trait?
 
@AndyProwl If that instance is an argument for sure you get a match for free.
 
@AndyProwl Yes, they do that, but using them is more crufty than just pattern matching and using the template arguments directly.
 
@AndyProwl Function types are weird. I’d rather we not encourage their use.
 
3:50 PM
@LucDanton oh, that. I get what he means now
 
@AndyProwl I wouldn't use it.
 
std::function<Sig> is a holdover from pre-variadic C++03. It’s an anomaly.
 
template<typename Ret, typename... Args> foo(function<Ret, Args...> f)
 
std::function<Sigheil> is a holdover from 1945
 
^ You meant this (ignore Cicada's message) by pattern matching right
 
Xeo
3:51 PM
@LucDanton It's a nice anomaly though :(
 
Even class foo<R(A...)> I find nicer. I use R and A in the code instead of typename std::function_traits<S>::return_type or whatever.
 
@AndyProwl DONT
 
lol
 
You even get variadic expansion in the package.
 
@Xeo No.
 
user3010322
3:53 PM
@R.MartinhoFernandes I like that syntax too, but the one time I tried to drop the parens I actually found out its not possible (to have both in the same context).
 
@ThePhD What?
 
user3010322
E.g. ...
 
Xeo
time to go home
 
user3010322
foo<R(A...)>( my_func );
foo<A...>( my_func );
 
user3010322
Where my_func is overloaded
 
user3010322
3:54 PM
Turns out you can't support them all. :(
 
Er, the last two don't make sense.
 
@R.MartinhoFernandes OK I think I see your point better now. I would have to think through it a bit more in order to add something relevant. My impression is still that traits on a signature are a meaningful thing and deserve to be in a standard library, but at the moment it's just an impression
 
@Xeo have a safe trip
 
Ell
I always use myclass<Ret, Args...> because I completely forget you can do myclass<Ret(Args...)>
 
TIL about enable_shared_from_this
 
user3010322
3:55 PM
@R.MartinhoFernandes Sorry, was only supposed to be 2!
 
@Ell It’s fine. Would you want to handle void(int[4]) const&& instead?
 
@Ell I always use the latter as a primary template, but then I leave the primary template undefined and have a specialization that matches Ret, Args...
 
user3010322
But, if you try to have both of those kinds of overloads that are able to pick out a function from an overloaded set using both of those syntaxes (one that drops the return type) because it actually creates an ambiguity in the standard.
 
user3010322
It's why I had to drop that resolution feature from sol.
 
@ThePhD Er.
That's bollocks.
 
user3010322
3:57 PM
It works on GCC but VC++ and clang++ "properly" fail the foo<A...>( my_func ) call.
 
It's an ambiguity in your code, no?
 
Sadly I still use function types in one place because I wanted to encode this-qualifiers somewhere. I don’t feel great about it.
 
Working with clojure is terrifying.
 
i.e. somehow I have any<invokable<void() &>> IIRC
 
user3010322
@R.MartinhoFernandes No, it's actually ill-formed to a function (not sure about templating on structs) that tries to deduce the various function types based on just the args alone while also having a function that takes the Sig style.
 

« first day (1663 days earlier)      last day (3284 days later) »