« first day (1630 days earlier)      last day (3543 days later) » 

12:00
how to be notified when one of my object is Casted to any type ?
by email or by SMS?
I neither know nor care.
no by an event
good day
@Marc-AntoineJacob you haven't posted any question related to such topic
12:01
how do you know
it's on your profile
also why would you want to get a notification when an object is cast? It doesn't make sense
@Marc-AntoineJacob ask questions on Stack Overflow, this is a chat room
no
to chat.
I want to prevent my object to be casted to another type
12:02
@Marc-AntoineJacob then write the code necessary to prevent such conversion
throw an exception if it is casted
but this seems impossible
@Marc-AntoineJacob ask on Stack Overflow
how to Know if it casted
ask on stack overflow
12:03
And then he spoke: "And by the power invested to me by the great REINTERPRET CAST, you shall now be known as INTEGER!"
3
@Marc-AntoineJacob types are available during translation, throwing an exception is bullcrap
inb4 20 downvotes
but I want to prevent a cast
@Marc-AntoineJacob read a book.
12:04
A book on C++
user1804599
std::future::get y u abort
I read so many books on that
is this guy LRiO or cicada?
Explaining to you why what you're trying to do makes little sense would probably take long
a book on not charging into other people's spaces and conversations and demanding that they help you.
@райтфолд Memory corruption?
12:05
no this is a joke
@райтфолд
whatever, let's just plonk the dude and resume our previous conversation
user1804599
no idea
@Marc-AntoineJacob no shit. The only question there is a c# one
user1804599
stack trace is weird
user1804599
12:06
#1  0x00007ffff6a489b8 in abort () from /lib64/libc.so.6
#2  0x00007ffff74f62b9 in ?? () from /usr/lib64/libcxxrt.so.1
#3  0x00007ffff777975c in std::rethrow_exception(std::exception_ptr) () from /usr/lib64/libc++.so.1
#4  0x0000000000409c49 in std::__1::__assoc_state<boost::intrusive_ptr<mill::Value> >::move (this=0x632680)
    at /usr/bin/../include/c++/v1/future:681
#5  0x00000000004098a4 in std::__1::future<boost::intrusive_ptr<mill::Value> >::get (this=0x7fffffffd840)
    at /usr/bin/../include/c++/v1/future:1159
@Marc-AntoineJacob o.O
user1804599
Hmmm.
@xeo tie up your laces and kick hard please
Xeo
Xeo
what
@райтфолд Seems like the code producing the value threw an exception.
12:07
@sehe ever thought of writing a BGL book? I'd buy it. — pbible 1 min ago
aw
@pbible Mmm. I'll do the Boost Spirit book first :) — sehe 32 secs ago
and future::get is rethrowing it, and you don't have an appropriate handler/it's noexcept, I'd have to guess.
wish I could watch video over RDP
user1804599
I see.
@Puppy can't you? seems b/w limitation then; maybe some direct3d shit needs to be disabled
user1804599
Ah, I know.
user1804599
I loaded the object but not its dependencies.
user1804599
12:10
So it can't find the global. :p
user1804599
Alright, now you can execute code at module load time in debug mode.
0
Q: Prevent an object to be casted to another type C++

Marc-Antoine JacobI have a question for a program that I'm programming in C++. I defined this class: #pragma once template <class T> class pure { public: pure(T const& attr) { this->attr = attr; } ~pure() { } T& operator=(T const& attr) { return attr; }...

here it is
why post it here? all you are going to do is insite more anger at your rude, impatient ways.
@Marc-AntoineJacob Removing the conversion operator should be the quickest way to notice.
no this is to "get" attr
instead of the instance of pure
My class pure<T> is a wrapper
@Marc-AntoineJacob what the actual fuck are you talking about
I have no idea what @Marc-AntoineJacob is trying to do in the first place.
thanks sehe
@FilipRoséen-refp Where do you go with the kids on a sunny day?
12:16
I think you get it right
I.e. XY.
pure<int> = 15;
like that
@sehe I can, it's just very laggy (only about 1fps or so)
int i = mypurevar;
so I don't have to write
@Puppy ah. bw then
12:17
@sehe Thanks, now I got that song in my head
int i = mypurevar.attr;
@Marc-AntoineJacob And you want that to throw an exception?
@StackedCrooked IDGI. Ahhhhhh that song
to prohibit casts
to OTHER type than T
12:17
Make it a compiler error. <whistles/>
@sehe hehe
MC Hammer
@Marc-AntoineJacob Yeah put that in the question.
@Puppy this is not your space and nobody's demanding anything. the only one being rude around here is you, with your curt "I neither know nor care" and summary "good day"
@StackedCrooked doooo doob doob doot, dub dub, dub dub....
The 'than T' part I mean.
12:19
TBH I think surprisingly many people do grok C++. Or Haskell, for that matter. — sehe 2 mins ago
@LightningRacisinObrit you go to the beach, and I was thinking of "sea front" - but I can't se the himor (honestly)
@Marc-AntoineJacob Your actual use-case doesn't happen to be something like this, right?
user1804599
Your right. Maybe one day I'll be one of them lol — pbible 35 secs ago
I think so too, at least the first part :)
Damn, I really hate being on this chat on my phone..
12:21
@FilipRoséen-refp I (heinously) can't see the tibor in that either.
@FilipRoséen-refp You're excused
@FilipRoséen-refp I would like you to stay. But if you really must go, then I understand.
That's what some politician's wife said yesterday
don't humor me.. @StackedCrooked
It gives him a himorrhage
@FilipRoséen-refp nobody said there was humour in it :)
12:23
What a Professional answer :
-2
Q: Prevent an object to be casted to any but one type C++

