lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [lmi-commits] master 048b530 1/4: Require compiler to provide


From: Vadim Zeitlin
Subject: Re: [lmi] [lmi-commits] master 048b530 1/4: Require compiler to provide operator<=>
Date: Sun, 9 May 2021 18:06:52 +0200

On Wed,  5 May 2021 12:35:14 -0400 (EDT) Greg Chicares 
<gchicares@sbcglobal.net> wrote:

GC> branch: master
GC> commit 048b5307d30e59cacd878664fcb12fdcf1b4571d
GC> Author: Gregory W. Chicares <gchicares@sbcglobal.net>
GC> Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
GC> 
GC>     Require compiler to provide operator<=>
GC> ---
GC>  gpt_commutation_functions.hpp | 27 ---------------------------
GC>  1 file changed, 27 deletions(-)
GC> 
GC> diff --git a/gpt_commutation_functions.hpp b/gpt_commutation_functions.hpp
GC> index 7d65d7f..dcc9763 100644
GC> --- a/gpt_commutation_functions.hpp
GC> +++ b/gpt_commutation_functions.hpp
GC> @@ -114,34 +114,7 @@ struct gpt_scalar_parms
GC>      double               qab_child_amt   {                 0.0};
GC>      double               qab_waiver_amt  {                 0.0};
GC>  
GC> -#if defined __cpp_impl_three_way_comparison && 
__cpp_impl_three_way_comparison
GC>      bool operator==(gpt_scalar_parms const&) const = default;
GC> -#else  // no operator<=>
GC> -    bool operator==(gpt_scalar_parms const& z) const
GC> -        {
[...]

 Hello,

 This broke compilation with the gcc version used in the CI builds, see
e.g. https://github.com/let-me-illustrate/lmi/actions/runs/824277618 which
shows that all builds using gcc fail with the following error

../gpt_commutation_functions.hpp:105:54: error: ‘bool 
gpt_scalar_parms::operator==(const gpt_scalar_parms&) const’ cannot be defaulted
  105 |     bool operator==(gpt_scalar_parms const&) const = default;
      |                                                      ^~~~~~~

as the gcc version used there (9.3) doesn't support this C++20 feature yet
(just FYI, clang build failure is for a different reason, and will be
addressed in a separate message).

 I'd like to fix it a.s.a.p., but I wanted to confirm that we really don't
need to support any pre-C++20 compilers, as I'm also going to add a check
for this to configure then. I also wonder if you have any preferences about
the compiler version to use in the CI builds, as I don't know yet what am I
going to do about them: I could either try to set up a Debian Sid chroot to
use exactly the same version as we do (which will be gcc 11 soon if it
isn't already) or use the oldest still support version (10) or maybe even
do both. Please let me know if you have any preferences.

 Thanks!
VZ

Attachment: pgpAmNZpyL5To.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]