Thursday, July 13, 2017

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

"Öö Tiib" <ootiib@hot.ee>: Jul 13 03:26PM -0700

On Thursday, 13 July 2017 01:48:00 UTC+3, Lynn McGuire wrote:
 
> https://randomascii.wordpress.com/2017/06/19/sometimes-floating-point-math-is-perfect/
 
> Interesting. We moved to 64 bit doubles a couple of decades ago and
> have never regretted it.
 
It is all about how we handle precision. When we do our calculation
algorithms naively then accuracy of result may be lot less than
the accuracy of floating point used. Wikipedia discusses it in ...
https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance
for example.
jeffj@panix.com (Jeff Jonas): Jul 13 05:55PM -0400

Unigroup is next week Thursday evening...
Please RSVP if you will be attending...
 
=================================================================
UNIGROUP OF NEW YORK - UNIX USERS GROUP - JULY 2017 ANNOUNCEMENTS
=================================================================
 
------------------------------------
1. UNIGROUP'S JULY 2017 GENERAL MEETING
------------------------------------
 
------------------------
Topic: The Latest C++ Standards
------------------------
 
Speaker: Alisdair Meredith,
Bloomberg
 
When: Thursday, July 20th, 2017 (** 3rd Thursday **)
 
Where: The Cooper Union <http://www.cooper.edu>
School of Engineering
41 Cooper Square (3rd Ave @ 7th St, bet. 6th & 7th Sts)
East Village, Manhattan
New York City
Meeting Room: 502 (** New Building: 5th Floor **)
 
Time: 6:15 PM - 6:30 PM Registration
6:30 PM - 6:45 PM Ask the Wizard, Questions,
Answers and Current Events
6:45 PM - 7:00 PM Unigroup Business and Announcements
7:00 PM - 9:30 PM Main Presentation
 
Cost: See the Meeting+Membership Fee Schedule Below.
 
 
INTRODUCTION:
-------------
 
Unigroup's July 2017 meeting will on The Latest C++ Standards,
including the major changes over the past 6 years, what developers
must know to stay current, and how coding using the new language and
library features is likely to be quite different from that done in
prior years. We expect to cover these language iterations: moving
beyond C++98/03, C++11 -> C++14, and C++14 -> C++17. Additionally,
our speaker will have just come back from attending the latest C++
Standards Committee meeting one week earlier, so he will be
presenting bleeding-edge information to Unigroup.
 
Unigroup has a couple of interesting meetings in the works on the
following topics: The State of the C++ Ecosystem, Linux Performance
Tuning, SDN/Networking.
 
Unigroup's scheduled meeting topics are:
20-JUL-2017: The Latest C/C++ Standards (Speaker: Alisdair Meredith)
14-SEP-2017: [Special 2nd Thursday] To-be-announced.
19-OCT-2017: To-be-announced.
 
-------------------------------------------------------------------
 
SPECIAL INSTRUCTIONS:
---------------------
 
Most Unigroup meetings are open to the public!
 
To REGISTER for this event, please RSVP by using the Unigroup
Registration Page:
http://www.unigroup.org/unigroup-rsvp.html
 
This will allow us to automate the registration process.
(Registration will also add you to our mailing list.)
Please avoid Emailed RSVPs.
 
Please continue to check the Unigroup web site and meeting page,
for any last minute updates concerning this meeting. If you
registered for this meeting, please check your Email for any last
minute announcements as the meeting approaches. Also make sure
any anti-spam white-lists are updated to _ALLOW_ Unigroup traffic!
If you block Unigroup Emails, your address will be dropped from
our mailing list.
 
Also, if you have an interest in Unigroup, be sure to receive
Unigroup information DIRECTLY from Unigroup, via direct receipt
of our Emails and by visiting the Unigroup Web Site. NO OTHER
SOURCE provides timely, accurate and complete Unigroup information.
 
Please RSVP as soon as possible, preferably at least 2-3 days
prior to the meeting date, so we can plan the food order.
RSVP deadline is usually the night before the meeting day.
 
Note: RSVP is requested for this location to make sure the guard
will let you into the building. RSVP also helps us to
properly plan the meeting (food, drinks, handouts,
seating, etc.) and speed up your sign-in at the meeting.
If you forget to RSVP prior to the meeting day, you may
still be able to show up and attend our meeting, however,
we cannot guarantee what building security will do if
you are "not on the list" (note: things tend to work out OK).
 
-------------------------------------------------------------------
 
MAIN PRESENTATION
-----------------
 
Topic: The Latest C++ Standards
 
Related Topics/Keywords
------------------------
 
Software Development, C Language, C++ Language. C++ Libraries, Best
Practices, Programming Language Standards.
 
Introduction & Description of Talk:
-----------------------------------
 
Stay Tuned, To-be-announced.
 
Presentation Outline
--------------------
 
- To-be-announced.
 
References & Web Resources:
---------------------------
 
To-be-announced.
 
-------------------------------------------------------------------
 
Speaker Biography
-----------------
 
To-be-announced.
 
-------------------------------------------------------------------
 
Company Biography
-----------------
 
To-be-announced.
 
-------------------------------------------------------------------
 
Giveaways:
----------
 
Addison-Wesley Professional/Prentice Hall PTR, and O'Reilly have
been kind enough to provide us with review copies of some of their
books, which we will continue to raffle off as giveaways at our
meetings. The publishers always ask that the persons receiving
the books provide a review and/or feedback about their books.
 
Unigroup would like to thank both companies for the support
provided by their User Group programs.
 
As always, all of the books will be available for review at the
start of the meeting.
 
Note: Our book supply is currently running low, and we need to
restock.
 
-------------------------------------------------------------------
 
Fee Schedule:
-------------
 
Unigroup is a Professional Technical Organization and User Group,
and its members pay a yearly membership fee. For Unigroup members,
there is usually no additional charges (ie. no meeting fees) during
their membership year. Non-members who wish to attend Unigroup
meetings are usually required to pay a "Single Meeting Fee".
 
Yearly Membership (includes all meetings): $ 50.00
Student Yearly Membership (with current! ID): $ 25.00
Non-Member Single Meeting Fee: $ 20.00
Non-Member Student Single Meeting (with! ID): $ 5.00
 
* Payment Methods: Cash, Check, American Express.
MasterCard, VISA, Discover (since 2013).
 
! Students: We are looking for proof that you are
currently enrolled in classes (rather than working
full-time), and as such, your Student ID should show
a CURRENT date. We have been presented Student IDs
containing NO dates whatsoever, and in the
current environment, perpetual/non-expiring access
to university facilities just does not feel right.
If your ID contains no date, please bring
additional proof of current enrollment. Thanks,
 
NOTE: Simply receiving Unigroup Email Announcements does
NOT indicate membership in Unigroup.
 
Members: Remember to bring your Unigroup membership card with
you to the meeting, to confirm your yearly renewal date!
 
-------------------------------------------------------------------
 
Food:
-----
 
Complimentary Food and Refreshments will be served.
 
This normally includes "wraps" such as turkey, roast beef,
chicken, tuna and grilled vegetables as well as assorted salads
(potato, tossed, pasta, etc), cookies, brownies, bottled water
and assorted SOFT beverages.
 
However, due to a continuing situation at our caterer, we are
planning to have: pizza (cheese+veggy), soda, water, cookies,
and brownies at this meeting.
 
-------------------------------------------------------------------
 
Directions:
-----------
 
The Cooper Union <http://www.cooper.edu>
School of Engineering (*** New Building ***)
41 Cooper Square (3rd Avenue @ 7th St, between 6th & 7th Streets)
East Village, Manhattan
New York City, 10003
Meeting Room: ** (See Above, Room Changes Month-to-Month)
 
Located on the East side of Cooper Square. Look for the
new building with the non-traditional appearance.
Entrance is at the corner of 3rd Avenue and 7 Street.
 
Building lobby sign-in is required at the guard's desk.
Enter the building, check in with the guard at the lobby for
directions to Unigroup (the room varies from month-to-month).
 
Nearest mass transit stations are:
'6' to Astor Place (stops right at The Cooper Union),
then walk 1 block East and 1 block South.
'R' to 8th Street, then walk about 2 blocks East
then 1 block South.
'4/5/N/Q' to Union Square, then walk South and East.
or transfer to the downtown '6' to Astor Place.
'B/D/F/V' to Broadway-Lafayette, then walk North and East,
or transfer to the uptown '6' to Astor Place.
 
Free street parking in the area becomes available at 6pm.
 
There are also parking lots on Broadway, at (or just south of)
Astor Place (8th Street), across from the West side of
Cooper Square, as well as various others in the area.
 
-----
 
Please mark this meeting on your calendar and join us!
Please tell your friends about Unigroup!
 
----------------------------------------------------------------------------
----------------------------------------------------------------------------
 
--------------
2. PRIOR MEETINGS
--------------
 
** Formal Thank You's to our previous speakers will appear
in an upcoming announcement. Unigroup issues a "Thank You"
to all our speakers and sponsors!
 
Our thanks goes to The Cooper Union School of Engineering,
and its staff, for hosting our meetings.
 
----------------------------------------------------------------------------
----------------------------------------------------------------------------
 
----------------------------
3. LOCAL TRADE SHOWS AND EVENTS
----------------------------
 
To-be-announced.
 
----------------------------------------------------------------------------
----------------------------------------------------------------------------
 
-----------------
4. UPCOMING MEETINGS
-----------------
 
We have a series of meetings in the works:
- 20170720: The Latest C/C++ Standards.
- 2017????: The State of the C++ Ecosystem.
- 2017????: Linux Performance Tuning.
- Planning: Popular Linux Distribution Round-Up and Comparison
(aka: Are there too many Linux Distributions?)
- Planning: Building a Data Server with ZFS
- Planning: Virtualization: KVM, Xen/XenServer, VirtualBox
- Planning: DNS / Dynamic DNS
- Planning: Fibrechannel and iSCSI Storage
- Planning: IPsec and VPNs (possibly 2 meetings)
- Planning: Cloud and Grid Computing
- Planning: Unix/Linux Authentication
- Planning: NO SPAM!
- Planning: Crypto / PKI / GPG-PGP
- Planning: The latest on *BSD (FreeBSD/NetBSD/OpenBSD)
- Planning: The latest on Solaris
- Planning: The latest on AIX
- Planning: Anti-Virus
- Unix/Linux/BSD Clusters and Clustered Databases
- Patching and Updating Unix/Linux/BSD (rpm. yum, yast, apt, etc.)
- Building Custom Kernels Unix/Linux/BSD
- Building a Firewall using FreeBSD and Linux
- LAMP Part 2 - PHP/Python
- Unix 40th+ Birthday Celebration
- Samba
- High Performance Internet Servers / Web Acceleration
- Unix Office Tools: Word Processors, Spreadsheets, Accounting Packages.
- GNU Development Environments
- Java and/or JavaScript Programming
- Web Development Frameworks
 
** Unigroup Needs Speakers!!
Please let us know about any other meeting topics that you may be
interested in. Potential speakers on Unix/Linux/BSD related
technology topics should please contact the Unigroup Board.
 
----------------------------------------------------------------------------
----------------------------------------------------------------------------
 
--------------------
5. UNIGROUP INFORMATION
--------------------
 
Unigroup is one of the oldest and largest Unix User's Groups serving
the Greater New York City Regional Area since the early 1980s.
Unigroup is a not-for-profit, vendor-neutral and member funded
volunteer organization. Unigroup holds regular and special event
meetings throughout the year on technical topics relating to the
Unix/Linux/BSD Operating Systems and User Communities. Unigroup
meetings tend to be focused towards System Administrators, Network
Administrators, and Software Developers.
 
Unigroup holds regular meetings planned for (at a minimum) the Third
THURSDAY of Odd Months. We generally try to hold Field Trip or
Vendor Specific Meetings on the Even Months, although we do have the
ability to hold monthly meetings at our regular meeting location.
 
