octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #65318] Deprecation warning with C++20


From: Rafael Laboissière
Subject: [Octave-bug-tracker] [bug #65318] Deprecation warning with C++20
Date: Thu, 15 Feb 2024 07:21:09 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?65318>

                 Summary: Deprecation warning with C++20
                   Group: GNU Octave
               Submitter: rlaboiss
               Submitted: Thu 15 Feb 2024 12:21:08 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 9.0.90
         Discussion Lock: Any
        Operating System: GNU/Linux
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Thu 15 Feb 2024 12:21:08 PM UTC By: Rafael Laboissière <rlaboiss>
When Octave extensions are compiled using the C++ standard 20 of g++, the
following warning is issued :


$ cat <<EOF > test.cc
#include <octave/Range.h>
int main(){}
EOF
$ g++ --version
g++ (Debian 13.2.0-13) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ g++ -I/usr/include/octave-9.0.90/ -std=c++20 test.cc
In file included from test.cc:1:
/usr/include/octave-9.0.90/octave/Range.h: In lambda function:
/usr/include/octave-9.0.90/octave/Range.h:255:22: warning: implicit capture of
‘this’ via ‘[=]’ is deprecated in C++20 [-Wdeprecated]
  255 |         idx.loop (n, [=, &array] (octave_idx_type i)
      |                      ^
/usr/include/octave-9.0.90/octave/Range.h:255:22: note: add explicit
‘this’ or ‘*this’ capture









    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65318>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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