Sunday, December 31, 2017

Digest for comp.lang.c++@googlegroups.com - 17 updates in 5 topics

JiiPee <no@notvalid.com>: Dec 31 09:33PM

I dont understand why that foo(p); does not find the correct foo-version
automatically even though its obvious it should call the global
foo(const Player& player);. Can anybody please explain why its trying to
call the foo(const std::string& name, int a) version (and causing a
compilation error-) even though there is perfect match with the global
version?
 
Just would like to know the theoretical reason for this. (I know
::foo(p);  solves it, but is that the only solutions? I would rather not
put those :: ).
 
thanks
 
 
class Player
{
};
 
void foo(const Player& player);
 
class A
{
public:
    std::string name_;
    void foo(const std::string& name, int a)
    {
        Player p;
        foo(p);
    }
};
 
void foo(const Player& player)
{
 
}
 
int  main() {
    A a;
    a.foo("sdf", 9);
    return 0;
}
JiiPee <no@notvalid.com>: Dec 31 11:14PM

On 31/12/2017 22:46, Stefan Ram wrote:
> declaration /hides/ the outer declaration of the same name
> [basic.scope.hiding], and hidden names do not take part in
> name resolution.
 
ok, thanks, I thought its something like this.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Dec 30 09:42PM -0800

Man fell in the garden of Eden, and sin entered into this world and the
world we live in today is the result. Everywhere wars, hate, death, and
destruction, people looking out only for themselves and their personal
interests, and when they do charity it's to say, "Hey look! I do charity."
 
Jesus Christ came into this world to save man from sin. He teaches a new
way to be. That new way is the way He intended for us before sin entered
in and destroyed everything. He restores that which was lost: our future,
our eternal relationship with Him.
 
God is spirit. He is Father, Son, and Holy Spirit. His Son was flesh,
just like us. He came here to live under our laws and save us before God.
He completed His work at the cross after a ~3.5 year ministry, where He
was crucified and died in the flesh with our sin charged to Him. He was
innocent and had no sin of His own, and God allowed Him to receive the
sin of all who would put their faith and trust in Him, so that their sin
could be transferred (literally) from them to Him. Jesus died on the
cross, and went before God to pay the price of that sin. It was a heavy
price and it bruised God, it crushed Jesus. And on the third day, God
raised Him back to life and gave Him all authority in Heaven and on Earth.
 
What Jesus does for us when we come to Him and ask Him to forgive our sin,
is to restore us to eternal life. We are still here in this world for a
time, but our internal nature completely changes. We receive a new spirit
nature (John 3), and are guided from that day forward by His Holy Spirit.
Our flesh nature (sinful) is still here, and we can listen to that input,
and we can still do sinful things, but God's Holy Spirit is also there,
and our new spirit nature is also there, and everyone who is born of God
will not continue in sin for very long. God comes for us to lead us out
of sin, to even take us by the hand and drag us out of sin.
 
-----
Jesus didn't come to the Earth to save righteous people. He came to save
sinners.
 
Are you a sinner? Have you:
 
Ever stolen anything? Ever?
Used the Lord's name as a cuss word?
Lusted after someone who was not your spouse?
Told a lie? Ever?
Coveted after your neighbor's possessions? Ever?
 
All of us are guilty of these sins and more. Jesus knows this, which is
why He came here to save us. He does what we cannot do: He makes us
clean and shiny and innocent and new despite our filth and guilt in sin.
 
-----
You need to Jesus to forgive your sin. Ask Him to forgive you and begin
your new life with Him forever. He enters in the very moment you ask Him
to forgive your sin. It's what the words of the song Amazing Grace
convey:
 
"How precious did that grace appear, the hour I first believed..."
 
God's grace is given to us because He loves us. Jesus loves you and He
wants to forgive your sin and give you eternal life. Ask Him to forgive
you today, and enter in to His eternal Kingdom. He's gone ahead and made
a place for you, a custom place designed just for you, and He is return-
ing soon. The signs are foretold in the Bible and are unfurling before
our very eyes.
 
John 3:
https://www.biblegateway.com/passage/?search=John+3&version=KJV
 
Jesus prepares a place for you in advance:
https://www.biblegateway.com/passage/?search=John+14&version=KJV
 
Jesus loves you. I love you. I teach you about Him, and He teaches
you the truth. Read the Bible and learn the truth God gave mankind to
protect him from the enemy, to save him from sin. He did this for you,
directly and personally.
 
--
Rick C. Hodgin
Mr Flibble <flibble@i42.co.uk>: Dec 31 05:05PM

On 31/12/2017 05:42, Rick C. Hodgin wrote:
[snip: tl;dr]
 
Christianity is a religion and your god doesn't exist.
 
Merry Festivus.
 
/Flibble
 
--
"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."
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Dec 31 02:50PM -0800

On 12/31/2017 9:05 AM, Mr Flibble wrote:
> [snip: tl;dr]
 
> Christianity is a religion and your god doesn't exist.
 
> Merry Festivus.
 
Is it okay to have a pole that is not made of aluminum?
 
;^)
 
[...]
ram@zedat.fu-berlin.de (Stefan Ram): Dec 31 10:46PM

>void
...
>     void
 
The second declaration appears in a scope that is nested in
the scope of the first declaration. Therefore, the second
declaration /hides/ the outer declaration of the same name
[basic.scope.hiding], and hidden names do not take part in
name resolution.
Dombo <dombo@disposable.invalid>: Dec 31 01:46PM +0100

Op 30-Dec-17 om 23:44 schreef bitrex:
 
> There's not much below the ATTiny series; an ATTiny85 is around 75 cents
> in quantity.
 
Actually there is a lot below the ATtiny series if you look beyond the
8-bit AVR family. There are many, many other microcontroller families on
the market that target the really low-end/low-cost/low-power/high volume
market, where the unit price of a controller is only a few cents each.
For those few cents you can expect a small OTP or mask ROM program
memory of at most a couple of kilobytes, a couple of bytes of RAM, a few
4-bit registers and a few peripherals. The average hobbyist won't know
about those; companies selling them won't talk to you unless you intend
to buy quantities of a like a million or more. However chances are you
have already many of those in your home.
David Brown <david.brown@hesbynett.no>: Dec 31 02:53PM +0100

On 31/12/17 13:46, Dombo wrote:
> about those; companies selling them won't talk to you unless you intend
> to buy quantities of a like a million or more. However chances are you
> have already many of those in your home.
 
There are very few 4-bit microcontrollers used now, even in the most
cost-sensitive mass produced applications. The cost difference between
a 4-bit core and an 8-bit (or even 16-bit or 32-bit) core is too small
now with smaller processes and many free or cheaply licensed cpu cores.
In a typical cheapo device (like those "amusing" birthday cards that
play a tune, or plastic giveaway toys with a kid's comic) the
peripherals like a timer or two and a DAC or PWM with amplifier cost a
lot more than the cpu core in terms of die space. But you are right
that these cores may be a more limited than even an ATTiny - though some
of them are /exactly/ as limited as ATTiny's, as a major part of Atmel's
business is ASICs with these kinds of cores.
 
And in these sorts of devices, I think you'd be surprised at the amount
of memory or other peripherals. It is not uncommon to have quite a bit
of ROM - far more than the flash sizes of an off-the-shelf ATTiny. But
it will be masked ROM, not OTP - the programming time for writing an OTP
and the electronics for making the high voltages would be far too expensive.
 
The last 4-bit microcontroller family that was available to mere mortals
was from Atmel - I've forgotten the name of it. They had devices with
flash (for prototyping) as well as masked ROM. Some of them had 30 or
more pins, and a wide range of peripherals - especially wireless
communication. But no C++ compiler - just a limited variation of Forth.
bitrex <bitrex@de.lete.earthlink.net>: Dec 31 09:03AM -0500

On 12/31/2017 07:46 AM, Dombo wrote:
> about those; companies selling them won't talk to you unless you intend
> to buy quantities of a like a million or more. However chances are you
> have already many of those in your home.
 
Ok, I know what you mean. As you say they usually have inscrutable names
like Hitachi XM7FB194910JJ29-3 and aren't available to anyone buying in
quantities of a bajillion (professional term) or fewer
bitrex <bitrex@de.lete.earthlink.net>: Dec 31 09:14AM -0500

On 12/30/2017 06:23 PM, David Brown wrote:
> Last I heard, there was minimal C++ library support for avr-gcc, and
> thus things like exceptions don't work.  (Header libraries are fine, of
> course.)
 
Right, but it's a non-issue. There's no OS or true multitasking (there
are 'multitasking' libraries for 8-bit processors but it would probably
be better to call them multiprocessing/threading libraries, all you
usually get is register-saving context switching plus some type of queue
for inter-process communications. Where would one throw an exception to,
and who would catch it?
 
> It's just that /if/ you have made a C compiler for them, and you already
> have a C++ front end for your ARM targets (or whatever), then supporting
> virtual methods (or any other C++ feature) is not actually that much work.
 
Virtual methods are pretty efficient on the AVR; each virtual method in
a class or structure results in a "hidden" 2 byte vtable entry, then to
execute IIRC it's a 2 clock instruction to load the vtable entry into
the "Z" register from program memory, and then a 2 clock instruction to
indirect-jump to the function address
Dombo <dombo@disposable.invalid>: Dec 31 03:34PM +0100

Op 31-Dec-17 om 0:23 schreef David Brown:
>> The 8051 does have a multiply instruction.
 
> There are many 8051 variants - I think only some have multiply hardware.
> (Even if they have multiply hardware, 8051 cores are still depressing!).
 
I have a databook from 1984 which mentions that the 8051 has a multiply
instruction; therefore I'm inclined to believe that the MUL instruction
has been a integral part of the 8051 instruction set right from the
start. Though their are a huge number of 8051 variants, I believe the
difference is mostly in the peripherals and not so much in the core
instruction set. I agree that the 8051 isn't exactly pretty from the
programmers perspective. In its defense it's from an era when
microcontrollers were typically programmed in assembly, not C.
 
> I don't expect anyone intentionally planned to make a C++ compiler for
> an AVR tiny!
 
I think the C++ support for the 8-bit AVR is mostly a "lucky"
side-effect of using GCC. In theory it should be relatively easy to also
support the other programming languages GCC supports (Fortran, Ada,
Go...) on the AVR.
 
> But the AVR family are all supported by gcc - once you
> have the C compiler working for them, the basic C++ support is free.
 
That is largely true for GCC because it has a relatively clear
separation of the programming language dependent front-end and the
processor dependent back-end. However this is not necessarily the case
for compilers that are not GCC based.
 
>> less necessary.
 
> That is certainly true. But support for C++ (at least baring
> exceptions) is not much harder than supporting C.
 
Only if your compiler is GCC or CLang based, or at least if you have a
suitable C++ front-end that can be easily bolted on to your compiler. If
you are writing a compiler from scratch I think you are going to find
supporting C++ a lot harder than supporting just C. For example I don't
expect C++ support for the 8-bit PIC microcontrollers (given your
comments about the 8051 I can guess how you feel about that family),
simply because the MPLAB XC8 doesn't appear to be GCC based, hence
supporting C++ would be a rather costly proposition with little reward.
 
For the really low-end processors (4-bit, few bytes RAM, a kilobyte or
so of program memory and a little bit of I/O) there isn't even really a
point in creating a C compiler for it.
David Brown <david.brown@hesbynett.no>: Dec 31 05:06PM +0100

On 31/12/17 15:34, Dombo wrote:
> start. Though their are a huge number of 8051 variants, I believe the
> difference is mostly in the peripherals and not so much in the core
> instruction set.
 
There are a surprising number of variants in the instruction set and key
registers too, such as additional accumulators, pointer registers, and
even addressing modes. But it is unlikely that they will be missing
features from the original 8051 - if you say it had a multiply
instruction from the beginning, then I expect you are right if you say
they have it. My actual experience of using 8051's is not that wide - I
avoid them whenever possible.
 
> I agree that the 8051 isn't exactly pretty from the
> programmers perspective. In its defense it's from an era when
> microcontrollers were typically programmed in assembly, not C.
 
The 8051 was quite an old-fashioned design when it came out (as was the
8086 - Intel have been innovative in their implementations and
production processes, but quite conservative and old-fashioned in many
of their ISA designs). What bugs me about the 8051 is not so much that
it is painful to use in C (and in assembly), but that some manufacturers
of systems-on-a-chip still, to this day, put 8051 cores in their
designs. The problem is hardware designers that make nice radio
devices, or programmable motion sensors, or configurable analogue parts,
and think "we should put a microcontroller in this chip to make it more
flexible. Which one will we choose? I know - an 8051. Everyone likes
those". They never bother talking to the poor sod that has to program
them - nor the development company that has to splash out multiple $K
for bug-ridden development tools that belong in the last century
(because "everyone has Keil's 8051 compiler").
 
There we go - rant over. I don't like 8051's, and I don't like when
manufacturers make me use them (or chase me away from good peripherals
due to their poor choice of cpu core).
 
> side-effect of using GCC. In theory it should be relatively easy to also
> support the other programming languages GCC supports (Fortran, Ada,
> Go...) on the AVR.
 
Yes, that is mostly correct. There have been some people who have
actively contributed to gcc C++ on the AVR, but they would not have
bothered if they hadn't got most of it free with the gcc C AVR port.
There are also people programming AVR's in Ada, in the same way. (I
haven't heard of anyone using Fortran or Go on the AVR. But maybe there
is someone out there trying it - after all, there is at least one Linux
system running on an AVR Mega.)
 
> separation of the programming language dependent front-end and the
> processor dependent back-end. However this is not necessarily the case
> for compilers that are not GCC based.
 
It is also true for clang/llvm. And the original C++ "compiler" was a
C++ to C translator. You can implement C++ (at least excluding
exceptions) without a code generation beyond what you need for C -
although some C++ specific features would be useful for efficiency. But
you are certainly correct that other compilers could be structured
differently in a way that makes C++ support harder.
 
 
> comments about the 8051 I can guess how you feel about that family),
> simply because the MPLAB XC8 doesn't appear to be GCC based, hence
> supporting C++ would be a rather costly proposition with little reward.
 
Moving from a C-only compiler for a PIC16 to provide C++ support would
certainly be a lot of effort for little return. But some of the other
big embedded toolchain manufacturers already have C++ support - IAR
springs to mind. I expect that for them, supporting C++ on their PIC16
compiler would not be a huge job. It might still not be worth the
effort, of course - it still costs time and money, and the market is
going to be very small.
 
> For the really low-end processors (4-bit, few bytes RAM, a kilobyte or
> so of program memory and a little bit of I/O) there isn't even really a
> point in creating a C compiler for it.
 
I have once used an AVR Tiny with no ram other than the 32 8-bit
registers, and 2K (IIRC) flash. I programmed it in C, using gcc. I
suppose I could have used C++ :-)
Hergen Lehmann <hlehmann.expires.5-11@snafu.de>: Dec 31 05:47PM +0100

Am 31.12.2017 um 17:06 schrieb David Brown:
 
> of systems-on-a-chip still, to this day, put 8051 cores in their
> designs.  The problem is hardware designers that make nice radio
> devices, or programmable motion sensors, or configurable analogue parts,
 
Well, an 8051 core is very small (doesn't require much space on the
silicon) and VHDL sources are available from various sources for free or
very low cost.
 
If it does suit the purpose of basically acting as the bootloader for
some configurable analog front-end chip, why bothering with something
more complex, which requires you to pay royalities and sign NDAs?
Dombo <dombo@disposable.invalid>: Dec 31 06:13PM +0100

Op 31-Dec-17 om 14:53 schreef David Brown:
> between a 4-bit core and an 8-bit (or even 16-bit or 32-bit) core is
> too small now with smaller processes and many free or cheaply
> licensed cpu cores.
 
It true that the cost reductions in higher end of the market squeezes
the lower end of the market. Especially if the volume isn't extremely
high you see 32-bit processors are being used where with a bit of effort
a 8-bit processor could do the job as well. Lower NRE, shorter time to
market, easier grow path to more advanced versions of product may very
well outweigh a small difference in BOM cost.
 
However at the most extreme end of the market (very high volume/very low
retail price) every fraction of a cent still counts, and there is no
thing like a "too small cost difference".
 
> play a tune, or plastic giveaway toys with a kid's comic) the
> peripherals like a timer or two and a DAC or PWM with amplifier cost
> a lot more than the cpu core in terms of die space.
 
It is true that for applications that must drive a relatively heavy load
the output transistor(s) are relatively large. Also the bonding pads
take up percentage wise quite a bit of space on a small die. However
4-bit microcontrollers tend to have very few peripherals. Timers and PWM
circuitry typically do not require more die space than the core and the
associated RAM and ROM memory. A DAC (whose resistor network would
occupy quite a bit of die real-estate) is usually omitted as PWM is for
those applications good enough.
 
Also those applications typically don't use the smaller, more advanced
(& more expensive) processes. That means the core, ROM and RAM still
takes up quite a bit of die space. Hence when every fraction of cent is
relevant it still pays to have very low-end microcontroller that can do
the job. Also for extremely low power applications (like clock,
thermometer...etc.) a dedicated 4-bit processor can still have an edge
compared to a more general purpose 8- or 32-bit processor.
 
Sometimes you find 4-bit microcontrollers in places were you would not
expect a microcontroller in the first place, like in my toothbrush.
Given its functionality (on/off/charge) I'd expect a few discretes would
suffice, yet apparently a 4-bit microcontroller was more economical, but
something like a general purpose 8-pin PIC apparently too expensive.
 
> the amount of memory or other peripherals. It is not uncommon to
> have quite a bit of ROM - far more than the flash sizes of an
> off-the-shelf ATTiny.
 
Once we are talking about more than a few kilobytes of memory, we are no
longer talking about a market that is targeted by the bottom-end
microcontrollers that may only cost a few cents.
 
> be far too expensive.
 
> The last 4-bit microcontroller family that was available to mere
> mortals was from Atmel - I've forgotten the name of it.
 
Atmel is/was hardly the benchmark for the very low-end & cost sensitive
market. The 8-bit AVRs are relatively expensive. They are popular in the
hobbyist scene due to the easy availability of the chips, tools &
documentation and more recently the Arduino kits, but you don't find
8-bit AVRs that often in high volume products. At the real bottom end of
the microcontroller market you find different players than the familiar
players of the higher end microcontrollers (like Microchip, ST,
Freescale....etc.).
 
Either way for C++ this has little to no relevance. If I were to write a
general purpose C++ library these days, I wouldn't be too bothered how
well it would do on anything less than a contemporary 32-bit processor.
Given how the market is developing even the 16-bit microcontroller
families like the PIC24 and MSP430 don't appear to have a very bright
future ahead of them.
Vir Campestris <vir.campestris@invalid.invalid>: Dec 31 05:34PM

On 29/12/2017 22:16, Robert Wessel wrote:
> 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.
 
My apologies. I haven't used one since ... 1982? and I seem to have
forgotten the instruction set.
 
The smallest thing I've used recently is a MIPS router chip.
 
With a Gig of ram... so not all that small!
 
Andy
Ian Collins <ian-news@hotmail.com>: Jan 01 11:31AM +1300

On 01/01/2018 05:06 AM, David Brown wrote:
 
> There we go - rant over. I don't like 8051's, and I don't like when
> manufacturers make me use them (or chase me away from good peripherals
> due to their poor choice of cpu core).
 
As one of the lucky few to get hold of preproduction prototype 8751s
back in the early 80s I have to disagree! It was a big step up from the
8748s we had been using. I never had the (dubious) pleasure of
programming one in C, but had great fun writing complex assembly
solutions in the 4K of EPROM available to us. Bit addressable memory
was incredibly useful for the kind of products we were building at the
time, but I've no idea how is is exploited from C or C++.
 
--
Ian.
Jorgen Grahn <grahn+nntp@snipabacken.se>: Dec 31 12:01PM

On Thu, 2017-12-28, Richard wrote:
>>coding style and let me learn more about how they work?
 
> It is unclear if you are asking how to *implement* std::vector, etc.,
> or if you are asking how to *use* the standard library.
 
Yes, it's unclear.
 
 
> 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++.
 
Well ... it seems to me that implementing e.g. std::list is 50% about
understanding the general concept of linked lists, and 50% about
fitting it into the C++ language and its concept of containers.
 
/Jorgen
 
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
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.

Saturday, December 30, 2017

Digest for comp.lang.c++@googlegroups.com - 7 updates in 2 topics

bitrex <bitrex@de.lete.earthlink.net>: Dec 30 08:10AM -0500

On 12/29/2017 03:46 PM, Vir Campestris wrote:
 
> 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
 
<https://www.microchip.com/wwwproducts/en/ATtiny85>
 
Nah, I'm still in my 30s. :-) The Microchip (formerly Atmel) RISC 8 bits
ain't my grandad's 8 bit! 32 registers, most instructions execute in one
clock cycle. At 20 MHz I can run multiple fixed-point digital filters on
there fed from the 10 bit ADC channels, no problem at all. An 8x8
unsigned software-multiply IIRC comes in at under 40 clocks.
 
You can cram a lot of C++11 in 8k program memory and 512 bytes SRAM. The
current project I'm working on is nearly 2000 SLOC in C++ and with
link-time optimization comes in occupying about 6k of the program space.
Dombo <dombo@disposable.invalid>: Dec 30 03:28PM +0100

Op 29-Dec-17 om 23:16 schreef Robert Wessel:
> 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.
 
Only the smallest (i.e. ATtiny) 8-bit AVRs. Most 8-bit AVRs do have a
2-cycle hardware multiplier. These days you have to use a very low-end
CPU not to get a hardware multiplier, I doubt there exists a reasonable
C++ compiler for those.
David Brown <david.brown@hesbynett.no>: Dec 30 08:33PM +0100

On 30/12/17 15:28, Dombo wrote:
> 2-cycle hardware multiplier. These days you have to use a very low-end
> CPU not to get a hardware multiplier, I doubt there exists a reasonable
> C++ compiler for those.
 
There used to be some quite large AVR's without multipliers. Some
designs are long-lived, and still work with such old devices (AVRs or
other microcontrollers). There are still a depressing number of
8051-based devices around (small USB devices, Z-Wave chips, "smart"
ADCs, etc.).
 
And in some cases, you can use C++ just fine. C++ (excluding exceptions
and RTTI, which is usually what you want anyway) works just fine across
the board for AVRs - even the smallest devices.
 
But for modern chips there is are very few that don't have hardware
multiply, even at the low end.
Dombo <dombo@disposable.invalid>: Dec 30 11:05PM +0100

Op 30-Dec-17 om 20:33 schreef David Brown:
> other microcontrollers). There are still a depressing number of
> 8051-based devices around (small USB devices, Z-Wave chips, "smart"
> ADCs, etc.).
 
The 8051 does have a multiply instruction.
 
> And in some cases, you can use C++ just fine. C++ (excluding exceptions
> and RTTI, which is usually what you want anyway) works just fine across
> the board for AVRs - even the smallest devices.
 
I didn't intend to imply that you can't have a C++ compiler for a
low-end CPU core, just that it less likely someone has bothered to make
one. The really low-end CPU cores (below lets say the 8-bit AVRs) tend
to be more awkward in several aspects (Harvard architecture,
bank-switching, very limited stack...etc.) making it harder to make a
halfway decent compiler for them and due to their limited nature also
less necessary.
 
My experience with the 8-bit AVRs is that one do need to adapt ones C++
coding style significantly to suit the limitations of this
microcontroller to get the compiler to produce something that is memory-
and performance-wise reasonably efficient. This makes it unlikely that
one could just use a generic C++ library that is not written with the
limitations of 8-bit AVR in mind and expect a acceptable result. Once
you get to the slightly higher end processors (e.g. ARM Cortex M0) this
becomes less and less of an issue.
 
 
> But for modern chips there is are very few that don't have hardware
> multiply, even at the low end.
 
These days one can expect a hardware multiplier in contemporary
microcontrollers that cost 1 USD or even less in small quantities.
Unless one intends to target extremely price-sensitive and very high
volume markets, it does make little sense to me to worry about CPUs
without hardware multiplier.
bitrex <bitrex@de.lete.earthlink.net>: Dec 30 05:44PM -0500

On 12/30/2017 05:05 PM, Dombo wrote:
> bank-switching, very limited stack...etc.) making it harder to make a
> halfway decent compiler for them and due to their limited nature also
> less necessary.
 
There's not much below the ATTiny series; an ATTiny85 is around 75 cents
in quantity. You get 8k of program space and 512 bytes of SRAM for your
money, and C++11 code using all the "modern" features except for dynamic
allocation and smart pointers works well via avr-gcc. Templates,
policy-based design, abstract virtual classes, lambdas, all the stuff.
David Brown <david.brown@hesbynett.no>: Dec 31 12:23AM +0100

On 30/12/17 23:05, Dombo wrote:
>> 8051-based devices around (small USB devices, Z-Wave chips, "smart"
>> ADCs, etc.).
 
> The 8051 does have a multiply instruction.
 
There are many 8051 variants - I think only some have multiply hardware.
(Even if they have multiply hardware, 8051 cores are still depressing!).
 
 
> I didn't intend to imply that you can't have a C++ compiler for a
> low-end CPU core, just that it less likely someone has bothered to make
> one.
 
I don't expect anyone intentionally planned to make a C++ compiler for
an AVR tiny! But the AVR family are all supported by gcc - once you
have the C compiler working for them, the basic C++ support is free.
Last I heard, there was minimal C++ library support for avr-gcc, and
thus things like exceptions don't work. (Header libraries are fine, of
course.)
 
IAR certainly has C++ support for some small microcontrollers. I
haven't looked at the details there, and don't know which ones they support.
 
> bank-switching, very limited stack...etc.) making it harder to make a
> halfway decent compiler for them and due to their limited nature also
> less necessary.
 
That is certainly true. But support for C++ (at least baring
exceptions) is not much harder than supporting C. Once you have a C
compiler, most of the work of C++ support is in the front end - and that
will be common for a whole family of different targets.
 
Of course, that does not mean you get /efficient/ C++ support. Virtual
methods are going to be really big and slow on a COP8, 8051 or PIC16.
It's just that /if/ you have made a C compiler for them, and you already
have a C++ front end for your ARM targets (or whatever), then supporting
virtual methods (or any other C++ feature) is not actually that much work.
 
> coding style significantly to suit the limitations of this
> microcontroller to get the compiler to produce something that is memory-
> and performance-wise reasonably efficient.
 
Yes, you usually want to write code in a specific way for that kind of
chip. It applies to C as well. You make a lot more use of uint8_t and
int8_t than you normally would, for example (since these are 8-bit
cores). You minimise the use of pointers, as their pointer registers
are not great. You need compiler extensions to make efficient use of
read-only data in flash rather than ram.
 
> limitations of 8-bit AVR in mind and expect a acceptable result. Once
> you get to the slightly higher end processors (e.g. ARM Cortex M0) this
> becomes less and less of an issue.
 
Agreed.
 
> Unless one intends to target extremely price-sensitive and very high
> volume markets, it does make little sense to me to worry about CPUs
> without hardware multiplier.
 
We are getting to that stage. There are still cases where a Cortex M0
is too big, too slow, too power-hungry, too expensive - but it is a
rapidly shrinking section of the market. (I once knew someone whose job
was cost reduction for board designs. With the boards he worked on, if
he could find a way to eliminate a single SMD resistor, it would justify
his year's salary.) Still, many designs don't change much and last a
long time - it can be far more efficient to keep the same 15 year old
device on the board than swap it for a new device and re-do much of the
development.
 
For new designs, however, it is going to be very rare that you don't
have a 16-bit or 32-bit core with hardware multiply and tools with at
least reasonable C++ support.
legalize+jeeves@mail.xmission.com (Richard): Dec 30 12:27AM

[Please do not mail me a copy of your followup]
 
Vir Campestris <vir.campestris@invalid.invalid> spake the secret code
 
>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.
 
Yeah, it's pretty hard to read, particularly since all their internal
identifiers are splat blasted with leading _'s because those are the
portions of the identifier space reserved for the implementation.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Terminals Wiki <http://terminals-wiki.org>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
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.

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.

Thursday, December 28, 2017

Digest for comp.lang.c++@googlegroups.com - 14 updates in 4 topics

唐彬 <tb731685340@gmail.com>: Dec 27 10:42PM -0800

#include <iostream>
using namespace std;
 
 
class Smart_Ptr;
 
class U_Ptr {
friend class Smart_Ptr;
private:
U_Ptr(int *_p): p(_p), use(1) {
cout << "U_Ptr constructor is called !" << endl;
}
~U_Ptr() {
cout << "U_Ptr destructor is called!" << endl;
delete p;
}
int use;
int *p;
};
 
class Smart_Ptr {
public:
Smart_Ptr(int *_p): ptr(new U_Ptr(_p)) {
 
cout << "Smart_Ptr constructor is called !" << endl;
}
~Smart_Ptr() {
 
cout << "Smart_Ptr destructor is called !" << endl;
if(--ptr->use == 0) {
delete ptr;
}
}
 
int get_int() const { return *ptr->p; }
 
private:
U_Ptr *ptr;
};
 
void test() {
int a = 8;
Smart_Ptr obj(&a);
cout << "int val of obj a is " << obj.get_int() << endl;
return ;
}
 
int main() {
cout << "now testing my Smart_Ptr:" << endl;
test();
return 0;
}
Paavo Helde <myfirstname@osa.pri.ee>: Dec 28 12:44PM +0200

On 28.12.2017 8:42, 唐彬 wrote:
 
> private:
> U_Ptr *ptr;
> };
 
 
You have not defined any copy constructor for your classes, so compiler
generates them automatically, but gets it wrong. Ditto for the
assignment op, move ctor and move assignment op. You should either
define them or declare them as deleted if they are not needed.
 
Another tell-tale of the same thing is that your code contains code for
decrementing the refcounter, but not for incrementing.
 
See http://en.cppreference.com/w/cpp/language/rule_of_three for details.
 
I also hope you are aware C++ already contains std::shared_ptr and this
is just a learning exercise.
 
Cheers
Paavo
Marcel Mueller <news.5.maazl@spamgourmet.org>: Dec 28 11:50AM +0100

On 28.12.17 07.42, 唐彬 wrote:
> Smart_Ptr(int *_p): ptr(new U_Ptr(_p)) {
> cout << "Smart_Ptr constructor is called !" << endl;
> }
 
First of all the copy constructor is missing. So ->use is not
incremented in this case.
This will decrement ->use multiple times on destruction. On the first
invocation the underlying object is destroyed. Any further access is
after the memory has been released, i.e. UB.
 
> void test() {
> int a = 8;
> Smart_Ptr obj(&a);
 
Secondly you taking the address of an object on the stack here and pass
it to a smart pointer that takes the ownership. The resulting call to
delete will sadly fail because the object is owned by the stack rather
than the heap. Again UB.
 
> cout << "int val of obj a is " << obj.get_int() << endl;
> return ;
> }
 
Here it crashes because the destructor invokes delete &a;
 
 
BTW. it is amazingly complex to write real safe reference counted smart
pointers, especially if multiple threads come into play. And it's more
complex to write a smart pointer which is still pretty fast. Have a look
at the implementation of std::shared_ptr to get an impression of it.
And it is even more complex to write a reference counted smart pointer
that provides strong thread safety, i.e. get access to a valid object
from a global smart pointer instance that changes asynchronously. Not
even std::shared_ptr supports this pattern.
 
 
Marcel
Ben Bacarisse <ben.usenet@bsb.me.uk>: Dec 28 10:52AM


> #include <iostream>
> using namespace std;
 
... more code
 
What did you try to find out what's wrong? Did you, for example, try to
simplify the example?
 
Does this version make the error clearer to you:
 
#include <iostream>

class U_Ptr {
public:
U_Ptr(int *_p): p(_p) { }
~U_Ptr() {
std::cout << "U_Ptr destructor is called!" << std::endl;
delete p;
}
int *p;
};

int main() {
int a = 8;
U_Ptr obj(&a);
return 0;
}
 
If not, try to remove the class altogether whilst leaving the actions
that the class performs intact. That should make it clear!
 
--
Ben.
schwarz45@yahoo.com: Dec 28 09:42AM -0800

On Thursday, December 28, 2017 at 2:52:10 AM UTC-8, Ben Bacarisse wrote:
> that the class performs intact. That should make it clear!
 
> --
> Ben.
 
In your example, the failure occurs on the statement
delete p;
because p does not point to memory allocated by new.
 
In the OP's code, the failure occurs in ~Smart_Ptr on the statement
delete ptr;
but in this case ptr DOES point to memory allocated by new (courtesy of the initialization performed by the U_Ptr constructor). At no point is ptr modified. It seems like ~Smart_Ptr should have no trouble calling ~U_Ptr for the object ptr points to.
 
Yes, ~U_Ptr will fail when it tries to delete p but the current failure occurs before that destructor begins to execute.
Ben Bacarisse <ben.usenet@bsb.me.uk>: Dec 28 08:04PM

> trouble calling ~U_Ptr for the object ptr points to.
 
> Yes, ~U_Ptr will fail when it tries to delete p but the current
> failure occurs before that destructor begins to execute.
 
Not when I run it -- the failure is in U_Ptr::~U_Ptr called from
Smart_Ptr::~Smart_Ptr. Are you saying the OP's code (which as has been
pointed out does have other problems) is failing for some other reason?
 
--
Ben.
Barry Schwarz <schwarzb@dqel.com>: Dec 28 02:12PM -0800

On Thu, 28 Dec 2017 20:04:48 +0000, Ben Bacarisse
 
>schwarz45@yahoo.com writes:
 
<snip>
 
 
>Not when I run it -- the failure is in U_Ptr::~U_Ptr called from
>Smart_Ptr::~Smart_Ptr. Are you saying the OP's code (which as has been
>pointed out does have other problems) is failing for some other reason?
 
My mistake. The debugger I am using will step into a destructor
called as the result of a return statement but not when called by a
delete statement. By placing breakpoints in all the destructors I was
able to verify that ~Smart_Ptr successfully calls ~U_Ptr and that
fails on the delete p statement as you previously noted.
 
--
Remove del for email
mcheung63@gmail.com: Dec 28 10:36AM -0800

Rick, why you stop? post some holy shit in thie group pls
Bonita Montero <Bonita.Montero@gmail.com>: Dec 28 11:56AM +0100

There you can download a good book on the C++ standard-library:
http://bit.ly/2C2o0yr
woodbrian77@gmail.com: Dec 28 08:29AM -0800

On Wednesday, December 27, 2017 at 2:28:02 PM UTC-6, Paavo Helde wrote:
 
> Congrats Brian, you have found a (hopefully rare) C++ tutorial which
> seems to contain *no* mention of std::vector, std::list, etc, despite
> what OP asked for!
 
I think it's becoming more obvious that on-line code
generation is the way things have to be.
 
That's my explanation for the little vultures here that
want to see me fall.
 
 
 
Brian
Ebenezer Enterprises - Enjoying programming again.
http://webEbenezer.net
Mr Flibble <flibble@i42.co.uk>: Dec 28 05:50PM

> generation is the way things have to be.
 
> That's my explanation for the little vultures here that
> want to see me fall.
 
Another explanation is that you are simply deluded. This explanation I
find more likely.
 
/Flibble
woodbrian77@gmail.com: Dec 28 10:14AM -0800

On Thursday, December 28, 2017 at 11:51:16 AM UTC-6, Mr Flibble wrote:
> > want to see me fall.
 
> Another explanation is that you are simply deluded. This explanation I
> find more likely.
 
Another vulture heard from.
legalize+jeeves@mail.xmission.com (Richard): Dec 28 06:28PM

[Please do not mail me a copy of your followup]
 
=?UTF-8?B?5ZSQ5b2s?= <tb731685340@gmail.com> spake the secret code
 
>where can i find the code or tutorial to learn from, which can better my
>coding style and let me learn more about how they work?
 
It is unclear if you are asking how to *implement* std::vector, etc.,
or if you are asking how to *use* the standard library.
 
For the latter, I recommend Nicolai Josuttis' book "The C++ Standard
Library: A Tutorial and Reference" (2nd ed.)
<http://amzn.to/2DsmXnv>
 
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++.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Terminals Wiki <http://terminals-wiki.org>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
legalize+jeeves@mail.xmission.com (Richard): Dec 28 06:25PM

[Please do not mail me a copy of your followup]
 
Andrey Karpov <karpov2007@gmail.com> spake the secret code
>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/
 
With regards to breaking dependencies, I found this lightning talk
interesting:
 
CppCon 2017: Charles L. Wilcox "The Three Layers of Headers A
Curious Discovery"
<https://www.youtube.com/watch?v=su9ittf-ozk>
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Terminals Wiki <http://terminals-wiki.org>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
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.

Wednesday, December 27, 2017

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

唐彬 <tb731685340@gmail.com>: Dec 27 07:50AM -0800

where can i find the code or tutorial to learn from, which can better my coding style and let me learn more about how they work?
thx a lot
woodbrian77@gmail.com: Dec 27 08:15AM -0800

On Wednesday, December 27, 2017 at 9:50:35 AM UTC-6, 唐彬 wrote:
> where can i find the code or tutorial to learn from, which can better my coding style and let me learn more about how they work?
> thx a lot
 
https://www.cprogramming.com/tutorial/c++-tutorial.html
 
A book would probably be a good idea.
 
 
Brian
Ebenezer Enterprises
http://webEbenezer.net
Paavo Helde <myfirstname@osa.pri.ee>: Dec 27 10:27PM +0200

>> where can i find the code or tutorial to learn from, which can better my coding style and let me learn more about how they work?
>> thx a lot
 
> https://www.cprogramming.com/tutorial/c++-tutorial.html
 
Congrats Brian, you have found a (hopefully rare) C++ tutorial which
seems to contain *no* mention of std::vector, std::list, etc, despite
what OP asked for!
 
It is possible to learn C++ starting from high-level containers like
std::vector and leave the legacy C pointer and raw array quirks until
later. There was a good book "Accelerated C++" doing exactly this, but
it is now a bit out-dated.
 
Some quick googling surprisingly revealed that a pretty thorough
introduction level overview can be found in wikipedia, see e.g. from
https://en.wikipedia.org/wiki/Standard_Template_Library
 
Probably there are better resources somewhere...
 
hth
Paavo
"James R. Kuyper" <jameskuyper@verizon.net>: Dec 27 03:57PM -0500

On 12/27/2017 03:27 PM, Paavo Helde wrote:
 
> Congrats Brian, you have found a (hopefully rare) C++ tutorial which
> seems to contain *no* mention of std::vector, std::list, etc, despite
> what OP asked for!
 
Go up one level: <https://www.cprogramming.com/tutorial.html> contains a
section titled "C++ Standard Template Library (STL) tutorials", with
five links underneath. I'm not, in any way, endorsing this web site.
Ian Collins <ian-news@hotmail.com>: Dec 28 10:14AM +1300

On 12/28/2017 09:57 AM, James R. Kuyper wrote:
 
> Go up one level: <https://www.cprogramming.com/tutorial.html> contains a
> section titled "C++ Standard Template Library (STL) tutorials", with
> five links underneath. I'm not, in any way, endorsing this web site.
 
Why oh why do tutorial still use that obsolete term (STL)?
 
--
Ian.
Mr Flibble <flibble@i42.co.uk>: Dec 27 09:56PM

On 27/12/2017 21:14, Ian Collins wrote:
>> section titled "C++ Standard Template Library (STL) tutorials", with
>> five links underneath. I'm not, in any way, endorsing this web site.
 
> Why oh why do tutorial still use that obsolete term (STL)?
 
To wind pedants up of course.
 
/Flibble
David Brown <david.brown@hesbynett.no>: Dec 27 09:33AM +0100

On 26/12/17 22:33, jacobnavia wrote:
 
> You can have a linux screen in a mac using vnc. Of course it runs on
> linux too, so if your linux machine is connected to the network, it
> should work.
 
vnc works as viewer and server on any "big" system (Linux, Mac, Windows,
BSD, etc.). I find it particularly useful to access Windows systems
remotely, because they don't normally have sshd and you often need a gui
for them.
 
But if you are using ssh and text mode editors like vi, why bother with
vnc? It is a lot more efficient to use ssh directly to the Linux
machines than to go via VNC. (Of course, I may be misunderstanding your
setup.)
 
 
> I have only one screen. I connect 4 machines, (a mac, a PC, and two
> small machines running on ARM/Debian) and it looks amazing to me.
 
If you have the desk space, multiple screens are worth the investment -
you can never have too many (nor too many pixels or inches).
 
 
> No games, of course. I just ned a ssh text interface for work. I still
> use vi (eclipse is too huge to try to move it to those small CPUs).
 
You can happily use eclipse on your Mac to work with files on your ARM
boards. A common setup would be to have eclipse on your "host" system
(a relatively big and fast Mac or Linux PC, or Windows if you are
willing to work much harder on the setup), and have a cross-compiler on
it. You do all your development - editing, compiling, debugging,
documentation - on that machine. Export the filesystem as NFS and mount
it on the ARM boards remotely. Then via ssh to the ARM boards, you can
run the program as though it were local to the machine. Debugging is
done with remote gdb - your host machine has the debugger gui, while the
code runs on the ARM board. It can take a little effort (and guides on
the internet) to get it all set up, but it is a lot more efficient to
work with than to do the editing and compiling on the small ARM board.
 
ram@zedat.fu-berlin.de (Stefan Ram): Dec 27 01:34AM

>I don't have a copy of clang installed, so I can't test that.
 
I have reduced the example code:
 
struct X { struct B {}; struct A { operator B(); }; };
X::A::operator B() { return B {}; }
 
. I have a clang-based style checker, which did not complain.
 
A recent draft has this example in 12.2.1p4:
 
struct X {
typedef int T;
static T count;
void f(T);
};
void X::f(T t = count) { }
 
. One can see that in the last line, »T« and »count« are
used without qualification.
 
However, in error messages, the operator function is called
 
X::A::operator X::B()
 
by gcc, hinting that this is some kind of canonical
identification of that operator function.
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.