Le ven. 11 oct. 2019 à 17:50, Jonathan Wakely <jwak...@redhat.com> a écrit : > > By using the built-in we don't need to match a partial specialization > for std::is_same and don't need to instantiate std::is_same at all for > uses of std::is_same_v. > > * include/std/type_traits (is_same): Replace partial specialization > by using __is_same_as built-in in primary template. > (is_same_v): Use __is_same_as built-in instead of instantiating the > is_same trait. > > Tested x86_64-linux, committed to trunk. >
Hi Jonathan, It looks like this creates the following error when I try to bootstrap clang 9.0.0 using the latest gcc and libstdc++ from trunk. Note that with g++, there is no problem, however it looks like clang++ has some problem with the new header. I don't know if this is an issue on libstdc++ side or clang++ side. Cheers, Romain FAILED: compiler-rt/lib/xray/CMakeFiles/RTXray.x86_64.dir/xray_buffer_queue.cc.o /workdir/build/final-system/llvm-build/./bin/clang++ --target=x86_64-1a-linux-gnu -DXRAY_HAS_EXCEPTIONS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/workdir/src/llvm-9.0.0/compiler-rt/lib/xray/.. -I/workdir/src/llvm-9.0.0/compiler-rt/lib/xray/../../include -O2 -msse -msse2 -msse3 -I/workdir/build/final-system/llvm-temporary-static-dependencies/install/include -I/workdir/build/final-system/llvm-temporary-static-dependencies/install/include/ncursesw -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -std=c++11 -Wno-unused-parameter -O3 -DNDEBUG -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -Wno-non-virtual-dtor -fno-rtti -MD -MT compiler-rt/lib/xray/CMakeFiles/RTXray.x86_64.dir/xray_buffer_queue.cc.o -MF compiler-rt/lib/xray/CMakeFiles/RTXray.x86_64.dir/xray_buffer_queue.cc.o.d -o compiler-rt/lib/xray/CMakeFiles/RTXray.x86_64.dir/xray_buffer_queue.cc.o -c /workdir/src/llvm-9.0.0/compiler-rt/lib/xray/xray_buffer_queue.cc In file included from /workdir/src/llvm-9.0.0/compiler-rt/lib/xray/xray_buffer_queue.cc:21: In file included from /workdir/src/llvm-9.0.0/compiler-rt/lib/xray/xray_allocator.h:29: In file included from /workdir/src/llvm-9.0.0/compiler-rt/lib/xray/xray_utils.h:20: In file included from /opt/1A/toolchain/x86_64-v20.0.3/lib64/gcc/x86_64-1a-linux-gnu/10.0.0/../../../../include/c++/10.0.0/utility:70: In file included from /opt/1A/toolchain/x86_64-v20.0.3/lib64/gcc/x86_64-1a-linux-gnu/10.0.0/../../../../include/c++/10.0.0/bits/stl_pair.h:59: In file included from /opt/1A/toolchain/x86_64-v20.0.3/lib64/gcc/x86_64-1a-linux-gnu/10.0.0/../../../../include/c++/10.0.0/bits/move.h:55: /opt/1A/toolchain/x86_64-v20.0.3/lib64/gcc/x86_64-1a-linux-gnu/10.0.0/../../../../include/c++/10.0.0/type_traits:1393:51: error: '_Tp' does not refer to a value : public integral_constant<bool, __is_same_as(_Tp, _Up)> ^ /opt/1A/toolchain/x86_64-v20.0.3/lib64/gcc/x86_64-1a-linux-gnu/10.0.0/../../../../include/c++/10.0.0/type_traits:1391:21: note: declared here template<typename _Tp, typename _Up> ^ /opt/1A/toolchain/x86_64-v20.0.3/lib64/gcc/x86_64-1a-linux-gnu/10.0.0/../../../../include/c++/10.0.0/type_traits:1393:56: error: '_Up' does not refer to a value : public integral_constant<bool, __is_same_as(_Tp, _Up)> ^ /opt/1A/toolchain/x86_64-v20.0.3/lib64/gcc/x86_64-1a-linux-gnu/10.0.0/../../../../include/c++/10.0.0/type_traits:1391:35: note: declared here template<typename _Tp, typename _Up> ^ 2 errors generated.