Planned regular meeting dates are (usually 3rd Thursdays):
07/20/2017, ** 09/14/2017, 10/19/2017, 11/16/2017, 01/18/2018, ...
Also watch for Special Event meetings and "Field Trips" to the
facilities of local hardware and software vendors.
 
=========================================================================
= For Unigroup Information, Events and Meeting Announcements be sure to =
= visit our World Wide Web Home Page: =
= http://www.unigroup.org =
=========================================================================
 
For further information or to get on the Unigroup Electronic Mail Mailing
List send an EMail message to:
unilist (-a_t-) unigroup.org
 
To contact the Board of Directors of Unigroup, send an EMail message to:
uniboard (-a_t-) unigroup.org
 
If you have recently attended a meeting and you are not receiving
Email announcements, please send us an Email and we will make
corrections to our lists.
 
Please Email the Board with any suggestions, especially potential
meeting topics and speakers. Unigroup welcomes contributions and
content suggestions for our newsletter. Unigroup is a volunteer
organization and we need your assistance! Please let us know if you
can help!
 
----------------------------------------------------------------------------
----------------------------------------------------------------------------
 
-Rob Weiner
Unigroup Executive Director
unilist (-a_t-) unigroup.org
http://www.unigroup.org
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jul 13 12:34PM -0700

To be alive spiritually is to be different than you are born with.
Each of us is born physically one time, and we will die physically
at some point. But in order to gain eternal life you must not only
be born physically, but also be born spiritually, for it is there
in the spirit you gain eternal life.
 
If you are born once, you'll die twice: once here, once in Hell.
If you are born twice, you'll only die once: here.
 
-----
Jesus has already made the way for you to be saved. The hard work's
already been done by Him. He's come to the Earth and upheld all of
His requirements to make it possible for you to escape Hell.
 
Now, He simply issues the call to your heart and says, "Come, and be
with me in Heaven forever in a body like the angels."
 
Do you want to live forever? In a beautiful body like the angels?
In a place of everlasting love, and peace, and joy? With God Himself,
able to talk to Him face-to-face and ask Him questions and learn from
Him and explore all He's created in this vast universe?
 
That's what He's offering you. For free. He loves you enough to
forgive all you've ever done wrong. He will give you a new clean
slate, and a real purpose for living.
 
Say the name: "Jesus."
Say the name: "Jesus."
Say the name: "Jesus. Forgive my sin and save me."
 
He will do it right now where you are. Right where you sit. Right
this second. Just ask Him, and then watch your life change. You'll
be amazed, because He is amazing. You'll be amazed at how amazing
He is. You'll be wrapped up in awe for the rest of your Earthly
days, and when you see Him in Heaven and He greets you in peace and
love, you'll be in further awe. Any crowns you receive here upon
the Earth for your works in service to Him, you'll cast back at His
feet and you'll cry out at the top of your lungs, "WORTHY IS THE
LAMB WHO WAS SLAIN FOR THE SIN OF THE WORLD!"
 
"Awesome" never knew such meaning as it does when applied to Jesus.
He's the true Awesome. "That pizza was awesome." "That movie was
awesome." They can't hold a candle to Awesome with a capital "A".
 
I urge you, my friends, my brothers, my sisters here on this Earth,
come to Jesus and become part of the Kingdom of God. Become part
of the vast future that awaits all who are redeemed. Come and be
a part of something that's solid and real and eternal and secure.
Come and be a part of something that's not only bigger than you
are, but bigger than anything else is. Come and be a part of a
real family of real love, proper relationships, whole dealings,
perfect righteousness in Him, and a guiding Hand that will never
cease to be strong and who serves to demonstrate those things He
has for us.
 
God is inexhaustible. He isn't part of a working of man. He's
far beyond man. He created the Heavens and the Earth and all that
there is, and He gave us a choice. He didn't want robots following
Him, "Yes, master. Yes, master." He wants real living souls, those
who have their own choices, their own thoughts, their own opinions,
their own ways of doing things.
 
He makes them all righteous and spotless and blameless and perfect
so they are well-suited for entry into His eternal Kingdom. Nothing
of improper form will ever be there. God takes care of His House.
He maintains order. He maintains righteousness. He makes it so the
doors don't need to be locked, and there will never be night, where
the lamb will lay down with the wolf and both will be safe and secure.
 
There is no hatred in Heaven. No animosity toward others. No
jealousy. No loss. Nothing lacking. It is the existence God intended
for us before sin entered in to this world and destroyed everything.
But God has made all things new. He comes to us with all that He is,
and all that He has, and says, "I will give all of this to you. You
will be co-heirs with me in the resurrection. Not joint-heirs where
all that He has is divided, but co-heirs, meaning all that He receives
we also will receive, because those who are redeemed are married to
Him in Heaven. He's the Bridegroom, and we are the bride, with the
Earthly pattern of marriage given to mankind as a precursor to the
real form of marriage that will be for all eternity.
 
Heaven won't be like it is here. It will be better. It's described
as a paradise where even the streets are gold. Where there are new
colors to see, new experiences and types of input into our being.
Time will not operate there as it does here, for it is a place of
eternal existence.
 
But there will be some things that are familiar. We'll see each
other in Heaven, even in our new bodies, and we will recognize and
know one another. And we will shine like the stars, glowing, even
as Moses did when he came down from the mountain having spent 40
days with God. His face was glowing and he had to veil himself.
In Heaven, we'll all be glowing with the pure rich light of fullest
righteousness given us by Jesus Christ. We'll shine with beauty
and the remarkable creation of God unrestrained by any degree of
sin or sickness or disease or death. It will be all pure. It will
be God's full expression untainted. Our bodies will glow like the
most brilliant stones you can imagine, but they'll be not hard like
stones, they'll be proper bodies of soft and gentle, yet powerful
form.
 
We'll be able to whisk ourselves from place to place through our
will. No means of locomotion to get there, but the spirit of God
will give us power to move where we desire in an instant. Fire
will not hurt us, for Jesus came to the Earth even and saved three
men in a fire that was seven times hotter than normal, so that not
even the smell of smoke was on them, let alone anything burned.
 
The power and authority we'll have in Heaven will be unrestrained
in service to Him. We won't have to worry about building permits
or whether or not there are materials and labor forces sufficient
to complete our task, or if we have enough money to meet this week's
payroll. It will be all provided for by God so that when we are
seeking to express ourselves, painting our corner of God's vast
universe, so we will do so unabated. We want to go big, we'll go
big. We want to go grand, we'll go grand. We want to go small
and make petite beauty, so shall it be.
 
God has gone ahead and prepared a place for us. He is coming back
to receive us so we can go to that place He's prepared for us. He
wants us there. He longs for us to be there. He's done all of
the hard work to get us there. And now He says simply, "Come, and
be a part of all I have done."
 
He's not charging us with a cost. He's not demanding of us, His
very own family, that we should pay to be a part of what He's done.
He's done what a good Father would do. He's gone out and made a
way to correct the lies of sin introduced by Satan, such that we
can be redeemed from that which we all so richly deserve because
of our own sin. He's done it for free, but it was a real thing
that's been done. Jesus will bear the marks of the cross in Heaven.
He'll always be marked by what He did for us, so that when we
behold Him in His glory, there will be the marks on His hands and
feet and side.
 
God has made the way. He calls out to you. He wants you to be a
part of His eternal Kingdom. And He warns you with greatest and
most powerful warning of what's coming if you do not receive His
free offer of salvation. He's warning that holding on to your
rebellion against God, holding on to lies and evil doings, that
these will keep you under judgment, under condemnation, and there
will be no hope for you.
 
But for all who are wise, they will look themselves in the eye in
the mirror and say, "YES! I am a sinner. YES! I need to be
redeemed. YES! I need to run to the Lord right now because I am
not only a sinner, but I am filthy in sin. A wretch am I. A whore
of high standing in the kingdom of whoredom."
 
And that soul will cry out to the Lord, "Jesus! Come and save me!
I do not want to go to Hell, but I want to be redeemed! I am a
sinner and I need to be forgiven! Save me, Lord! Save me from the
flames of death's eternal grip on my soul. Save me into your
Kingdom of Gold. Save me, Lord, and restore me to the life that
once was, and was lost through sin, and is now made possible only
by You again! Save me, Jesus, for I am in need today."
 
Do this, and you will live. Ask Him to receive you and He will.
It comes with a promised change. It comes with a promised release
of the burden of sin. There's a book written about that release,
called "The Pilgrim's Progress." The man carries a burden which
slows him down, until he comes to the cross where the burden is
taken away and his load is made light by the Lord.
 
Come to Him and have that burden of sin taken off your back. Be
able to move rightly and soundly and assuredly. Stand up in this
world, knowing that you are here but for a time, and then eternity
begins. Stand up knowing with confidence where you will be going,
and where you will not be going. And then reach out to those
around you who, today, are perishing as you were, and teach them
as you were also taught. Taught by the Lord from within to be
able to hear this call, that the message goes out from us, and
in from the Lord, out from our words, and into the heart by the
Lord, so that the two meet up and encourage a soul unto life, and
move that soul from within toward the everlasting grace that lives
in Jesus Christ.
 
Be His, my friend. Be His in this world, knowing that you are also
His in the hereafter.
 
You'll never approach anything like service to Him here in this
world. There aren't other things which compare to it, for it is
a true expression of spirit to serve Him. The people of this
world who are perishing cannot understand it, but we do not labor
for them. We labor for those who will be saved. We must continue
to labor despite their railings to contrary so as to maximize the
return on the work done at the cross. Jesus paid a price sufficient
to save all men everywhere, but not all men will be saved, but only
those who repent, and come to Jesus asking for forgiveness.
 
There are many still out there who will believe. Teach them about
their sin. Teach them about Hell. Teach them that there is a way
to be saved, and that there is only one way to be saved, but that
because of who Jesus is ... one way is enough.
 
His arms are open wide on that cross. He has love to give out to
all who will come to Him. You can't exhaust Him. He remains not
only standing, but strong. He stands above the sin your wretched
life casts upon Him. He went down to the pit and took the full
burden of sin upon Him and on the third day He rose again triumphant
over death, Hell, and the grave. And all who put their faith and
trust in Him will never perish.
 
He is the Lord God Almighty, and He calls out to you because He
wants you to be saved. He wants you to thrive. He wants you to
express in His universe with everything that is uniquely you. He
wants you to be a part of His Kingdom in the form and manner that
you desire ... of fullest eternal expression ... better than gold,
better than everything that has ever been made, because it is your
life given unto Him in this magnificent whole creation.
 
Come be a part of His Kingdom. Come be a part of the fellowship
of mankind in His Son, Jesus Christ. Do not be hypocrites like
the world, but come and be real. Live it daily. Teach it always.
Stand strong for the Lord so that people can see the difference
between you and those perishing in the world. Do not walk in
darkness, but be a light shining so all can see.
 
The Lord has made you for greatness. Do not sell out to the weak
draws and pulls of this world. Shiny fleeting trinkets of nothing
that will not endure. Instead, take up the yoke of the Lord and
walk in assurance that does endure, that cannot be conquered, that
is eternal, that is guided by the One from everlasting to ever-
lasting.
 
He calls out to you, friend. Do not delay. Do not hinder youself
in coming to ask Him. From right there where you are right now,
lift your voice to Heaven and cry out, "Jesus! I am a sinner.
Come into my heart and save me from my sin!" And watch Him work
another miracle in your life today.
 
God bless you, my friend. I look forward to seeing how you will
shine here upon this Earth, and in Heaven.
 
Thank you,
Rick C. Hodgin
"Chris M. Thomasson" <invalid@invalid.invalid>: Jul 13 02:03PM -0700

On 7/12/2017 10:26 PM, Christian Gollwitzer wrote:
 
> It could be https://en.wikipedia.org/wiki/Religious_delusion
 
> You can never convince him with arguments. Every argument contrary to
> his belief will be dismissed as "coming from the devil"
 
That's the main goal, I guess. Fwiw, I put a double negative in the text
to make it seem like I agree with him wrt pushing people against a wall.
Just to see if the artifact might stifle responses.
 
Swap:
 
would not be akin
 
to
 
would be akin
 
;^)
Paavo Helde <myfirstname@osa.pri.ee>: Jul 13 09:28PM +0300

On 13.07.2017 15:12, bitrex wrote:
> ConcreteEffectObject where EffectObject also has some virtual methods
> for _its_ child classes to override and...this is getting hairy and sort
> of brittle already.
 
What's wrong with many levels of inheritance? If it suits the task then
there should be no problem whether there is 3 or 30 levels of
inheritance. However, if the inheritance does not suit the task (e.g.
Liskov principle does not hold) then even 1 level is too much.
 
If the things are getting too hairy/brittle to maintain, then automatic
tests will save your day! Write automatic unit/integration tests
covering all of the functionality which the app must have, then add new
functionality while keeping the tests passing, then refactor the code to
become simpler while keeping the tests passing. Rinse and repeat as
often as needed. I have lost the grasp of all aspects in our software a
long time ago; the unit test suite is the only place this knowledge
still exists I'm afraid.
 
Last, but not least: each overridden virtual function must be declared
as 'override'! Otherwise refactoring becomes way too brittle.
"Öö Tiib" <ootiib@hot.ee>: Jul 13 12:26PM -0700

On Thursday, 13 July 2017 15:13:05 UTC+3, bitrex wrote:
> container can hold AbstractDisplaObject references. So I don't have to
> resort to deeper levels of inheritance.
 
> Any tips on how to implement this in this situation would be great
 
Most likely I simply do not understand what that AbstractDisplayObjectFactory should produce and for what.
From game engine I expect things like "Scene" or "Terrain" and
then the usual stuff that it consists of and that moves there.
If it is object in physics engine then some "Body", "Collider" or "Joint"
and if it is for displaying that object 2D then "Sprite" and so on.
 
May be you want to have things in same inheritance tree that do not
belong to same inheritance tree and so there are such long generic names?
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jul 13 11:41AM -0700

A preacher preaching on what Hell will be like. The Bible describes
it. It's a place you don't want to go, a place of torment and pain:
 
https://www.youtube.com/watch?v=1EdmRny6dsw
 
Nobody has to go there. Seek your way out today.
 
Thank you,
Rick C. Hodgin
Manfred <noname@invalid.add>: Jul 13 07:31PM +0200

On 7/9/2017 6:24 PM, Marcel Mueller wrote:
> MyClassTemplates;
> };
 
> But I have no idea why this additional symbol fixes the problem.
Here you moved the MyClassTemplates struct definition out of MyClass,
and defined a global object MyClassTemplates as well (poor choice of
object and class with the same name)
What is left within MyClass is a static constexpr declaration, with its
initializer in place, and type which is defined at the namespace level.
 
> Compiler-Bug?
 
Not at this stage.
 
The gcc error is correct, in the sense that the initializer is missing
in your original code.
However, if you modify it as:
 
struct MyClass
{
// does not work
constexpr static const struct
{ const MsgTemplate<const char*> SOMETHING_WENT_WRONG =
{ 1001, "Something went wrong: %s" };
// more templates ...
} Templates{}; // <== note the {} initializer
};
 
then you get a more obscure error:
constexpr.cc:26:15: error: constructor required before non-static data
member for 'MyClass::<anonymous struct>::SOMETHING_WENT_WRONG' has been
parsed
} Templates{};
^
 
and the same happens if you get rid of the <anonymnous struct>:
 
struct MyClass
{
// does not work
constexpr static const struct MyT
{ const MsgTemplate<const char*> SOMETHING_WENT_WRONG =
{ 1001, "Something went wrong: %s" };
// more templates ...
} Templates{}; // <== note the {} initializer
};
 
At this point, I /think/ the error is related to the fact that static
constexpr initializers are best handled at the namespace level (in fact,
if I understand what you are trying to do here a namespace could be an
option) - Bjarne writes (TC++PL p.506):
"However, for a few simple cases, it is possible to initialize a static
member in the class declaration. ..." and the following text gives more
detail, with which I still can't map an error to the case, though.
Maybe someone else can shed some more light on the puzzle.
 
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: