ACE_TAO
ACE_TAO copied to clipboard
Compile errors with clang20/c++23 and uses_wchar=1
Looks there are compile errors in TAO_IDL when using clang20 with C++23 enabled and wchar enabled
clang++-20 -std=c++23 -g -O0 -DACE_HAS_CUSTOM_EXPORT_MACROS=0 -I/home/runner/work/OpenDDS/OpenDDS/OpenDDS/ACE_TAO/ACE -DACE_NO_INLINE -I/home/runner/work/OpenDDS/OpenDDS/OpenDDS/ACE_TAO/ACE -I.. -Iinclude -Ife -DACE_USES_WCHAR -DTAO_IDL_FE_BUILD_DLL -c -fPIC -o .shobj/ast/ast_field.o /home/runner/work/OpenDDS/OpenDDS/OpenDDS/ACE_TAO/TAO/TAO_IDL/ast/ast_field.cpp
/home/runner/work/OpenDDS/OpenDDS/OpenDDS/ACE_TAO/TAO/TAO_IDL/ast/ast_expression.cpp:2878:11: error: overload resolution selected deleted operator '<<'
2878 | o << ACE_TEXT ("(nil symbolic name)");
| ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/ostream:695:5: note: candidate function [with _Traits = std::char_traits<char>] has been explicitly deleted
695 | operator<<(basic_ostream<char, _Traits>&, const wchar_t*) = delete;
C++20 deleted several operator<< for ostream, see https://en.cppreference.com/w/cpp/io/basic_ostream/operator_ltlt2.html
Looks like those should never have been ACE_TEXT. The type of o doesn't switch between narrow and wide characters.
Hmm, maybe "o" should be anything like: typedef std::basic_ostream<ACE_TCHAR> ACE_TOStream; or typedef std::basic_stringstream<ACE_TCHAR> ACE_TStrStr;