Thursday, September 10, 2020

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

Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Sep 10 10:16PM +0100

On Thu, 10 Sep 2020 22:49:40 +0200
> "most" countries. In any country following the Berne Convention - which
> is most of them - any creative work is automatically copyrighted by the
> author or by whoever paid the author to make the work.
 
I don't think the Berne Convention has the effect you mention in
relation to "whoever paid the author to make the work" - the position
on that as far as the Convention is concerned is I believe optional. I
happen to know that a well drawn contract which provides for the
production of a copyrightable work such as software for payment must
provide explicitly for the copyright in the work to transfer to the
payer, otherwise the payer has a right of use for the purposes for
which the software was written but not the ownership of it.
 
It is some time ago since I needed to know this kind of thing but there
was a case in the UK involving an architect producing plans for a
development and the developer wanted to sell them on for another similar
development. The architect required further payment before allowing
them to be used for that purpose, in that the contract did not provide
for transfer of copyrights, so the developer only had an implied
licence to use their drawings and designs for the purposes of building
out the development and not for other purposes. You can probably
google the case online as it was a well-known "gotcha" that I had to be
aware of.
Richard Damon <Richard@Damon-Family.org>: Sep 10 07:20PM -0400

On 9/10/20 1:23 PM, Anton Shepelev wrote:
> content any more available than it already is, contrary to
> books, movies, music, or any digital content that is not
> made universally available by its author.
 
That is clearly false. Anything shown of broadcast TV was freely
available to anyone with a TV, and if you used a cheap VCR you could
easily have recorded the program. No essential difference.
 
That broadcast is clearly under copyright, and if it was something like
a Disney movie, and you started selling copies of it, watch how fast you
get sued (and you will lose).
 
Same for everything on the web not under a paywall, anyone can go to it,
but it is protected by copyright.
 
Freely available isn't the same as free of copyright.
 
Having posted to Usenet, you have given implied permission for the
network to do the things that networks do and readers can do things that
they normally do, so transfer around Usenet, quote for a reply.
 
What you can't do (probably, depending on things like far use) would be
make something like a book out of things said.
olcott <NoOne@NoWhere.com>: Sep 10 04:05PM -0500

On 9/10/2020 3:50 PM, Chris Vine wrote:
> indeed superior to C's, but I wasn't commenting on that. I was
> commenting on the fact that the appeal to C programmers in these terms
> is false:
 
Not in the terms that I originally specified.
 
I have been a very productive C++ programmer for two decades hardly ever
needing more than those three things. Someone else on my request wrote a
very superb two-dimensional std::vector for me in this forum, even then
I did not need to touch templates myself.
 
With just the tiniest little bit of learning curve C programmers can
start writing their same programs much more effectively in C++.
 
I have never ever had to do any dynamic memory allocation in any of my
own code.
 
 
--
Copyright 2020 Pete Olcott
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Sep 10 10:24PM +0100

On Thu, 10 Sep 2020 16:05:35 -0500
olcott <NoOne@NoWhere.com> wrote:
[snip]
> > commenting on the fact that the appeal to C programmers in these terms
> > is false:
 
> Not in the terms that I originally specified.
 
In my posting about C++'s differences from C I wasn't responding to you.
 
I am sure your views are interesting, but they are irrelevant to my
posting, and you have contrived to elide the part of my posting which
made that evident. I hope your halting logic is better.
olcott <NoOne@NoWhere.com>: Sep 10 04:34PM -0500

On 9/10/2020 4:24 PM, Chris Vine wrote:
>>> is false:
 
>> Not in the terms that I originally specified.
 
> In my posting about C++'s differences from C I wasn't responding to you.
 
I was staying on topic for this thread.
 
My primary point in this thread is that the most essential aspects of
C++ can be learned by C programmers in a few hours so that these C
programmers can begin migrating their C code to C++ and reap amazing
benefits.
 
 
--
Copyright 2020 Pete Olcott
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Sep 10 10:39PM +0100

On Thu, 10 Sep 2020 16:34:57 -0500
> C++ can be learned by C programmers in a few hours so that these C
> programmers can begin migrating their C code to C++ and reap amazing
> benefits.
 
Happily, newsnet does not provide for ownership of topics by
the self-absorbed, or by anyone else for that matter.
olcott <NoOne@NoWhere.com>: Sep 10 05:10PM -0500

On 9/10/2020 4:39 PM, Chris Vine wrote:
>> benefits.
 
> Happily, newsnet does not provide for ownership of topics by
> the self-absorbed, or by anyone else for that matter.
 
I made a good case for C programmers to learn C++.
 
The key aspect of this case is that the most useful aspects of C++ have
very little learning curve cost such that existing C programs can be
gradually migrated to this subset of of C++ drastically improving the
quality and maintainability of these programs.
 
--
Copyright 2020 Pete Olcott
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Sep 10 11:26PM +0100

On Thu, 10 Sep 2020 17:10:30 -0500
 
> > Happily, newsnet does not provide for ownership of topics by
> > the self-absorbed, or by anyone else for that matter.
 
> I made a good case for C programmers to learn C++.
 
Do you seriously think anyone was in doubt about what you were trying
to do? Get a clue and try to stop trying to take over other people's
conversations.
olcott <NoOne@NoWhere.com>: Sep 10 05:42PM -0500

On 9/10/2020 5:26 PM, Chris Vine wrote:
 
> Do you seriously think anyone was in doubt about what you were trying
> to do? Get a clue and try to stop trying to take over other people's
> conversations.
 
This is my thread and my conversation. If you want to change the subject
then indicate that by appended the change to the subject, otherwise your
comments of are off-topic.
 
 
--
Copyright 2020 Pete Olcott
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Sep 10 11:49PM +0100

On Thu, 10 Sep 2020 17:42:56 -0500
> This is my thread and my conversation. If you want to change the subject
> then indicate that by appended the change to the subject, otherwise your
> comments of are off-topic.
 
Nope. The comments to which I was responding, and my own comments, were
on topic so it would be pointless changing the subject. They just
didn't happen to be your comments. As I said, newsnet does not provide
for ownership of topics by the self-absorbed.
 
Stop behaving like a mono-maniac and your life will be happier.
olcott <NoOne@NoWhere.com>: Sep 10 05:55PM -0500

On 9/10/2020 3:50 PM, Chris Vine wrote:
> ubiquitous in both C and C++, but the only way to do so in C gives rise
> to undefined behaviour in C++, even if the objects are C-like
> (so-called trivial objects).
 
I read what you said this this. It was fine.
There are too many people that came to this thread saying very
discouraging words to prospective C++ programmers.
 
 
--
Copyright 2020 Pete Olcott
olcott <NoOne@NoWhere.com>: Sep 10 06:01PM -0500

On 9/10/2020 5:49 PM, Chris Vine wrote:
> didn't happen to be your comments. As I said, newsnet does not provide
> for ownership of topics by the self-absorbed.
 
> Stop behaving like a mono-maniac and your life will be happier.
 
I carefully read your comments this time. They were fine.
 
--
Copyright 2020 Pete Olcott
Jeff Barnett <jbb@notatt.com>: Sep 10 04:22PM -0600

On 9/10/2020 1:13 PM, olcott wrote:
 
> All paradoxes including all undecidable decision problems (such as
> Tarski and Gödel) really only point out that human understanding of
> these things is flawed.
 
Well you certainly exhibit flawed understanding, so there is some truth
(not derived from an inheritance model) there. The Barber of Seville is
not incoherent, it's merely paradoxical and that makes it fun and a
little interesting. The fact is that mathematicians and logicians
learned a lot from so called paradoxes and made them do formal work:
improving fundamental definitions, deriving contradictions in proofs,
providing material for puzzle books, and keeping some cranks busy by
taking there attention away from their drab lives. Deep understanding of
the areas on the boundary between paradox and insight fuel some of the
most interesting and beautiful mathematics in the world.
--
Jeff Barnett
olcott <NoOne@NoWhere.com>: Sep 10 05:40PM -0500

On 9/10/2020 5:22 PM, Jeff Barnett wrote:
> taking there attention away from their drab lives. Deep understanding of
> the areas on the boundary between paradox and insight fuel some of the
> most interesting and beautiful mathematics in the world.
 
 
Actually the Russell's Paradox version of that proves my point they
corrected the flaws with naive set theory on the basis of this paradox.
 
--
Copyright 2020 Pete Olcott
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Sep 11 12:36AM +0200

On 10.09.2020 11:01, Juha Nieminen wrote:
 
> //---------------------------------------------------
> func(10); // This should be a-ok, but with the above it causes an error
> //---------------------------------------------------
 
 
The following is possibly what you want.
 
The possible error message mentions that the function is deleted, and
I'd hoped it would also mention the condition where it is deleted, but
alas, both g++ and MSVC fail to include that in the diagnostic.
 
It's /possible/ that instead of this functionality you really intended
what you get with the out-commented definition of `has_all_values_of_? .
 
 
 
---------------------------------------------------------------------------
#include <limits.h> // CHAR_BIT
#include <stdint.h> // uint32_t, uint64_t
 
#include <utility>
using std::enable_if_t, std::is_integral_v, std::is_signed_v;
 
// template< class A, class B >
// constexpr bool has_all_values_of_ = true
// and (is_integral_v<A> and is_integral_v<B>)
// and (is_signed_v<A> == is_signed_v<B>? sizeof( A ) <= sizeof( B
) : sizeof( A ) < sizeof( B ));
 
template< class A, class B >
constexpr bool has_all_values_of_ = true
and is_integral_v<A> and is_integral_v<B> and sizeof( A ) <=
sizeof( B );
 
#if 0
using Word = uint64_t;
#else
using Word = uint32_t;

No comments: