Friday, December 29, 2017

Digest for comp.lang.c++@googlegroups.com - 8 updates in 3 topics

Vir Campestris <vir.campestris@invalid.invalid>: Dec 29 08:46PM

On 25/12/2017 18:29, bitrex wrote:
> I don't think its ALU can do multiplication in hardware, much less
> floating-point operations
 
Admit it, you're as old as I am. I was told a few years ago that I
should expect a HW divider.
 
It must be a very small and specialised chip that doesn't have a HW
multiplier. Heck, even an 8080 had one of those... What is it?
 
Andy
Robert Wessel <robertwessel2@yahoo.com>: Dec 29 04:16PM -0600

On Fri, 29 Dec 2017 20:46:36 +0000, Vir Campestris
>should expect a HW divider.
 
>It must be a very small and specialised chip that doesn't have a HW
>multiplier. Heck, even an 8080 had one of those... What is it?
 
 
The 8080 had no multiplier, certainly not a general purpose one (if
you use a *very* loose definition of what a multiplier is). Nor did
the Z-80, or their contemporaries, the 6800 and 6502. For examples of
more current architectures without a multiplier, there are the low end
PICs and the smaller AVRs.
Vir Campestris <vir.campestris@invalid.invalid>: Dec 29 08:49PM

On 28/12/2017 18:28, Richard wrote:
 
> For the former, I would recommend any basic book on algorithms and
> data structures. There are plenty of these as they are core computer
> science and not specific to C++.
 
I'd second Josuttis.
 
But if you value your sanity do NOT attempt to study the actual code.
Every implementation I have seen has efficiency at execution time first,
speed of compilation second, and readability not even on the list.
 
Andy
唐彬 <tb731685340@gmail.com>: Dec 29 01:20AM -0800

So how can i fix this bug?
~Smart_Ptr can successfully call ~U_Ptr, but when it comes to the statement "delete p", p points to an invalid memory..
Barry Schwarz <schwarzb@dqel.com>: Dec 29 01:36AM -0800

On Fri, 29 Dec 2017 01:20:07 -0800 (PST), ?? <tb731685340@gmail.com>
wrote:
 
>So how can i fix this bug?
>~Smart_Ptr can successfully call ~U_Ptr, but when it comes to the statement "delete p", p points to an invalid memory..
 
If you want ~U_Ptr() to delete the object pointed to by p, you must
insure that p always points to memory allocated by new. In the
original code, p pointed to an automatic object defined in test().
 
On the other hand, there is no need to delete p. Your existing code
will then work fine. If someone creates an instance of U_Ptr where p
points to allocated memory, it becomes there job to delete it. Since
the memory is allocated independent of U_Ptr(), it can be deleted
either before or after ~U_Ptr() is called.
 
--
Remove del for email
唐彬 <tb731685340@gmail.com>: Dec 29 01:53AM -0800

got it ! Thanks!
BTW what does "Remove del for email" mean? English is not my mother language, and i dont understand why Remove and del are used together.
Barry Schwarz <schwarzb@dqel.com>: Dec 29 09:30AM -0800

On Fri, 29 Dec 2017 01:53:22 -0800 (PST), ?? <tb731685340@gmail.com>
wrote:
 
>got it ! Thanks!
>BTW what does "Remove del for email" mean? English is not my mother language, and i dont understand why Remove and del are used together.
 
That line is part of my "signature" as opposed to the message text. It
tells you how to convert the "from" data in the header to my email
address for those rare occasions when a conversation should be taken
private.
 
--
Remove del for email
"James R. Kuyper" <jameskuyper@verizon.net>: Dec 29 12:36PM -0500

On 12/29/2017 04:53 AM, 唐彬 wrote:
> got it ! Thanks!
> BTW what does "Remove del for email" mean? English is not my mother language, and i dont understand > why Remove and del are used together.
 
It's meant to be obscure - not to confuse non-native speakers, but to
confuse programs which automatically scan all usenet postings for e-mail
addresses, so they can be targeted by spam.
I order to not be inconvenienced by such spam, Barry posts using an
incorrect e-mail address. However, if an ordinary human reads his
message, he wants them to be able to figure out how to correct the
e-mail address.
"Remove del for email" are the instructions for correcting his e-mail
address. If you look at the address he actually uses, you'll find all of
the letters from "del" in that address, in the same order, though not
contiguous with each other. His correct e-mail address can be obtained
by removing those letters.
There is no standard way to do this. It would be counter-productive to
create one, since if there were such a standard way, those programs
would be modified to recognize and apply it.
 
I don't bother with such tricks, and as a result nearly 1/3 of all the
personal e-mail I receive is spam of one kind or another - but between
my e-mail provider's filters, and Mozilla Thunderbird's own spam
filters, most of them get removed automatically.
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: