Monday, March 12, 2018

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

Daniel <danielaparker@gmail.com>: Mar 11 04:32PM -0700

On Sunday, March 11, 2018 at 4:10:27 PM UTC-4, Rick C. Hodgin wrote:
> we both see in scientific data.
 
> The Bible teaches 6,000 years since creation, and observable evidence
> corroborates ...
 
This _has_ to be one of Mr Flibble's, doesn't it?
 
Daniel
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Mar 11 11:41PM

On 11/03/2018 23:32, Daniel wrote:
 
>> The Bible teaches 6,000 years since creation, and observable evidence
>> corroborates ...
 
> This _has_ to be one of Mr Flibble's, doesn't it?
 
Unfortunately not. Poe's Law definitely applies.
 
/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."
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Mar 11 05:35PM -0700

On Sunday, March 11, 2018 at 7:32:12 PM UTC-4, Daniel wrote:
 
> > The Bible teaches 6,000 years since creation, and observable evidence
> > corroborates ...
 
> This _has_ to be one of Mr Flibble's, doesn't it?
 
Daniel, I know it's hard to believe because you've had it drilled
into you since you were young about millions of years and evolution,
but you've been lied to. The truth is a young Earth around 6,000
years old.
 
Before you summarily mock and dismiss the claim, look at the evidence
from the Biblical creation perspective, and try and find flaws with
the reasoning in ascribing what the evidence shows for a young Earth.
 
You'll see we are not whackos, but look at observable evidence and
how it aligns with Biblical teaching. There is not one finding in
science or history that does not correlate with the Biblical perspective,
the "traditional explanations" of evolution and millions of years not
withstanding.
 
It is the enemy of this world who is teaching lies to everyone, and
because of sin people can believe them. But God teaches the truth.
I urge you to investigate it personally.
 
--
Rick C. Hodgin
Daniel <danielaparker@gmail.com>: Mar 11 06:06PM -0700

On Sunday, March 11, 2018 at 8:35:32 PM UTC-4, Rick C. Hodgin wrote:
 
> The truth is a young Earth around 6,000 years old.
 
Even your pastor wouldn't believe that, Rick.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Mar 11 06:24PM -0700

On Sunday, March 11, 2018 at 9:06:17 PM UTC-4, Daniel wrote:
> On Sunday, March 11, 2018 at 8:35:32 PM UTC-4, Rick C. Hodgin wrote:
 
> > The truth is a young Earth around 6,000 years old.
 
> Even your pastor wouldn't believe that, Rick.
 
It is the Biblical age. The Bible gives dates (without months) for
people creating a lineage:
 
http://www.godsholyspirit.com/creation/adam2joseph.htm
http://www.jamescarmody.com/timeline/
https://answersingenesis.org/bible-timeline/
 
It sounds foolish to you because it is information that's been mocked
and ridiculed as ridiculous, all the while Satan's alternative ideas
have been widely disseminated and taught.
 
Investigate the claims, Daniel. Prove us wrong.
 
--
Rick C. Hodgin
Daniel <danielaparker@gmail.com>: Mar 11 07:46PM -0700

On Sunday, March 11, 2018 at 9:24:55 PM UTC-4, Rick C. Hodgin wrote:
 
> http://www.godsholyspirit.com/creation/adam2joseph.htm
> http://www.jamescarmody.com/timeline/
> https://answersingenesis.org/bible-timeline/
 
Wikipedia's has a good article that discusses Young Earth Creationism,
 
https://en.wikipedia.org/wiki/Young_Earth_creationism
 
I think I'll go with the 99.9 percent of scientists and most modern theologians that dismiss Young Earth creationism :-)
 
Just out of interest, which Young Earth Category would you fall under:
 
(a) Believers in flood geology attach great importance to the biblical story of Noah's Flood in explaining the fossil record and geological strata
 
(b) A ... form of YEC ... which claims that there has been essentially no development of the Universe, Earth, or life whatsoever since creation — that creation has been in a steady state since the beginning without major changes.
 
Thanks,
Daniel
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Mar 12 03:16AM -0700

On Sunday, March 11, 2018 at 10:47:03 PM UTC-4, Daniel wrote:
 
> Wikipedia's has a good article that discusses Young Earth Creationism,
 
> https://en.wikipedia.org/wiki/Young_Earth_creationism
 
> I think I'll go with the 99.9 percent of scientists and most modern theologians that dismiss Young Earth creationism :-)
 
I'm telling you there is a pervasive enemy at work in this world
that is deceiving people by his lies in teaching alternatives to
the true things of God:
 
https://www.biblegateway.com/passage/?search=Revelation+12%3A9&version=KJV
 
9 And the great dragon was cast out, that old serpent,
called the Devil, and Satan, which deceiveth the whole
world: he was cast out into the earth, and his angels
were cast out with him.
 
I'm asking you to investigate the claims of the Biblical timeline
narrative of 6,000 years, and the evidence from any and all branches
of man's discovery you're interested in, and try to personally find
a flaw in our reason or interpretation.
 
I'm asking you to personally investigate the details, and not jump
on board with the large group of people who believe contrarywise to
God's teachings:
 
https://www.biblegateway.com/passage/?search=Matthew+7%3A13-14&version=KJV
 
13 Enter ye in at the strait gate: for wide is the gate,
and broad is the way, that leadeth to destruction, and
many there be which go in thereat:
14 Because strait is the gate, and narrow is the way,
which leadeth unto life, and few there be that find it.
 
The word "strait" means narrow, constrained, strict:
 
https://av1611.com/kjbp/kjv-dictionary/strait.html
http://biblehub.com/greek/4728.htm
 
All evidence supports the Biblical narrative. But Satan invents
many alternative theories which remove God, remove Jesus, remove or
replace creation with something other than the Bible's teaching.
He does this because he's both a liar and a defeated foe. He lost
in his rebellion. Jesus defeated him at the cross. Now Satan's
goal is to deceive as many people away from Jesus as is possible,
because Jesus has made salvation free to everyone just for the asking.
 
Satan works constantly to keep people from Christ, accusing each
of us day and night of every sin we commit:
 
https://www.biblegateway.com/passage/?search=Revelation+12%3A9-11&version=KJV
 
I teach you the truth. I'm not asking you for money, or to join
my physical church building or denomination. I'm asking you to go
to Jesus and ask forgiveness so you can have eternal life. That
is all.
 
--
Rick C. Hodgin
"Öö Tiib" <ootiib@hot.ee>: Mar 12 05:46AM -0700

On Monday, 12 March 2018 12:16:50 UTC+2, Rick C. Hodgin wrote:
 
> I'm telling you there is a pervasive enemy at work in this world
> that is deceiving people by his lies in teaching alternatives to
> the true things of God:
 
What we can all observe with bare eye (like Andromeda Galaxy 2.5
millions light years away and miles thick sediment layers) are lies. What
we see nowhere (like your demons and dragons) are truth. All
evidence supports that and no flaws in such reasoning. So we should
go ask forgiveness from Jesus that we did it. Correct?
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Mar 12 06:04AM -0700

On Monday, March 12, 2018 at 8:46:28 AM UTC-4, Öö Tiib wrote:
> > the true things of God:
 
> What we can all observe with bare eye (like Andromeda Galaxy 2.5
> millions light years away
 
From the Bible:
 
https://www.biblegateway.com/passage/?search=Genesis+1%3A16&version=KJV
 
16 And God made two great lights; the greater light to rule the day,
and the lesser light to rule the night: he made the stars also.
 
> and miles thick sediment layers) are lies.
 
From the flood. We see evidence of sediment layers from the 1980s
eruption of Mount St. Helens, which laid down many layers similar to
those we see elsewhere:
 
https://www.biblegateway.com/passage/?search=Genesis+7%3A19&version=KJV
 
19 And the waters prevailed exceedingly upon the earth; and all the high
hills, that were under the whole heaven, were covered.
 
Mount St. Helens:
 
https://answersingenesis.org/geology/mount-st-helens/
 
> What
> we see nowhere (like your demons and dragons)
 
Demons are not visible. They are spirits. Their physical bodies exist,
but they have been locked into everlasting chains awaiting the day of
judgment (the last day, which is yet to come because God's grace is still
at work on the Earth right now for those who will yet be saved).
 
Their bodies are locked in chains, but they have spirits which can leave
their bodies and go out into the world. We have seen this in The Bible
in demon possession of people, but also in influencing against all things
that are of God.
 
Wherever there is strife, or hate, or war, or evil, or ideas which run
contrary to God, these are the result of evil spirits whispering their
thoughts, feelings, and emotions, into the bodily hosts of us here on
this Earth. They are tempting us continually to sin. When we acquiesce
to their guidance, we give them a legal license to come in to our bodies
and they take up residence within us.
 
This is literal demon possession, but it's not like on The Exorcist.
It is, however, a real thing that causes the person to begin doing the
hateful and harmful things the Bible warns against. It is the person
following after Satan's literal voice by the demonic influence, instead
of the guidance and teachings of God.
 
> are truth. All
> evidence supports that and no flaws in such reasoning. So we should
> go ask forgiveness from Jesus that we did it. Correct?
 
Everything points to God, Öö Tiib. It is only because of sin and our
ability to believe Satan's lies through our fallen-in-sin bodies and
its flesh-based reasoning mind (that is able to be deceived), that we
can buy his alternative ideas to God's truth.
 
All I ask you to do is investigate whatever area you have personal
interests in. To press in and read, review, study, and understand the
Biblical narrative, the Biblical teaching, and then look at the evidence
from that point of view (that God does exist, that the flood did happen,
that Jesus is real, that Satan is real, that demons exist, and so on),
and then find ANY flaw in our reasoning.
 
You won't be able to.
 
It comes down to whether or not a person will seek the truth, or if they
are content to believe the lie. All who are desiring honestly from within
to know the truth will come to that information because God knows they are
seeking the same, and He will make it possible for them to come to that
knowledge. He'll lead people to those who teach the truth, and He will
personally affirm within them that truth so that when they hear it they
will know it is truth.
 
--
Rick C. Hodgin
David Brown <david.brown@hesbynett.no>: Mar 12 03:17PM +0100

On 12/03/18 13:46, Öö Tiib wrote:
> we see nowhere (like your demons and dragons) are truth. All
> evidence supports that and no flaws in such reasoning. So we should
> go ask forgiveness from Jesus that we did it. Correct?
 
Now you are getting somewhere.
 
Rick has very simple demands:
 
1. Assume that everything in the Bible is literally true - despite any
contradictions, mistranslations, or whatever.
 
2. Assume that everything Rick says is literally true - despite his
protestations that it is not /him/ you should believe, anything other
than complete agreement with his beliefs is a sign of daemonic possession.
 
3. Assume that all the nutjob websites and wacko youtube videos are
entirely true.
 
4. Assume that the devil and his gang of daemons are practically
almighty - they are everywhere, infect everything, and distract everyone
from "the truth".
 
5. Assume that this is all /your/ fault, personally - all faults in the
world, all disease, all death, all discomfort. It is all /your/
personal fault (and everyone else's, simultaneously), because of your
sin. And your sin is /your/ fault, because you have always had it,
because Adam ate an apple.
 
6. Assume that Jesus died for your sins, to let you off the hook.
Except that he didn't die, it was just a brief "time out". Except that
it doesn't save you from eternal damnation - you still have to choose to
follow Rick's cult. Except that you can't choose to follow Rick's cult
- only those that Rick's god picks will be able to follow it.
 
Once you have accepted these assumptions as complete and infallible
facts, you are ready to start searching for "the truth".
 
Any scientific evidence, observations, thoughts, or plain common sense
that contract these assumptions must obviously be wrong, since they
contradict the assumptions. Therefore they are in fact /proof/ of the
assumptions - if all else fails, they are proof of number 4 above. So
the more you look at reality with the "right" viewpoint, the more proof
you have that your circular reasoning is sound.
 
When you have gone round this circle often enough, you will inevitably
come to the conclusion that you are obliged to post this stuff to
technical newsgroups at every opportunity. It is only logical.
 
 
(For the real Christians out there - yes, I know that is not close to
the Christian message. I think it is a fair summary of Rick's cult
ideas, however.)
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Mar 12 07:35AM -0700

To be clear, my intentions are thus:
 
1) Assume the Bible is true for the purposes of investigating these
claims I make, which are a recitation of the claims made in the
Bible itself. I ask you to also GO TO THE BIBLE and verify that
the things I indicate are indicated accurately.
 
2) Next, pick ANY AREA of scientific / geologic / whatever interest,
and go and investigate the claims for yourself. See with your
own eyes if that information doesn't hold up to the exact Biblical
narrative.
 
The starting point I'm asking for is something people don't already
know as truth, and would not naturally consider as truth from their
prior teaching and instruction in school, media, TV, movies, songs,
many other campaigns to perpetuate Satan's alternatives to God's truth,
and that's this: assume the Bible is correct for this invetsigation
effort, AND THEN go and examine the evidence AND SEE if it aligns with
the Biblical narrative as it is.
 
You'll find it does align. You'll find there is truth and reason at
every point of the young Earth argument. You'll find there is real
observable reproducible evidence which supports every aspect. And you
will find many answers to questions that even today mainstream science
cannot answer.
 
--
Rick C. Hodgin
"Öö Tiib" <ootiib@hot.ee>: Mar 12 08:57AM -0700

On Monday, 12 March 2018 15:04:16 UTC+2, Rick C. Hodgin wrote:
 
> https://www.biblegateway.com/passage/?search=Genesis+1%3A16&version=KJV
 
> 16 And God made two great lights; the greater light to rule the day,
> and the lesser light to rule the night: he made the stars also.
 
That does not say what is the Andromeda Galaxy that we see.
Was there galaxy 2.5 millions years ago or wasn't it there?
Is what we see an image of galaxy that actually wasn't there 2.5
millions years ago? It can be easily observed with binoculars or
even bare eye near Cassiopeia and Great Square of Pegasus in
autumn.
 
 
> From the flood. We see evidence of sediment layers from the 1980s
> eruption of Mount St. Helens, which laid down many layers similar to
> those we see elsewhere:
 
Was your flood raining mud full of fossils for a year? I did read it was
water. Eruptions, floods and geological eras do not leave similar
to each other sediments. Geologists make very good difference
between those things and have done so for centuries.
 
> but they have been locked into everlasting chains awaiting the day of
> judgment (the last day, which is yet to come because God's grace is still
> at work on the Earth right now for those who will yet be saved).
 
Figure out if they are not visible and are in chains somewhere or
they are almighty and running rampant fabricating and faking every
material evidence possible to observe on all scales. All Astronomy,
Physics, Chemistry, Geology, Biology and Paleontology evidence
must be faked since nothing aligns with literal interpretation of Bible.
On the other hand constant careful examination and verification of
those facts with better equipment just brings more new confirming
details.
Daniel <danielaparker@gmail.com>: Mar 12 09:08AM -0700

On Monday, March 12, 2018 at 10:35:56 AM UTC-4, Rick C. Hodgin wrote:
 
> 1) Assume the Bible is true for the purposes of investigating these
> claims I make
 
"It ain't what you don't know that gets you into trouble. It's what you know for sure that just ain't so." Mark Twain
leigh.v.johnston@googlemail.com: Mar 12 09:10AM -0700

Is the speed of light a lie too? If the universe is only 6000 years old then explain how we can observe galaxies further than 6000 light years away. If the universe is only 6000 years old we wouldn't be able to observe them. Sorry but the Bible is at odds with reality.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Mar 12 09:59AM -0700

On Monday, March 12, 2018 at 11:57:34 AM UTC-4, Öö Tiib wrote:
> > and the lesser light to rule the night: he made the stars also.
 
> That does not say what is the Andromeda Galaxy that we see.
> Was there galaxy 2.5 millions years ago or wasn't it there?
 
Even from your non-faith point of view, you have to acknowledge some
things:
 
(1) You make the assumption that it is 2.5 million years away. We have
never been there, we do not know that for a fact. It's a belief
based on our own reasoning abilities and things that make sense to
us, but we do not know.
 
(2) How do you know you're not in a 3D Truman Show? Where things look
like whatever they do based on wherever we are? Were we to head
off toward some distant galaxy we'd hit the projection screen in a
short while of travel.
 
(3) How do we know God didn't create the universe in a computer
simulation? Computers have only been known about recently, and
complex 3D simulations (like Star Trek holodecks) are still beyond
our grasp. What if God has it sorted out and created a universe.c
program and ran it? How many video games have fully formed sectors
that show ships doing whatever, and planets with whatever resources,
etc. We are able, in some small ways, to do what's recorded God did
in Genesis. How much more so for the real and true God, being how
much more capable than we are in our finite, flawed existence?
 
My point is: You do not know some of the things you assume. And, given
that fact, is it reasonable to conclude that the Bible, a book written
hundreds of years before any of us were born, before any of our beliefs
and thoughts were formed through our experiences and what not, that it is
to be summarily dismissed because it contradicts the teachings of our time?
 
The Bible points out there will be people teaching false things in "science
falsely so called":
 
https://www.biblegateway.com/passage/?search=1+Timothy+6%3A20-21&version=KJV
 
20 O Timothy, keep that which is committed to thy trust, avoiding
profane and vain babblings, and oppositions of science falsely
so called:
21 Which some professing have erred concerning the faith. Grace be
with thee. Amen.
 
The warning there is that arguments that delve into man's reasoning are
owned by the devil because of sin. We will not be able to win if we stay
there where Satan has dominion. Our victory comes in seeking the truth,
and honestly seeking it, for it is then that God sees us seeking and lifts
us up, depositing us where it is so we are able to find it. Without God
doing this, we will never find it because of our sin.
 
Satan owns our flesh. He dominates it because of sin. It's why we need
Jesus Christ to show us the light of truth. He operates in spirit, and
gives us new spiritual life (John 3). He overcomes our flesh and teaches
us truly and rightly.
 
Without the spirit, we do not have life, cannot know truth, and are always
and only deceived. When we come to Christ, He takes away that limitation
and replaces it with our own spirit, which then communes with His own Holy
Spirit, which leads us into all truth:
 
https://www.biblegateway.com/passage/?search=John+14%3A26&version=KJV
 
26 But the Comforter, which is the Holy Ghost, whom the Father will
send in my name, he shall teach you all things, and bring all things
to your remembrance, whatsoever I have said unto you.
 
God guides us continually from within toward the things of God.
 
> millions years ago? It can be easily observed with binoculars or
> even bare eye near Cassiopeia and Great Square of Pegasus in
> autumn.
 
Even in your secular point of view, you must acknowledge you are still
making assumptions. You have not traveled there to know, which makes
your belief in what you state your own personal form of religion. You
believe in the religion of naturalism (or whatever you want to call it).
 
> water. Eruptions, floods and geological eras do not leave similar
> to each other sediments. Geologists make very good difference
> between those things and have done so for centuries.
 
The Bible teaches us this:
 
https://www.biblegateway.com/passage/?search=Genesis+7%3A24&version=KJV
 
24 And the waters prevailed upon the earth an hundred and fifty days.
 
From what I gather, that means the waters prevailed above the surface of
everything for 150 days. They began receding after that, but Noah did
not come out of the Ark until after one year:
 
Rain began:
https://www.biblegateway.com/passage/?search=Genesis+7%3A11&version=KJV
 
11 In the six hundredth year of Noah's life, in the second month,
the seventeenth day of the month, the same day were all the fountains
of the great deep broken up, and the windows of heaven were opened.
 
Dried:
https://www.biblegateway.com/passage/?search=Genesis+8%3A14&version=KJV
 
14 And in the second month, on the seven and twentieth day of the month,
was the earth dried.
 
One year 10 days from the start of the flood to the Earth being dried to
more or less what we see today in terms of land masses and what not.
 
> On the other hand constant careful examination and verification of
> those facts with better equipment just brings more new confirming
> details.
 
I'm telling you what aligns with the Biblical teaching, and if you
observe the ways of the world you'll find it aligns with what we see.
 
Not everything in astronomy, physics, chemistry, geology, biology,
paleontology evidence is fake. But all of it aligns with the Biblical
perspective if you begin with the assumption that it is true.
 
Dating systems that place things at millions of years ... we don't
know because we weren't there. We're guessing at how it works over
that kind of timescale. We've also seen multiple evidences where
those same devices have dated things we know to be a certain age at
ridiculously outrageous ages.
 
Paleontology has demonstrated man's footprints walking with dinosaur
prints. In South America there are carved stones showing men with
spears surrounding dinosaurs.
 
This information is out there, but it's mocked and ridiculed and taken
to immediate scorn when it's presented, so that it's labeled only as
those "crazy people" or the "tin foil hat brigade" who would believe
such things.
 
But it's there, because God has promised that truth would always re-
main, even until the end of the Earth.
 
--
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Mar 12 09:59AM -0700

On Monday, March 12, 2018 at 12:08:27 PM UTC-4, Daniel wrote:
 
> > 1) Assume the Bible is true for the purposes of investigating these
> > claims I make
 
> "It ain't what you don't know that gets you into trouble. It's what you know for sure that just ain't so." Mark Twain
 
If you refuse to examine the facts, then there's nothing anyone can do
for you. You self-condemn your own soul to Hell.
 
--
Rick C. Hodgin
leigh.v.johnston@googlemail.com: Mar 12 10:03AM -0700

You are quite mad you know.
Lynn McGuire <lynnmcguire5@gmail.com>: Mar 11 09:56PM -0500

On 3/10/2018 6:11 PM, Ian Collins wrote:
 
>> So I do need to use the override keyword always in order to get a proper
>> method lookup.  Bummer.
 
> No, you don't.  Why do you object to using it?
 
in DCrudeOptionsDialog::command, I call:
CrudeGroup * crudeGroup = owner -> getCrudeGroup;
 
this gives me the ObjPtr method instead of the CrudeGroup method:
ObjPtr * anObject = crudeGroup -> dataTransferItemsToDIIW (key);
 
This is because the ObjPtr and CrudeGroup methods have different return
types. The only way that I see to force the compiler to flag the
improper return type is to use the override keyword. The compiler is
allowing the multiple return types until I tell it to only allow one
return type by use of the override keyword.
 
Thanks,
Lynn
Louis Krupp <lkrupp@nospam.pssw.com.invalid>: Mar 11 09:30PM -0600

On Sun, 11 Mar 2018 21:56:18 -0500, Lynn McGuire
>improper return type is to use the override keyword. The compiler is
>allowing the multiple return types until I tell it to only allow one
>return type by use of the override keyword.
 
Could you post a small example that reproduces the problem you're
talking about -- i.e., code that compiles but shouldn't?
 
Thanks!
 
Louis
Ian Collins <ian-news@hotmail.com>: Mar 12 05:47PM +1300

On 03/12/2018 03:56 PM, Lynn McGuire wrote:
> improper return type is to use the override keyword. The compiler is
> allowing the multiple return types until I tell it to only allow one
> return type by use of the override keyword.
 
That makes very little, if any, sense!
 
Please provide a test case.
 
--
Ian
legalize+jeeves@mail.xmission.com (Richard): Mar 12 06:17AM

[Please do not mail me a copy of your followup]
 
Lynn McGuire <lynnmcguire5@gmail.com> spake the secret code
>improper return type is to use the override keyword. The compiler is
>allowing the multiple return types until I tell it to only allow one
>return type by use of the override keyword.
 
Virtual methods are allowed to be covariant by return type so long as
the covariant return types share an inheritance relationship. See
<http://en.cppreference.com/w/cpp/language/virtual#Covariant_return_types>
 
If you use the override keyword in this case and get a compile error,
that is a bug in the compiler.
--
"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>
James Kuyper <jameskuyper@verizon.net>: Mar 12 12:21PM -0400

On 03/11/2018 10:56 PM, Lynn McGuire wrote:
 
>>>>> Is it because I am not using the override keyword in the function
>>>>> declaration ?
>>>>>      http://en.cppreference.com/w/cpp/language/override
 
Alf has already given a good answer this question, but I'm answering it
in more detail with citations from the standard below, so I'm clipping
his answer.
 
> CrudeGroup * crudeGroup = owner -> getCrudeGroup;
 
> this gives me the ObjPtr method instead of the CrudeGroup method:
> ObjPtr * anObject = crudeGroup -> dataTransferItemsToDIIW (key);
 
 
I wrote the simplest program I could come up with that contains all of
the actual lines of code that you've provided, and is consistent with
the descriptions you've give us, and is instrumented to produce output
addressing the issues you've raised. It is, I believe, well-formed code
with standard-defined behavior. As you can see from the output, it calls
the CrudeGroup version of dataTransferItemsToDIIW:
 
~/Programming/C++/testprog(70) cat covariant_return.cpp
// Based upon a message posted by Lynn McGuire <lynnmcguire5@gmail.com>
// to comp.lang.c++ with Date:Fri, 9 Mar 2018 21:50:13 -0600.
#include <iostream>
class ObjPtr
{
public:
virtual ObjPtr * dataTransferItemsToDIIW (int key){
std::cout << this << " ObjPtr::dataTransferItemsToDIIW(" << key
<< ")" << std::endl;
return this;
};
virtual ~ObjPtr() {};
};
 
class DataItem : public ObjPtr{
};
 
class DataGroup : public ObjPtr{
};
 
class CrudeGroup : public DataGroup
{
public:
virtual CrudeGroup * dataTransferItemsToDIIW (int key){
std::cout << this << " CrudeGroup::dataTransferItemsToDIIW(" <<
key << ")" << std::endl;
return this;
};
} crudeGroup;
 
struct Owner{
CrudeGroup *getCrudeGroup;
} actual = {&crudeGroup}, *owner = &actual;
 
struct DCrudeOptionsDialog
{
void command(int key)
{
CrudeGroup * crudeGroup = owner -> getCrudeGroup;
ObjPtr * anObject = crudeGroup -> dataTransferItemsToDIIW (key);
std::cout << "owner:" << owner << " crudeGroup:" << crudeGroup
<< " anObject:" << anObject << std::endl;
}
} dialog;
 
int main(void)
{
dialog.command(0);
}
 
~/Programming/C++/testprog(71) g++ -std=c++1y -pedantic -Wall
-Wpointer-arith -Wcast-align -fno-enforce-eh-specs -ffor-scope
-fno-gnu-keywords -fno-nonansi-builtins -Wctor-dtor-privacy
-Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual -Wsign-promo
covariant_return.cpp -o covariant_return
~/Programming/C++/testprog(72) ./covariant_return
0x602078 CrudeGroup::dataTransferItemsToDIIW(0)
owner:0x602080 crudeGroup:0x602078 anObject:0x602078
 
 
> This is because the ObjPtr and CrudeGroup methods have different return
> types.
 
Which is permitted - section 10.3p7 says:
 
"The return type of an overriding function shall be either identical to
the return type of the overridden function or covariant with the classes
of the functions. If a function D::f overrides a function B::f, the
return types of the functions are covariant if they satisfy the
following criteria:
(7.1) — both are pointers to classes, both are lvalue references to
classes, or both are rvalue references to classes 112
(7.2) — the class in the return type of B::f is the same class as the
class in the return type of D::f, or is an unambiguous and
accessible direct or indirect base class of the class in the
return type of D::f
(7.3) — both pointers or references have the same cv-qualification and
the class type in the return type of D::f has the same
cv-qualification as or less cv-qualification than the class type
in the return type of B::f."
 
> ... The only way that I see to force the compiler to flag the
> improper return type is to use the override keyword.
 
It's not improper, so there's no need to flag it. The sole effect of the
"override" keyword is to make it an error if the function it applies to
does NOT override a virtual member of one of it's base classes.
 
The return type has nothing to do with whether something is a function
override. The requirements for being an override are:
 
"If a virtual member function vf is declared in a class Base and in a
class Derived, derived directly or indirectly from Base, a member
function vf with the same name, parameter-type-list (8.3.5),
cv-qualification, and ref-qualifier (or absence of same) as Base::vf is
declared, then Derived::vf is also virtual (whether or not it is so
declared) and it overrides 111 Base::vf." (10.3p2)
 
It's an error for an overriding function to have a return type that
violates 10.3p7, but it's still an override, or 10.3p7 wouldn't even
apply. Therefore, if "override" causes an error message, it's because,
in your actual code, there is some feature that causes
CrudeGroup::dataTransferItemsToDIIW() to fail to qualify as an override
of ObjPtr::dataTransferItemsToDIIW(). There's no such reason in the code
you've posted, so there's probably a relevant difference between your
actual code and the code you posted. When I inserted the override
keyword in my code, I got no complaint.
 
> ... The compiler is
> allowing the multiple return types until I tell it to only allow one
> return type by use of the override keyword.
 
That's NOT what the override keyword tells it.
Juha Nieminen <nospam@thanks.invalid>: Mar 12 07:05AM

> On Friday, March 9, 2018 at 2:24:24 PM UTC-5, Rick C. Hodgin wrote:
>> I assert therefore I am.
 
> I, the real Rick C. Hodgin, did not write this post.
 
You, the real Rick C. Hodgin, can go fuck yourself.
Juha Nieminen <nospam@thanks.invalid>: Mar 12 07:04AM

> To stand up for Christ in this world means you will be hated by
> everyone who is not being saved.
 
Especially if you are a fucking hypocrite spammer.
 
By this point it's quite clear that you *want* people to hate you,
because it gives you a sense of victimhood. You *deliberately* spam
this newsgroup so that people will hate you and insult you. Well,
you get what you want, you retarded asshole.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Mar 11 07:16PM -0700

On Sunday, March 11, 2018 at 4:49:06 PM UTC-4, Rick C. Hodgin wrote:
> When reading my posts where I reject reality please allow for the fact
> that I am .. crazy.
 
 
I, the real Rick C. Hodgin, did not write this post.
 
Please examine the headers to see that there is someone usurping my
identity (and without my permission). I post from Eternal September
and Google Groups only.
 
--
Rick C. Hodgin
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: