Skip to content

Tools fail to build with clang due to incompatibility with C++20: error: no type named 'result_of' in namespace 'std' #5629

@barracuda156

Description

@barracuda156
[100%] Building CXX object tools/CMakeFiles/tiledb-cli.dir/src/commands/info_command.cc.o
cd /opt/local/var/macports/build/tiledb-ef19584d/work/build/tools && /opt/local/bin/clang++-mp-17 -DFMT_SHARED -DNDEBUG -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -D_FILE_OFFSET_BITS=64 -I/opt/local/var/macports/build/tiledb-ef19584d/work/TileDB-2.28.1/tools/.. -I/opt/local/var/macports/build/tiledb-ef19584d/work/TileDB-2.28.1/tools/src -isystem /opt/local/include -isystem /opt/local/include/libfmt11 -isystem /opt/local/libexec/openssl3/include -pipe -I/opt/local/libexec/openssl3/include -Os -DNDEBUG -I/opt/local/libexec/openssl3/include -isystem/opt/local/include -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -std=c++20 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -mmacosx-version-min=14.0 -fvisibility=hidden -Wall -Wextra -Wno-unqualified-std-cast-call -fexperimental-library -MD -MT tools/CMakeFiles/tiledb-cli.dir/src/commands/help_command.cc.o -MF CMakeFiles/tiledb-cli.dir/src/commands/help_command.cc.o.d -o CMakeFiles/tiledb-cli.dir/src/commands/help_command.cc.o -c /opt/local/var/macports/build/tiledb-ef19584d/work/TileDB-2.28.1/tools/src/commands/help_command.cc
. . .
[100%] Built target tiledb
In file included from /opt/local/var/macports/build/tiledb-ef19584d/work/TileDB-2.28.1/tools/src/main/tiledb.cc:33:
/opt/local/include/clipp.h:163:40: error: no type named 'result_of' in namespace 'std'
  163 |         std::is_same<Ret,typename std::result_of<Fn(Args...)>::type>::value>{} );
      |                          ~~~~~~~~~~~~~~^~~~~~~~~
/opt/local/include/clipp.h:163:76: error: initializer list cannot be used on the right hand side of operator '>'
  163 |         std::is_same<Ret,typename std::result_of<Fn(Args...)>::type>::value>{} );
      |                                                                            ^~~
/opt/local/include/clipp.h:174:40: error: no type named 'result_of' in namespace 'std'
  174 |         std::is_same<Ret,typename std::result_of<Fn()>::type>::value>{} );
      |                          ~~~~~~~~~~~~~~^~~~~~~~~
/opt/local/include/clipp.h:174:69: error: initializer list cannot be used on the right hand side of operator '>'
  174 |         std::is_same<Ret,typename std::result_of<Fn()>::type>::value>{} );
      |                                                                     ^~~
In file included from /opt/local/var/macports/build/tiledb-ef19584d/work/TileDB-2.28.1/tools/src/commands/info_command.cc:33:
In file included from /opt/local/var/macports/build/tiledb-ef19584d/work/TileDB-2.28.1/tools/src/commands/info_command.h:36:
In file included from /opt/local/var/macports/build/tiledb-ef19584d/work/TileDB-2.28.1/tools/src/commands/command.h:36:
/opt/local/include/clipp.h:163:40: error: no type named 'result_of' in namespace 'std'
  163 |         std::is_same<Ret,typename std::result_of<Fn(Args...)>::type>::value>{} );
      |                          ~~~~~~~~~~~~~~^~~~~~~~~
/opt/local/include/clipp.h:163:76: error: initializer list cannot be used on the right hand side of operator '>'
  163 |         std::is_same<Ret,typename std::result_of<Fn(Args...)>::type>::value>{} );
      |                                                                            ^~~
/opt/local/include/clipp.h:174:40: error: no type named 'result_of' in namespace 'std'
  174 |         std::is_same<Ret,typename std::result_of<Fn()>::type>::value>{} );
      |                          ~~~~~~~~~~~~~~^~~~~~~~~
/opt/local/include/clipp.h:174:69: error: initializer list cannot be used on the right hand side of operator '>'
  174 |         std::is_same<Ret,typename std::result_of<Fn()>::type>::value>{} );
      |                                                                     ^~~
In file included from /opt/local/var/macports/build/tiledb-ef19584d/work/TileDB-2.28.1/tools/src/commands/help_command.cc:35:
In file included from /opt/local/var/macports/build/tiledb-ef19584d/work/TileDB-2.28.1/tools/src/commands/help_command.h:39:
In file included from /opt/local/var/macports/build/tiledb-ef19584d/work/TileDB-2.28.1/tools/src/commands/command.h:36:
/opt/local/include/clipp.h:163:40: error: no type named 'result_of' in namespace 'std'
  163 |         std::is_same<Ret,typename std::result_of<Fn(Args...)>::type>::value>{} );
      |                          ~~~~~~~~~~~~~~^~~~~~~~~
/opt/local/include/clipp.h:163:76: error: initializer list cannot be used on the right hand side of operator '>'
  163 |         std::is_same<Ret,typename std::result_of<Fn(Args...)>::type>::value>{} );
      |                                                                            ^~~
/opt/local/include/clipp.h:174:40: error: no type named 'result_of' in namespace 'std'
  174 |         std::is_same<Ret,typename std::result_of<Fn()>::type>::value>{} );
      |                          ~~~~~~~~~~~~~~^~~~~~~~~
/opt/local/include/clipp.h:174:69: error: initializer list cannot be used on the right hand side of operator '>'
  174 |         std::is_same<Ret,typename std::result_of<Fn()>::type>::value>{} );
      |                                                                     ^~~
4 errors generated.
make[2]: *** [tools/CMakeFiles/tiledb-cli.dir/src/commands/help_command.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
4 errors generated.
make[2]: *** [tools/CMakeFiles/tiledb-cli.dir/src/main/tiledb.cc.o] Error 1
4 errors generated.
make[2]: *** [tools/CMakeFiles/tiledb-cli.dir/src/commands/info_command.cc.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/tiledb-ef19584d/work/build'
make[1]: *** [tools/CMakeFiles/tiledb-cli.dir/all] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/tiledb-ef19584d/work/build'
make: *** [all] Error 2

Apparently result_of has been removed in C++20: opencv/opencv#21109
Same failure with Apple clang of macOS 14.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions