- Merry Christmas 2017 - 3 Updates
- Inheriting from a class and overriding user-defined conv. operators - 4 Updates
- Speeding up the Build of C and C++ Projects - 1 Update
- A controlled access problem - 1 Update
mcheung63@gmail.com: Dec 24 08:59PM -0800 Rick C. Hodgin於 2017年12月24日星期日 UTC+8上午8時33分39秒寫道: > I teach you about Him. Love yourself, and provide for your future. > -- > Rick C. Hodgin This fucking asshole keep spamming the group with his holy shit posts. He tried to force everybody to believe his false god. He said Muslim, Buddhist, Hindu, atheist and need to go to hell. Read this post https://groups.google.com/forum/#!topic/comp.lang.c/j4fTTKv2Ycs I am firing a complaint to all USA gov departments His mother died by cancer, we all happy, and I think god punished his fucking mum. and she is absolutely in hell now. |
asetofsymbols@gmail.com: Dec 25 12:55AM -0800 Merry Christmas Rick C. Hodgin |
James Moe <jimoeDESPAM@sohnen-moe.com>: Dec 25 12:07PM -0700 > This fucking asshole keeps spamming the group [...] And you re-posted it for him. Gee. Your so awesome. -- James Moe jmm-list at sohnen-moe dot com Think. |
bitrex <bitrex@de.lete.earthlink.net>: Dec 24 08:44PM -0500 Consider the following class "UFixed", which implements some user-defined conversion operators to (explicitly) convert the type to double, float, and "IntegerTypes": <https://github.com/Pharap/FixedPointsArduino/blob/master/src/FixedPoints/UFixed.h> I'd like to derive a class from it that has materially equivalent functionality to the parent class, except where those conversions are non-explicit. Truth is I don't use inheritance very much outside of defining interfaces and I don't really know where to start implementing that to end up with anything nice. Merry C++hristmas y'all! |
"Öö Tiib" <ootiib@hot.ee>: Dec 25 02:00AM -0800 On Monday, 25 December 2017 03:44:36 UTC+2, bitrex wrote: > I'd like to derive a class from it that has materially equivalent > functionality to the parent class, except where those conversions are > non-explicit. You mean implicit? Why to implement it as derived class? Edit the implementation, remove the "explicit", rename it to "EvilUFixed" and save as different files. What is the purpose? Need security vulnerability? It likely already contains defects. Isn't for example UFixed<20,20>::MaxValue incorrect on most platforms? You can exploit it. Sufficiently advanced deliberate security vulnerability is indistinguishable from innocent C++ typo. ;) |
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Dec 25 01:24PM +0100 On 12/25/2017 11:00 AM, Öö Tiib wrote: > contains defects. Isn't for example UFixed<20,20>::MaxValue incorrect > on most platforms? You can exploit it. Sufficiently advanced deliberate > security vulnerability is indistinguishable from innocent C++ typo. ;) Or magic. Cheers!, - Alf |
bitrex <bitrex@de.lete.earthlink.net>: Dec 25 01:29PM -0500 On 12/25/2017 05:00 AM, Öö Tiib wrote: > You mean implicit? Why to implement it as derived class? Edit the > implementation, remove the "explicit", rename it to "EvilUFixed" and > save as different files. Assume there are like, reasons and stuff that I don't wish to do that. :-( > contains defects. Isn't for example UFixed<20,20>::MaxValue incorrect > on most platforms? You can exploit it. Sufficiently advanced deliberate > security vulnerability is indistinguishable from innocent C++ typo. ;) The bare-metal platform I'm deploying for is too stupid to know anything about networking. I don't think its ALU can do multiplication in hardware, much less floating-point operations. Hey, drum machines and stuff need software, too. If someone wants to make an insecure Internet virtual drum-machine using unmodified fixed-point library on a platform that it was never designed for then I'd guess they've got bigger problems then getting haxed Anyway this "works for me", 'sokay? template <unsigned Integer, unsigned Fraction> struct EvilUFixed : public UFixed<Integer, Fraction> { typedef UFixed<Integer, Fraction> fixed_point_t; using fixed_point_t::fixed_point_t; //pull in base constructors using typename fixed_point_t::IntegerType; //pull in "IntegerType" using fixed_point_t::operator double; using fixed_point_t::operator float; using fixed_point_t::operator IntegerType; constexpr EvilUFixed(const fixed_point_t& rhs) : fixed_point_t(rhs) //constructor from base type {} //implicit conversions constexpr operator float() const { return static_cast<float>(*this); } constexpr operator double() const { return static_cast<double>(*this); } constexpr operator IntegerType() const { return static_cast<IntegerType>(*this); } }; |
Andrey Karpov <karpov2007@gmail.com>: Dec 25 04:54AM -0800 Many programmers know firsthand that C and C++ program builds very long. Someone solves this problem by sword-fighting at build time, someone is going to the kitchen to "grab some coffee". This article is for those who are tired of this, and who decided it is time to do something about it. In this article, various ways of speeding up compilation time of a project are regarded, as well as treatment of a disease "fixed one header - a half of a project was rebuilt." Continue read: https://www.viva64.com/en/b/0549/ |
asetofsymbols@gmail.com: Dec 25 12:51AM -0800 Merry Christmas and one Happy new year to all |
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