Marc-Antoine JacobI defined this class: #pragma once template <class T> class pure { public: pure(T const& attr) { this->attr = attr; } ~pure() { } T& operator=(T const& attr) { return attr; } operator T() { return this->attr; } private...

@LightningRacisinObrit :-/
someone get my question and answer to it like a pro !
:)
check out the simplicity
@райтфолд he fixed it. so now your comment looks silly
@Marc-AntoineJacob See what happens when you post questions in the site's question area?
@Marc-AntoineJacob Checkout the fact that you should have credited Luc 12 minutes ago.
12 mins ago, by Luc Danton
@Marc-AntoineJacob Removing the conversion operator should be the quickest way to notice.
@Marc-AntoineJacob so perhaps next time you will not annoy people trying to chat with your questions
12:26
I actually meant removing the conversion operator to T lol.
@Marc-AntoineJacob Do note, though, that sometimes it's perfectly reasonable to ask things in chat, when you do not have a fully-formed question yet but need someone to have a conversation with and explore some ideas. Just ignore the prats like @Puppy and @thecoshman who will give you a hard time over it. :)
3
the question is faulty, and the answer isn't that good
@LucDanton shhh we don't need to know
@Marc-AntoineJacob Indeed, sometimes I will downvote a question and encourage the author explicitly to go to chat because it's not ready for SO yet.
@FilipRoséen-refp Eh?
yes, the answer is sooooo goood
12:27
This gun be gud
@Marc-AntoineJacob Now you can’t do std::string s = pure<const char*> { "lol" }; or similar.
now I can do this
pure<int> i = 15;

cout << (int)i;
cout << (long)i;
Second one shouldn’t compile.
@LucDanton That is precisely what he wanted. What's the problem?
the cout << (long)i; don't work exactly what I want
12:28
@LightningRacisinObrit having struct A { operator char (); } and int x = A {}; never cast A to int, it is always being cast to char (through the user-defined conversion).
@LucDanton THAT'S THE POINT
@LightningRacisinObrit hence, the question is stupid - rendering all answers obsolete
@FilipRoséen-refp what??????????
you're not making any sense
the question is bog simple and the answer is clear. nothing wrong with any of it
the cout << (long)i; don't work exactly what I want
you're just jealous you didn't think of it first
user1804599
12:28
I feel good.
yes, jealous. I feel good now.
@LightningRacisinObrit the only conversion the code written in the answer would allow is that from pure<T> to T
what happens with that object of type T after said conversion is a different matter
it works
pure<int> i = 15;

cout << (int)i; //CORRECT
cout << (long)i; //ERROR
@FilipRoséen-refp Yes, that is what the OP asks for.
@FilipRoséen-refp Irrelevant.
@LightningRacisinObrit so then the snippet in the question is the answer to the question?
12:31
@FilipRoséen-refp What?!?!?!
no....
dude ur being dum
@LightningRacisinObrit he wanted his type to only be converted to T, which is exactly what the code in the question is doing. without any other overload of said user-defined conversion it will always go through that conversion, no m
NOOOO
it allow other cast !
because I don't deleted it
oh fuck, I edited the wrong message
lol, pastebin pro
12:33
@LightningRacisinObrit and what is (long)i semantically equivalent to?
Not complicated.
@FilipRoséen-refp Irrelevant.
@LightningRacisinObrit it is of relevance, which is why the question is stupid.
user1804599
Now I can implement check expressions and then I can start writing tests.
You're wrong.
Dude you're trying to make some high-falluting point about how the int you get can still be converted to a long. But I've demonstrated that the answer prevents that from happening automatically.
And that's all the OP needs
Period
@LightningRacisinObrit ... shit, are you really not getting it?
I'm out.
Yes, clearly, me and everybody else involved in that Q&A are "not getting it", as well as Coliru, and the OP
Only magical Sir refp truly understands!!
And now, to prove his point, he is ragequitting
Good stuff
some person downvoted my pretty good question...
@LightningRacisinObrit I didn't rage-quit, but I will leave you up to whatever you are doing
@райтфолд sad
@Marc-AntoineJacob Trolls. Ignore them. They are trying to make you sad, because they are sad themselves.
12:37
ok thanks have a good day :)
~You too buddy.
You are a shrink LRIO
At least he died doing what he loved.
RIP LRiO
we all saw that Alex
12:39
HOW ABOUT NOW
HA?
fuck, I should keep my mouth shut sometimes
@LightningRacisinObrit I think raightfold plonked you. I remember he posted his list
@khajvah isn't he a girl?
Don't know
12:45
@DonLarynx Bit flexibly defined.
@райтфолд weedooweedoowoop (like a sex machine)
18 mins ago, by sehe
This gun be gud
user1804599
Fuck, I forgot to document ne.
I'm a little turned off by oracle, all i wanted to know is what the implementation of a lambda expression is and i get this:

https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html
literally a 2000-word example u w0t m(9-1)
@DonLarynx It's java, what did you expect?
@LightningRacisinObrit Fuck you. Everyone knows it's "understands!!!1". Practice more
12:50
ol
OMG1
Hey, this is an unanswered question and it is very useful to other users of Stack Overflow. So remove your downvote if you feel oppressed. — Marc-Antoine Jacob 18 mins ago
I doubt the downvoters feel oppressed enough to undownvote that
@sehe throw rocks at me
lol
That's only going to, ironically, attract more attention
12:53
lol
@khajvah Yes, he did. I was not talking to rightfold, merely adding to the conversation started by his post.
use std::set::lower_bound and std::set::erase — Dieter Lücking 1 min ago
^ fucking answers in comments DIE
@LightningRacisinObrit i h8 that
time for cleanup again pantoona
@khajvah I didn't :(
@DonLarynx we hate 4chan speak. Also what happened to "h(9-1)"?
12:55
@LightningRacisinObrit I will leave the decision to tell you that to him.
@sehe "California's propositon 8 (the bill to make gay marriage illegal), as described by opponents of prop 8. Creates the word "hate" when read aloud. "
lol "hate" has nothing to do with it
where do they come up with these crazy illogical nonsense theories
liberals think so
12:57
oh. fcuk yeah; I just remembered that I have chocolate in the kitchen!
just a way to shittalk their philosophical opponents
how does that aid in social cohesion
idiot yanks
@sehe Ignorant twat! As originally defined, "idiot" meant an IQ from 0 to around 25. "Imbecile" meant an IQ from 26 to around 50, and "Moron" and IQ from around 51 to 70. IOW, a moron is (substantially) more intelligent than an idiot.
I really need to finish my libirc
@LightningRacisinObrit ironic
@JerryCoffin so is an ignorant twat anyone from 70 to 100?
@Mgetz Ignorance and intelligence don't correlate well at all.
@JerryCoffin eh....
@DonLarynx not really
Array.FindIndex is nice
13:08
I guess we can say that when he posted this he was pretty...
STONED
YEEEEEEEEEEEAAAAAAAAAAAAAAAAAAH
@LightningRacisinObrit where do you come with your rants du jour? your avatars? your pet peeves? your eternally aggravated persona? I suspect it has simiilar sources
lolol
nice one goat boy
the waitress at pizza hut yesterday was pretty
is this one of them practice sentences in your language course?
I don't need courses
I'm a natural
13:15
I'm a sillicon
you're @synthesized
haha, I made an objective c joke
'tis only natural, I wrote 20 mins of objective c, I'm basically a guru now
I didn't realize that 'bank holiday' would mean that my bank site would be down. I just hope the ATM's still work, else it will be a miserable Easter for me - no beer money:(
you can use any ATMs with your card
at least I know I can
I rarely get money from my own bank's ATMs because they're so damn far away
@AlexM. Yeah, but the bank DB must be up?
I don't think banks can just stop all activity like that
it would cause too much damage
13:18
@AlexM. To me, sure:(
no seriously use your card with another ATM and see if it works
A functional interface is any interface that contains only one abstract method.
@AlexM. I'm going down the town shopping later, so I have a wide choice to try:)
is it a Visa?
@AlexM. Yeah...
13:20
I think it works with any ATM because Visa makes the processing and just tells your bank to do stuff
@AlexM. We'll see.
I love using contactless payment, it makes things so much easier /cc @LightningRacisinObrit
thank god for it
@AlexM. Local bars/clubs only take cash.
I'm baiting LRiO, shhh :P
user3010322
Cash or bust.
13:21
@AlexM. Orite.. sorry:)
lol two weeks ago I went to McDonald's with a mate, and had to pay with the card
the chick there tilted the card thingy and told me to insert the card there
I did the contactless thing
she looked at me with a confused face
the mate was "dude wtf did you just do"
I have a prepaid card with some Euros on it that I use for travel. At a push, I could use that, but I get charged for cash withdrawls at home.
I was like "what?"
user1804599
@StackedCrooked speld.nl/2015/04/03/…
@AlexM. Yeah I agree; it's great.
13:26
you what
@AlexM. photo?
@MartinJames eh :(
@LightningRacisinObrit I can't just take pics of people lol
@AlexM. That's not really how it works. ATM transactions on a debit card (who gets cash with a credit card?) are processed via VISA etc, yes, but ultimately by your bank. Your bank needs to be up and running and operational for that to happen. Over here we have something called the "LINK network" which is like a conglomerate of ATM providers that can service the majority of banks. But that still doesn't help if your bank is having technical problems.
@LightningRacisinObrit I assume it's a coincidence, or mebbe the bank servers are overloaded with other thirsty people trying to get beer money for the w/e.
@MartinJames could be
who you with
@AlexM. sure you can
@AlexM. gotcha
13:28
@LightningRacisinObrit RBS
@AlexM. lol "I am a magician"
@MartinJames oh well there you go then
@MartinJames RBS go down basically every bank holiday, don't they? ;p
@LightningRacisinObrit :|
@LightningRacisinObrit Fuck.
@LightningRacisinObrit Ohwait.. I got half a login page. I think it's sobering up....
user1804599
?????????????????????????????????????????????????????/
We use pointers because it's easier to give someone an address to your home than to give a copy of your home to everyone. — Rishi Dua Oct 4 '13 at 14:51
I’m assuming it’s the equivalent of [] {}.
@DonLarynx Some problem?
what is the arrow token?
13:37
@LightningRacisinObrit Yeah, the last character should be a ?
@DonLarynx ->
@LucDanton youdontsaynick.jpeg
@DonLarynx ->. It says so right there.
@AndyProwl :p
Ask a stupid question…
What is the meaning of the arrow token?
13:38
1 min ago, by Luc Danton
I’m assuming it’s the equivalent of [] {}.
@DonLarynx In this context? It is part of the syntax for a Java lambda.
Dude, just fucking read the page.
Come on, Dan.
I was expecting an explanation of the arrow token, ah w.e.
To be fair, you got two explanations
One of which twice
@DonLarynx Are you asking what a token is and, by extension, why -> may be called "the arrow token"?
If so, be bloody clear about it instead of whining.
Okay, let me clarify: the equivalent of C++’s [] {}.
13:39
@Dan en.wikipedia.org/wiki/Lexical_analysis#Token and I think it's clear why this particular token is called "arrow"
\() -> () if you will. Or function() end.
Or C#'s =>
@AlexM. you showed him your cards , you lost
@LightningRacisinObrit Sometimes SO chat notification sucks.
13:40
How does Python fare? Something like lambda: None?
@sehe dat pun
not really
yes there is a pun
user1804599
@LucDanton Yes, and expression-only. :(
@AlexM. gosh
user1804599
13:41
Stupid significant indentation.
user1804599
@sehe ?
user1804599
This doesn't compile in Visual Studio 2013. The compiler doesn't think std::is_abstract<> is a constant expression! — mackenir 13 mins ago
user1804599
hahahahaha
@DonLarynx Were you asking, what is the meaning of 'arrow token'? The quotes make all the difference.
Compare "What is the meaning of the word" and "What is the meaning of 'the word'".
13:44
no no no, it's this->
sorry mistake lol
@райтфолд read da linct komment. luk @ cuntext; fix da problum
@LucDanton Already addressed that. Plonk less.
@KrysselTillada yes
@AlexM. lol
user1804599
@sehe oh I didn't know it was a hyperlink.
user1804599
13:51
I want a boat.
user1804599
I like sailing.
As does Eric Lippert.
How do you like him?
The same way anyone likes anyone: brain chemistry.
> - (void)insertObject:(id)anObject atIndex:(NSUInteger)index;
This method is called insertObject:atIndex:
it makes sense but only if you read it carefully wtf
lol
duo-infix-notation?
13:57
the problem is
I have a method that sets two parameters for something
and I'm trying hard to find names to fit this convention
fuck it I'll just write two setters
I was originally passing them in pairs since they're set at the same time and didn't want to add even more crap in the C++ <-> C#/Java/Obj-C bridge
but I guess I can split them once they get on the other side
Just make everything immutable, then you don't need any setters.

« first day (1630 days earlier)      last day (3543 days later) »