Uploaded image for project: 'Santuario'
  1. Santuario
  2. SANTUARIO-527

Compilation error with C++20 standard

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • C++ 2.0.2
    • None
    • C++
    • None

    Description

      System information:

       

      $ uname -a
      Linux ncerndobedev6196 4.12.14-95.45-default #1 SMP Wed Dec 11 13:09:13 UTC 2019 (12c8180) x86_64 x86_64 x86_64 GNU/Linux
      $ libc.so.6 --version
      GNU C Library (GNU libc) stable release version 2.31. Copyright (C) 2020 Free Software Foundation, Inc.
      $ /gcc --version
      gcc (GCC) 10.0.1 20200211 (experimental) Copyright (C) 2020 Free Software Foundation, Inc.

      Compiling with -std=gnu++2a. Received kind of errors:

      tools/xklient/xklient.cpp: In function 'int main(int, char**)':
      tools/xklient/xklient.cpp:4729:30: error: use of deleted function 'std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char16_t*) [with _Traits = std::char_traits<char>]'
       4729 | << e.getMessage() << endl;
       | ^
      In file included from /opt/1A/toolchain/x86_64-v20.0.8/include/c++/10.0.1/iostream:39,
       from tools/xklient/xklient.cpp:83:
      /opt/1A/toolchain/x86_64-v20.0.8/include/c++/10.0.1/ostream:645:5: note: declared here
       645 | operator<<(basic_ostream<char, _Traits>&, const char16_t*) = delete;
       | ^~~~~~~~

      The root cause is that several overloads of std::basic_ostream::operator<< were removed (in particular the one dealing with charXX_t as described here: https://en.cppreference.com/w/cpp/io/basic_ostream/operator_ltlt2.

       

       

      Attachments

        Activity

          People

            scantor Scott Cantor
            stac47 Laurent Stacul
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: