- Overload by return type - 10 Updates
- Overload by return type - 2 Updates
- How to deal with running out of stack space? - 1 Update
- How to convert UTF-8 literal to `char const*` at compile time in C++20? - 1 Update
- Namespace scopes and function implementation confusion - 1 Update
rick.c.hodgin@gmail.com: Jun 19 08:07AM -0700 > and I suspect it makes it easier to compile, too. I wouldn't hold up too > much hope of convincing the C++ committee to make a decision that would > violate this principle. I do not expect I would ever get the C or C++ committee to change anything about their methodologies, primarily because it's me. And regardless, in this case I can see their design reasoning. It would be a far simpler implementation to set it up as you've outlined, and that's more or less what I expected it to be. Thank you for the clear explanation. -- Rick C. Hodgin |
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Jun 19 07:06PM +0200 > statement's condition must be convertible to bool, for instance, does > not influence how the expression is evaluated - it only determines > whether or not the result of that evaluation is acceptable. Well. OK, one example where the outer context determines the result of an expression is when the name of an overloaded function is casted to a specific function pointer type. This selects the corresponding overload. On its own the name expression is ambiguous, but the context makes it unambiguous, nice. Another example is precisely the case you mention, an `if` condition. Since it is a /condition/ it cancels the `explicit`-ness of a type's `operator bool`. And so `cout`, say, can convert implicitly to `bool` in that context, but not if you try to use it to just initialize a `bool`. A third example is precisely when one overloads on return type. Oh, that's what this thread is about! Well, C++ supports that for type conversion operators, so, like #include <cppx-core/all.hpp> // <url: oh, over there> class Fun { double m_arg; public: operator int() const { return 100 + m_arg; } operator double() const { return 200 + m_arg; } Fun( const double arg ): m_arg( arg ) {} }; using foo = Fun; auto main() -> int { const int a = foo( 3.14 ); // a = 103 const double b = foo( 3.14 ); // b = 203.14 $use_std( cout, endl ); cout << a << ", " << b << "." << endl; } > and I suspect it makes it easier to compile, too. I wouldn't hold up too > much hope of convincing the C++ committee to make a decision that would > violate this principle. It's a nice principle, and I agree, it should hold in general. Cheers!, - Alf |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jun 19 08:51PM +0100 > e = 0.0; > return { nocode, 0.0f, nocode }; > } And Satan invented fossils, yes? I thought you were fucking off. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Bryne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jun 19 08:54PM +0100 On 19/06/2019 18:06, Alf P. Steinbach wrote: > auto main() -> int Fucking egregious m8. > $use_std( cout, endl ); Fucking uber-egregious m8. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Bryne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
rick.c.hodgin@gmail.com: Jun 19 01:08PM -0700 On Wednesday, June 19, 2019 at 3:54:21 PM UTC-4, Mr Flibble wrote: > .. egregious m8. > > $use_std( cout, endl ); > .. uber-egregious m8. You are the most hateful person I've ever met online, Leigh, even worse than Peter Cheung. He was angry with me and targeted me, but was civil to other people. I am so sad for you. -- Rick C. Hodgin |
scott@slp53.sl.home (Scott Lurndal): Jun 19 08:12PM >On Wednesday, June 19, 2019 at 3:54:21 PM UTC-4, Mr Flibble wrote: >> On 19/06/2019 18:06, Alf P. Steinbach wrote: >You are the most hateful person I've ever met online. Look in the damn mirror..... |
rick.c.hodgin@gmail.com: Jun 19 01:18PM -0700 On Wednesday, June 19, 2019 at 4:12:52 PM UTC-4, Scott Lurndal wrote: > rick.c.hodgin@gmail.com writes: > >You are the most hateful person I've ever met online. > Look in the damn mirror..... Show me any place where I've been hateful and I'll apologize publicly. -- Rick C. Hodgin |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jun 19 10:19PM +0100 > worse than Peter Cheung. He was angry with me and targeted me, > but was civil to other people. > I am so sad for you. Stating facts *isn't* being hateful; spreading misogynist, homophobic Christian propaganda *is* being hateful now kindly fuck off like you promised. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Bryne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
rick.c.hodgin@gmail.com: Jun 19 04:17PM -0700 On Wednesday, June 19, 2019 at 5:20:06 PM UTC-4, Mr Flibble wrote: > > but was civil to other people. > > I am so sad for you. > Stating facts *isn't* being hateful; It's the way you state them, Leigh. You use hateful language, hateful statements, hateful tones. You're not trying to help people. You beat them down. You smack them hard. You hit them over the head with hurting words. You're nothing other than a total bully toward people. I wonder sometimes if there is anyone in your life you do truly care for, would truly seek to be nice to, would truly seek to change your ways for? If there is, try to be like that to other people. > spreading misogynist, homophobic Christian propaganda *is* being > hateful... The Christian teaching is not any of those things you state. The message itself is God-given to man for a purpose. The fact that people choose to ignore it completely does not change the fact that everyone will be judged by it on Judgment Day, those who did not seek the truth and accept the judgment BY GOD that He has warned us all about before leaving this world. People who do not repent of their sin and ask forgiveness from Jesus Christ will literally burn in eternal fire in Hell forever. To NOT warn people of that, Leigh, would be Christian hate. I warn you, even in your maximum hate toward me, because I do not hate you. I care about you. I do not want that end for you. I do not want that end for anybody. It is most undesirable. It's worse than death. It goes on and on and on and on and on and it's worse than death! I warn YOU to wake YOU up, to bring to YOUR attention the very eternal death sentence that is ALREADY hanging around everyone's neck (John 3:18). I warn YOU to wake YOU up that YOU have ONE way out, and that is through the One I teach YOU about, through the God-man Jesus Christ. YOU reject everything of righteousness, holiness, purity, goodness, truth, and embrace everything of hate, malice, sin, and falseness. It is evident in the way you interact with people here on this clc++ channel, presumably a channel you actually care about because you do spend much time here, and you are a very skilled C++ developer, and you would most likely regard the people here as peers or fellows in your programming craft. You may regard your skills as above those, but still you come here for some purpose, and not rec.fly.fishing. And when you do come here you're mean, hateful, hurtful. You don't care about people's feelings. Your swing at them with your words and bruise their mind and leave scars on people and you don't care about any of it. You don't even think twice about how truly hate- ful you are. All people will reap what they sow, Leigh. That's a promise from God. ----- There are no exceptions to judgment for mankind. Death hangs over the head of all people who have not repented of their sin and asked forgiveness from Jesus Christ. This is the age we live in today. This is where we are at this point in history. We are post-Pentecost, and pre-Tribulation. This is the AGE OF THE GENTILES, and it is not infinite. It has a closing day that is fast approaching. If a person's heart gives out and they die in the next moment, that will be it for the unsaved. The last contribution they'll make in this entire universe will be the agony of their dying. The rest of their ETERNAL EXISTENCE will be in sheer agony in Hell tormented beyond their ability to endure it ... forever. They will writhe in pain that so consumes their existence they can do nothing else. It won't be a party in Hell. It will be HELL. It will be total and complete isolation in the consumption of an overwhelming pain and torture that was never designed for man, but for the angels who re- belled against God, but because of man's pomp and arrogance, Hell has enlarged herself to open her mouth without measure and swallow up all their pride and even the mighty men will go down. I DO NOT WANT THAT END FOR ANYONE!!! NOT EVEN FOR YOU, MR. HATEFUL!!! All of these warnings are me pleading FOR YOUR SOUL! I am trying to shake you into awareness of what's coming. It's not a trifle joke. It's not a bigoted religion. It is the JUDGMENT OF GOD AGAINST ALL SIN! Someday you will understand. -- Rick C. Hodgin |
rick.c.hodgin@gmail.com: Jun 19 04:20PM -0700 On Wednesday, June 19, 2019 at 5:20:06 PM UTC-4, Mr Flibble wrote: > now kindly [go away] like you promised. I never promised to go away. I said I wouldn't be here monitoring this channel and clc as I had been. I happen to have been email- notified of several threads I've participated in recently, and today I had the question about function overloading based on the return type. I do not intend to be here daily, but I will be here periodically. I still intend to pray for everyone in the groups I post to for an hour this Friday. I have love in my heart for all people. I will be praying that God pours out His Holy Spirit, and shines the light of understanding upon all the people here, that they too may be saved as I was saved back in 2004. I want everyone thriving in eternity, experiencing all this universe has to offer. I do not want people confined to an existence of unending torment and agony. I am pre- pared to put portions of my life on hold to try and reach out and snatch some away from the flames. -- Rick C. Hodgin |
ram@zedat.fu-berlin.de (Stefan Ram): Jun 19 03:55PM >statement's condition must be convertible to bool, for instance, does >not influence how the expression is evaluated - it only determines >whether or not the result of that evaluation is acceptable. I am not sure whether the following program is a counterexample to the idea that the evaluation does not depend on context. main.cpp #include <ostream> #include <iostream> struct S { operator bool(){ ::std::cout << "bool context\n"; return true; } S & operator= ( S & other ) { ::std::cout << "assignment context\n"; return other; }}; int main() { S s; if( s ); s = s; } transcript bool context assignment context |
ram@zedat.fu-berlin.de (Stefan Ram): Jun 19 08:34PM >Nothing. Almost all implementations of C++ use a stack structure to >store local variables, and many of them do so using a hardware stack, >but the standard says almost nothing about such issues. There is, http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1637.pdf which should discuss this under VI. STRICTLY CONFORMING C PROGRAMS DO NOT EXIST . The situation for C++ should be similar. |
Tim Rentsch <tr.17687@z991.linuxsc.com>: Jun 19 01:18PM -0700 > If relaying on such compiler optimizations, one should actually check > what kind of asm the compiler is producing from the code, [for all > platforms being targeted]. Absolutely. And ideally with an automated tool so the check can be done reliably. |
Tim Rentsch <tr.17687@z991.linuxsc.com>: Jun 19 01:15PM -0700 > template. But then what if a bug is fixed in the original library > version? Then every programmer who's made a templated copy, must also > fix that bug. Sorry, I was trying to be helpful. I don't know what it is you hope to accomplish. If a given piece of code isn't going to tolerate the transition to C++20 then either the function being called or the sites that call it have to change, if it must work in C++20. It seems like you want everything to be the same and yet act differently. So either I don't understand what you want or what you want simply cannot be provided. |
Marcel Mueller <news.5.maazl@spamgourmet.org>: Jun 19 06:53PM +0200 Am 19.06.19 um 12:40 schrieb Juha Nieminen: > { > return mValue < rhs.mValue; > } Why should it fail? AClass::Inner and ANamespace::Data are the same type. |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment