Monday, February 20, 2017

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

woodbrian77@gmail.com: Feb 20 10:12AM -0800

On Sunday, February 19, 2017 at 11:17:38 AM UTC-6, Manfred wrote:
> including C++11.
> For what I can see about the latest variants C++14 and C++17 I may
> indeed share your perception.
 
My hope is string_view would be back-ported to C++ 2011 compilers.
Also it would help to have support for "parameter type deduction
for constructors" or at least make_unique in C++ 2011 compilers.
I could live though, without that, but need the support for string_view.
 
 
Brian
Ebenezer Enterprises - In G-d we trust.
http://webEbenezer.net
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Feb 20 06:59PM

On Mon, 20 Feb 2017 10:12:13 -0800 (PST)
woodbrian77@gmail.com wrote:
[snip]
> for constructors" or at least make_unique in C++ 2011 compilers.
> I could live though, without that, but need the support for
> string_view.
 
What a weird suggestion. Why would anyone want to "backport" C++14/17
to C++11? It would no longer be C++11.
 
A more reasonable suggestion is that compilers should be incrementally
updated to C++14/C++17. Such a suggestion would be otiose: that is
already happening. It appears you may have failed to adopt the correct
compiler flags. gcc, clang and visual studio have supported
make_unique for some time (-std=c++14 for gcc/clang). Recent versions
of libstdc++ and libc++ also (as I understand it) support string_view
although I have never used it. No doubt VS will follow in the
relatively near future.
woodbrian77@gmail.com: Feb 20 01:39PM -0800

On Monday, February 20, 2017 at 12:59:13 PM UTC-6, Chris Vine wrote:
> > string_view.
 
> What a weird suggestion. Why would anyone want to "backport" C++14/17
> to C++11? It would no longer be C++11.
 
 
C++ 2011 was both late and incomplete. There's no reason
string_view couldn't have been part of C++ 2011 and, in an
ideal world, it would have been.
 
 
> A more reasonable suggestion is that compilers should be incrementally
> updated to C++14/C++17.
 
As someone mentioned upthread, a lot of C++ 2014 and 2017 isn't
needed. Compiler vendors could make their C++ 2011 compilers
better by taking this step.
 
 
> already happening. It appears you may have failed to adopt the correct
> compiler flags. gcc, clang and visual studio have supported
> make_unique for some time (-std=c++14 for gcc/clang). Recent versions
 
I use those flags, but would rather not require users to
have a C++ 2014 or 2017 compiler. Probably there are (or
will be) others with the same request.
 
 
Brian
Ebenezer Enterprises - Because children deserve to have
a father and a mother.

http://webEbenezer.net
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Feb 20 10:09PM

On Mon, 20 Feb 2017 13:39:43 -0800 (PST)
 
> I use those flags, but would rather not require users to
> have a C++ 2014 or 2017 compiler. Probably there are (or
> will be) others with the same request.
 
Brian,
 
This is meaningless and bizarre. If you want C++14 or C++17 features
you use the appropriate compiler flag. Whether or not C++11 was
incomplete is beside the point, as is whether or not C++11 should have
had a string_view. It didn't. C++17 does. So you use the C++17
compiler flag if you want it. Move on.
 
I am kind of left scratching my head over your lack of reasonable
logic. I think the religious mania of you and your nutjob colleague is
affecting your judgement.
woodbrian77@gmail.com: Feb 20 02:38PM -0800

On Monday, February 20, 2017 at 4:09:50 PM UTC-6, Chris Vine wrote:
> incomplete is beside the point, as is whether or not C++11 should have
> had a string_view. It didn't. C++17 does. So you use the C++17
> compiler flag if you want it. Move on.
 
It doesn't hurt to ask, though, does it?
 
 
Brian
Ebenezer Enterprises - "Love your enemies and pray for those who
persecute you that you may be children of your Father in heaven.
He causes the sun to rise on the evil and the good, and sends rain
on the righteous and the unrighteous." Matthew 5:44,45
 
http://webEbenezer.net
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Feb 20 10:46PM

On Mon, 20 Feb 2017 14:38:55 -0800 (PST)
woodbrian77@gmail.com wrote:
[snip]
> It doesn't hurt to ask, though, does it?
 
Yes, asking for something ridiculous and illogical does hurt. It hurts
those who have to spend some of their valuable cognitive capacity asking
themselves whether you are for real or just out there somewhere in
space; and it hurts you because you wouldn't be taken seriously in the
future.
 
And it hurts my religion by having someone who proselytizes for some
bizarre out-stream of it showing themselves to be so lacking in any
actual reasoning capacity.
woodbrian77@gmail.com: Feb 20 03:03PM -0800

On Monday, February 20, 2017 at 4:46:39 PM UTC-6, Chris Vine wrote:
 
> And it hurts my religion by having someone who proselytizes for some
> bizarre out-stream of it showing themselves to be so lacking in any
> actual reasoning capacity.
 
By attacking my reasoning you are attempting to dissuade people
from looking into my work. Same old same old from you for years,
Chris. If you can't offer some constructive criticism, I suggest
you say nothing.
 
 
 
Brian
Ebenezer Enterprises - In G-d we trust.
http://webEbenezer.net
woodbrian77@gmail.com: Feb 20 03:12PM -0800

On Monday, February 20, 2017 at 12:59:13 PM UTC-6, Chris Vine wrote:
> > I could live though, without that, but need the support for
> > string_view.
 
> What a weird suggestion. Why would anyone want to "backport" C++14/17
 
I didn't come up with the idea of backporting:
 
https://en.wikipedia.org/wiki/Backporting
 
I don't suggest backporting all of the features, just one or two.
 
 
Brian
Ebenezer Enterprises
http://webEbenezer.net
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Feb 20 10:18PM

Hi!
 
My indexitor container now handles skips correctly:
 
#include <string>
#include <iostream>
#include <neolib/indexitor.hpp>
 
int main()
{
neolib::indexitor<std::string, int> idx;
typedef neolib::indexitor<std::string, int>::skip_type skip;
 
idx.push_back(std::make_pair("xyzzy", 5), skip{ 2, 2 });
idx.push_back(std::make_pair("neo", 5), skip{ 5, 0 });
idx.push_back(std::make_pair("kitteh", 5), skip{ 3, 1 });
 
for (auto i = idx.begin(); i != idx.end(); ++i)
std::cout << "Foreign index of " << i->first << " is " <<
idx.foreign_index(i) << std::endl;
 
std::cout << "All foreign indexes:-" << std::endl;
for (int i = 0; i < idx.foreign_index(idx.end()); ++i)
{
auto v = idx.find_by_foreign_index(i);
if (v.first != idx.end())
std::cout << i << ": " << v.first->first << std::endl;
else
std::cout << i << ": <null>" << std::endl;
}
 
return 0;
}
 
 
outputs:
 
Foreign index of xyzzy is 2
Foreign index of neo is 14
Foreign index of kitteh is 22
All foreign indexes:-
0: <null>
1: <null>
2: xyzzy
3: xyzzy
4: xyzzy
5: xyzzy
6: xyzzy
7: <null>
8: <null>
9: <null>
10: <null>
11: <null>
12: <null>
13: <null>
14: neo
15: neo
16: neo
17: neo
18: neo
19: <null>
20: <null>
21: <null>
22: kitteh
23: kitteh
24: kitteh
25: kitteh
26: kitteh
27: <null>
 
Get indexitor from: https://github.com/FlibbleMr/neolib
 
/Flibble
bitrex <bitrex@de.lete.earthlink.net>: Feb 20 09:45AM -0500

How do I use std::enable_if and std::is_trivially_copyable to enable or
disable a constructor depending on whether the underlying class's
template parameter is trivially copyable, or not?
 
I found this article:
 
http://seanmiddleditch.com/using-stdenable_if-on-constructors/
 
but I admit I don't completely understand what's going on here or how to
apply it to my situation.
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Feb 20 10:01PM

On Mon, 20 Feb 2017 09:45:52 -0500
 
> http://seanmiddleditch.com/using-stdenable_if-on-constructors/
 
> but I admit I don't completely understand what's going on here or how
> to apply it to my situation.
 
It depends on what other constructors there are, but in C++14 something like
this will work:
 
template <class T,
class = std::enable_if_t<std::is_trivially_copyable<std::remove_reference_t<T>>::value>>
MyClass(T&& t) {std::cout << "In constructor\n";}
 
Note you cannot have a mirror constructor with a !std::is_trivially_copyable
enable_if template type because the 'class = ' form provides a default type
argument and what the compiler would then see when it comes to resolve the
overload set are two identical function declarations except having two
different default types, and at that point it cannot choose between them. To
avoid that can have an additional dummy 'class = void' template parameter on
one only of the overloads, so SFINAE works as intended, viz:
 
template <class T,
class = std::enable_if_t<!std::is_trivially_copyable<std::remove_reference_t<T>>::value>,
class = void>
MyClass(T&& t) {std::cout << "In constructor\n";}
 
Another option for std::enable_if with constructors is:
 
template <class T>
MyClass(T&& t,
std::enable_if_t<std::is_trivially_copyable<std::remove_reference_t<T>>::value, int> = 0)
{std::cout << "In constructor\n";}
 
An alternative to std::enable_if is tag dispatch.
mike.7nani@gmail.com: Feb 20 01:53PM -0800

*** we provide GC and USC only ***

This is Mike from Golok Global . I have a Tableau Developer/Admin , DevOps,Java Devloper,Java UI Devloper those are GC's and citizens . if you have any requirements for my candidates.
Please forward your requirements to my mail Id:mike@golokglobal.com Desk No: 9722329938
Juha Nieminen <nospam@thanks.invalid>: Feb 20 08:30AM

>> I am Christian...
 
> A Christian would not repeat profanity, but would redact their writings
> so as to remain holy to God.
 
Isn't it curious how you avoided answering his question?
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 20 07:35AM -0800

On Monday, February 20, 2017 at 3:30:57 AM UTC-5, Juha Nieminen wrote:
 
> > A Christian would not repeat profanity, but would redact their writings
> > so as to remain holy to God.
 
> Isn't it curious how you avoided answering his question?
 
I didn't avoid answering his question. The question is not valid.
Jesus went from place to place and taught as He went. He went into
places and dwelt there for a time, and then moved on.
 
I do not do such things. My life as a Christian involves me teaching
those around me where I am. That includes my regular daily stations
(work, home, neighborhood, things I do regularly like grocery store,
local shops), as well as other active places I go to do explicit out-
reach ministry.
 
A Christian is a Christian 24/7. The Apostle Paul made and sold tents
for a living. Do you think the people around him only heard his
message one time? Or do you think they heard about it whenever he
was around?
 
We each determine the scope to which the death of our Savior on the
cross, saving us from eternal damnation, giving us the rights to become
sons and daughters of God, means to us. As for me, it is major. I
place a great priority and emphasis on it. It affects my entire life
with great passions.
 
And again, it is not for those who reject the message Christians labor.
It is for those who will hear it. And even amongst the shoutings of
those who will not receive, there are yet still some who will hear it,
and are moved by it, and are affected by it to salvation.
 
I will not silence my outreach efforts because those loud vocal few
who are perishing tell me to sit down and be quiet. They are telling
me that because they don't want to be reminded of what they're reject-
ing. But rather I will continue to teach to all who are around me so
those who will be strengthened by the message, by the witness, have
that opportunity.
 
It's going to get so bad that Christians will be rounded up and put
into prisons, and even beheaded because they refuse to stop teaching
people about Jesus Christ. It's already been foretold in the Bible.
And all of this rising and growing hate is just a precursor to that
eventual event.
 
For every Christian who is killed for maintaining their faith, it is
our release from this sinful world, and our entrance into eternity in
His Kingdom. What grander way to leave this world than to stand up
against the multitude saying, "DENY HIS NAME!" where we reply back,
"I will not deny His name, but I will teach you right now that you
too can be forgiven for your sin, including this sin you are perpetrat-
ing against me right now."
 
-----
It is to eternal life we teach. It is to an eternity of prospering
and love and joy and mutual growth, one to another, a family of the
grandest stature, together helping one another. It is the best of
the best of the best of the best we could ever imagine, and then
some more beyond that. It is that which the enemy tries to keep us
from coming to know and possess by our accepting of Jesus Christ as
our personal Savior and Lord. And it is that which I am going to
teach to all people until the day I leave this world.
 
You too can be saved, Juha. Jesus will forgive you sin and give you
eternal life in Heaven's paradise with God in a body like the angels
which never ages, is always young, strong, and powerful.
 
Why won't you receive such a thing? Ask yourself that question. It
is eternal life. Eternal health. Eternal wealth. In a Kingdom
filled with love, peace, joy, everlasting. It's better than the Nexus
described in Star Trek: Generations. And it's real. It's free. It's
yours for the acknowledgment of your sin, repenting of it, and asking
forgiveness for it.
 
Why won't you receive such a thing? It seems like an easy solution
to arrive at.
 
Thank you,
Rick C. Hodgin
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Feb 20 06:23PM

On Mon, 20 Feb 2017 07:35:53 -0800 (PST)
"Rick C. Hodgin" <rick.c.hodgin@
[snip]
> It's going to get so bad that Christians will be rounded up and put
> into prisons, and even beheaded ...
 
You are being totally over-amped, ridiculous and delusional. All you
have been asked to do is stop posting off topic postings on a newsgroup
dealing with C++, and you turn this into an issue of prison and
beheadings. The request for you to say on topic is a very modest
request which anyone who respects others would be willing to accede to.
 
Every mainstream religion has nutjobs like you and Brian. If they all
posted to this newsgroup in the fashion you do, it would be completely
unusable. Can you please try to understand this very simple point.
 
PS: please don't use the plea for sanity as another excuse for you to
post off topic crap[1] on this newsgroup.
 
[1] "Crap" is fine. Brian has blessed it for Christian use.
Real Troll <real.troll@trolls.com>: Feb 20 02:52PM -0400

On 20/02/2017 06:23 PM, Chris Vine wrote:
> PS: please don't use the plea for sanity as another excuse for you to
> post off topic crap[1] on this newsgroup. [1] "Crap" is fine. Brian
> has blessed it for Christian use.
 
Why can't you use a proper newsreader like Thunderbird so that you can
killfile those people you dislike.
 
These are community newsgroups and people are not going to listen to you
because they don't on a public anonymous newsgroups or forums. We don't
have a moderator and so anything goes here. The main culprit is Chang
(MWC - Mai-Wai-Chang) who keeps cross-posting to useless newsgroups and
so the thread goes on and on. I have kill-filtered him but he has
about 1000 other followers who can't all be filtered easily unless I
filter the entire thread.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 20 11:58AM -0800

On Monday, February 20, 2017 at 1:23:39 PM UTC-5, Chris Vine wrote:
> > It's going to get so bad that Christians will be rounded up and put
> > into prisons, and even beheaded ...
 
> You are being totally over-amped, ridiculous and delusional.
 
http://biblehub.com/kjv/revelation/6-9.htm
9 And when he had opened the fifth seal, I saw under the altar
the souls of them that were slain for the word of God, and
for the testimony which they held:
10 And they cried with a loud voice, saying, How long, O Lord, holy
and true, dost thou not judge and avenge our blood on them that
dwell on the earth?
11 And white robes were given unto every one of them; and it was
said unto them, that they should rest yet for a little season,
until their fellowservants also and their brethren, that should
be killed as they were, should be fulfilled.
 
Look at the violence in this world toward Christians already. We are
having our long-standing (centuries long) rights denied hand over fist
in lieu of views which force yielding to an anti-God viewpoint, such
as not allowing the Ten Commandments on public property, taking prayer
out of school, federal funding of abortion, transgenderism down to the
lowest grade school levels.
 
This world hates Jesus Christ, hates Christians, and the anti-Christ
spirit at work in this world is increasing his hatred in the actions
of sinful men and women, so that in this end-game time he is going to
harm more and more of us.
 
It is foretold. It will come to pass. It's already happening in
other countries right now, and has been increasingly over the past
decade. Jerusalem was declared to be Israel's again in the Six Day
War in 1967. Flash forward 50 years and here we are today, in the
Jewish Jubilee year relative to that timeframe, the Jewish year is
also 5777.
 
The time for these things to begin is upon us.
 
-----
BTW, if you want to see what I'm talking about. Get yourself a
hat that says "Jesus Inside" like the "Intel Inside" logo, and go
to your local store wearing it. You will be stunned at how much
differently people treat you when you wear that hat. It's literal
night and day:
 
www.amazon.com/Jesus-Inside-Hat-One-Size/dp/B0155KEONS
 
Thank you,
Rick C. Hodgin
woodbrian77@gmail.com: Feb 20 10:54AM -0800


> Version 1.14 of the C++ Middleware Writer is now available.
> There's more info here - http://webEbenezer.net .
 
I've added a subdirectory called "example" to the code on
Github: https://github.com/Ebenezer-group/onwards
.
The programs in the new directory exercise a lot of different
functionality than what's used by the middle and front tiers
of the C++ Middleware Writer (CMW). And unlike those tiers,
the example programs don't require a CMW account in order to
run them.
 
 
Brian
Ebenezer Enterprises - Enjoy programming again.
http://webEbenezer.net
woodbrian77@gmail.com: Feb 20 08:17AM -0800

On Saturday, February 18, 2017 at 10:06:32 AM UTC-6, Tim Rentsch wrote:
> what is allowed and what is not allowed (ie, under "fair
> use") are fuzzy rather than sharp. Here though my best
> understanding is that this case is pretty clearcut.
 
Due in part to a lack of spirit that says, "What's yours
is yours and what's mine is yours," I'm afraid it's
increasingly difficult to make money as a book author.
Thankfully, Providence has given on line services as a
way to rescue a few from a flood of immorality. "We few,
we happy few."
 
 
Brian
Ebenezer Enterprises - In G-d we trust.
http://webEbenezer.net
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Feb 20 06:32PM

On Mon, 20 Feb 2017 08:17:31 -0800 (PST)
> On Saturday, February 18, 2017 at 10:06:32 AM UTC-6, Tim Rentsch
> wrote:
[snip]
> Thankfully, Providence has given on line services as a
> way to rescue a few from a flood of immorality. "We few,
> we happy few."
 
Tim makes a perfectly reasonable response about fair use; and you
respond with irrelevant self-absorbed crap to parade your moral
superiority. Please stop it.
Popping mad <rainbow@colition.gov>: Feb 20 03:50PM

I have two object type that I wanted to compare to each other using the
operator== but to my surprise, which I compiled it, I got a complaint
about the different types being used without cast
 
 
euler.cpp|113 col 28| error: comparison between distinct pointer types
'tree::Predicate<int, int>*' and 'tree::Node<int>*' lacks a cast
 
 
my overload operator knows this already
 
class Predicate{
public:
Predicate(Node<node_type>& in_a, Node<node_type>& in_b,
Edge<bridge_type>& in_c)
: a{in_a}, b{in_b}, c{in_c}{
a.data++;
b.data++;
};
...
 
bool operator==(const Node<node_type>& first)
 
Can anyone suggest the cleanest means of working around this annoying
error.
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Feb 20 04:59PM +0100

On 20.02.2017 16:50, Popping mad wrote:
 
> bool operator==(const Node<node_type>& first)
 
> Can anyone suggest the cleanest means of working around this annoying
> error.
 
You can't overload `==` for raw pointer types, and you're not doing
that. Your overload is for references/values.
 
 
Cheers!,
 
- Alf
Andrey Karpov <karpov2007@gmail.com>: Feb 20 12:22AM -0800

> How about posting one or two of your recommendations here? I'm not
> intrigued when I see the phrase "C/C++ programmers."
 
I have noticed that there is always some "know-all" who doesn't like C/C++.
 
C/C++ programmers should be read as C programmers or C++ programmers. I guess nobody gets confused when it is written Java/C# or Java/JavaScript (example: Xx is seeking a Java/JavaScript Engineer for a direct hire position). By analogy, to make the story shorter, a lot of authors, me included, write C/C++, meaning that it is C or C++ language.
Ramine <toto@toto.net>: Feb 19 07:56PM -0500

Hello,
 
About the essence of efficiency...
 
We have to set wisdom and morality..
 
What is the American spirit ?
 
How America has tolerated Arab immigrants and Iranian immigrants and
African immigrants ?
 
For a naive mind, he will say that those arabs and Iranians and Africans
are not as beautiful as white europeans, so he will
come to the conclusion that he must discriminate them.
 
But this is not the spirit of America..
 
America to be more optimization says that if you are you are useful and
useful worker and you are useful to consummerism that brings
peace as was encouraged by Fordism, so even if you are not
as beautiful as white europeans , you are welcome to America,
because that's optimization ! and America thinks also optimization
to better optimize the system.
 
 
Thank you,
Amine Moulay Ramdane.
Ramine <toto@toto.net>: Feb 19 07:57PM -0500

Hello,
 
Sorry , i have posted in the wrong group.
 
 
Thank you,
Amine Moulay Ramdane.
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: