- C++ - 3 Updates
- I am trying to code C++ STL vector, list, queue, pq, map, etc. But i dont know how to start.. - 6 Updates
- Real Numbers (was: I am trying to code C++ STL vector, list, queue, pq, map, etc. But i dont know how to start..) - 1 Update
- Another new scalable algorithm of mine is here.. - 2 Updates
- This guy said Muslim & Buddhism has go to hell - 1 Update
- Good course for old school C++ programmer moving to C++ 14 - 1 Update
- Please save me - 1 Update
Vir Campestris <vir.campestris@invalid.invalid>: Jan 04 09:53PM Given template <typename T> void bazz(T) {}; Why does auto foo = std::bind(bazz, 42); not deduce the template param? You have to say auto foo = std::bind(bazz<int>, 42); It's probably correct behaviour, but it's a right PITA. Andy |
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Jan 04 11:49PM +0100 On 1/4/2018 10:53 PM, Vir Campestris wrote: > not deduce the template param? You have to say > auto foo = std::bind(bazz<int>, 42); > It's probably correct behaviour, but it's a right PITA. You can do this, though: auto foo = [](){ bazz( 42 ); }; Cheers & hth., - Alf |
Vir Campestris <vir.campestris@invalid.invalid>: Jan 04 10:58PM On 04/01/2018 22:49, Alf P. Steinbach wrote: > You can do this, though: > auto foo = [](){ bazz( 42 ); }; > Cheers & hth., This time it doesn't. That's cut down from some code that takes an argument pack as well, and they don't seem to sit well with lambdas. BTW Someone at work pointed out to me you can say auto foo = []{ bazz( 42 ); }; leaving out one set of brackets. Andy |
Chris Ahlstrom <OFeem1987@teleworm.us>: Jan 04 05:59AM -0500 Real Troll wrote this copyrighted missive and expects royalties: > { > return base * height * 1/2; > } Just use real numbers, dude! :-D -- You may worry about your hair-do today, but tomorrow much peanut butter will be sold. |
"Fred.Zwarts" <F.Zwarts@KVI.nl>: Jan 04 01:08PM +0100 "Real Troll" schreef in bericht news:p2gipj$g6h$1@gioia.aioe.org... >{ >return base * height * 1/2; >} I would think that "base * height / 2" would be sufficient. What is the added value of the multiplication with 1? |
James Kuyper <jameskuyper@verizon.net>: Jan 04 07:12AM -0500 On 01/04/2018 05:59 AM, Chris Ahlstrom wrote: > Real Troll wrote this copyrighted missive and expects royalties: ... >> return base * height * 1/2; >> } > Just use real numbers, dude! :-D That's precisely what AreaofTriangle3<T> does, when T is a real number type. Note that while the C++ standard doesn't define what "real number type" is, the C standard does define what a "real type" is, and it includes all integer types (C 6.2.5p17). I haven't tracked it down, but C++ incorporates a of lot of stuff from the C standard by reference; it might have incorporated that definition as well. |
Chris Ahlstrom <OFeem1987@teleworm.us>: Jan 04 08:39AM -0500 James Kuyper wrote this copyrighted missive and expects royalties: > includes all integer types (C 6.2.5p17). I haven't tracked it down, but > C++ incorporates a of lot of stuff from the C standard by reference; it > might have incorporated that definition as well. I was being facetious. Computers cannot implement real numbers. :-) -- You have a strong appeal for members of your own sex. |
Real Troll <real.troll@trolls.com>: Jan 04 01:15PM -0400 On 04/01/2018 12:08, Fred.Fart wrote: > I would think that "base * height / 2" would be sufficient. What is > the added value of the multiplication with 1? To give you something to comment about :) |
Vir Campestris <vir.campestris@invalid.invalid>: Jan 04 10:54PM On 02/01/2018 17:34, Real Troll wrote: > A time will come when Microsoft will concentrate sorely on C# That'll hurt :P Andy |
ram@zedat.fu-berlin.de (Stefan Ram): Jan 04 02:26PM >I was being facetious. Computers cannot implement real numbers. :-) Depends on the definition of "to implement real numbers". If you ask for a memory cell that is so big that it can store /every/ real number using a constant code where each real number is represented by a certain state or states: That is not possible as far as we know.¹ But then, the same thing is already impossible for integral or natural numbers. OTOH, we can surely store /some/ real (or integral) numbers, any from a fixed finite and small subset. But the IEEE-754 values are intended to each represent a whole interval from the real line IIRC. ¹) We usually think of digital computers. A memory cell also might be analog, and one could position a particle along a ruler and then say that each position of the particle corresponds to a real number. As far as we know, the possible positions of a particle are not discreet, and so this would be possible. But in fact it is limited by our inability the prepare and measure the position of a particle up to an arbitrary precision (even when quantum theory is not taken into consideration). |
Chris Ahlstrom <OFeem1987@teleworm.us>: Jan 04 05:55AM -0500 Intelli2 wrote this copyrighted missive and expects royalties: > other software companies. > Stay tuned because i think Embarcadero will become soon much better with > my scalable algorithms and there implementations. Good luck wit dat. -- Training is everything. The peach was once a bitter almond; cauliflower is nothing but cabbage with a college education. -- Mark Twain, "Pudd'nhead Wilson's Calendar" |
Intelli2 <intelli2@mama.com>: Jan 03 04:36PM -0500 Hello.. Another new scalable algorithm of mine is here.. I think Embarcadero will be happy with this, because my new scalable algorithm is a scalable reference counting algorithm, i have just finished implementing it and it is working very well and i will present it to Embarcadero , i want to sell it to them, also i am finishing my other scalable algorithms that are a scalable Threadpool engine that i want to sell it to them, it is scalable on NUMA and multicore systems , also i want to sell to them another almost scalable Threadpool of mine that supports priorities , a high and a normal and a low, also i want to sell also my scalable FIFO queues , i want to sell my scalable algorithms to Embarcadero , but if they don't want to buy , i will sell my scalable algorithms and there implementations to Microsoft or to other software companies. Stay tuned because i think Embarcadero will become soon much better with my scalable algorithms and there implementations. Thank you, Amine Moulay Ramdane. |
Cholo Lennon <chololennon@hotmail.com>: Jan 03 09:11AM -0300 On 03/01/18 05:21, Juha Nieminen wrote: > There's still freedom of speech in the United States. Hahaha -- Cholo Lennon Bs.As. ARG |
Jorgen Grahn <grahn+nntp@snipabacken.se>: Jan 03 10:40AM >> programming, move semantics, lambdas, and the like? > This helped me: > http://shop.oreilly.com/product/0636920033707.do Why not spell it out? Scott Meyers: "Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14". /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Jan 03 06:22PM -0800 On 1/1/2018 2:04 PM, Chris M. Thomasson wrote: >>> Try C? >> I am a bitch > LOL! Not laughing at Ellen. Sometimes coding in C is much more literal wrt manually typing the ctor/dtor function names for the objects we create. Can be sometimes be fairly verbose. |
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