asutton / gcc Goto Github PK
View Code? Open in Web Editor NEWConcepts rewrite for GCC
License: GNU General Public License v2.0
Concepts rewrite for GCC
License: GNU General Public License v2.0
GCC apparently doesn't like concepts to have semicolons after them when in pedantic mode (-pedantic
or -Wpedantic
):
In file included from ../../../include/cjdb/concepts/core/same_as.hpp:19,
from ../../../include/cjdb/concepts/core.hpp:22,
from ../../../include/cjdb/concepts.hpp:20,
from ../../../test/unit/concepts/concepts.cpp:16:
../../../include/cjdb/detail/concepts/core/is_same.hpp:26:37: error: extra ';' [-Werror=pedantic]
26 | concept is_same = is_same_v<T, U>;
|
My program built with:
/usr/local/bin/g++ \
-I../../../include -I../../../test/unit/concepts \
-std=c++2a \
-fdiagnostics-color=always \
-Werror \
-Wall -Wextra \
-Wcast-align \
-Wconversion -Wdouble-promotion \
-Wnon-virtual-dtor \
-Wold-style-cast \
-Woverloaded-virtual \
-pedantic \
-Wshadow \
-Wsign-conversion -Wsign-promo \
-Wunused \
-Wformat=2 \
-Wodr \
-Wno-attributes \
-Wnull-dereference \
-g -fvisibility=default \
-fstack-protector -fstack-protector-all \
-MD -MT test/unit/concepts/CMakeFiles/test.unit.concepts.concepts.dir/concepts.cpp.o \
-MF test/unit/concepts/CMakeFiles/test.unit.concepts.concepts.dir/concepts.cpp.o.d \
-o test/unit/concepts/CMakeFiles/test.unit.concepts.concepts.dir/concepts.cpp.o \
-c ../../../test/unit/concepts/concepts.cpp
GCC built with:
export CC=/usr/bin/gcc-9
export CXX=/usr/bin/g++-9
export CFLAGS="-w -O3 -DNDEBUG -g0 -fdiagnostics-color=always -fuse-ld=gold"
export CXXFLAGS="-w -O3 -DNDEBUG -g0 -fdiagnostics-color=always -fuse-ld=gold"
export LDFLAGS="-fuse-ld=gold"
../gcc/configure --enable-languages=c,c++ \
--disable-bootstrap \
--disable-libada \
--disable-libgomp \
--disable-libquadmath \
--disable-libquadmath-support \
--disable-multilib \
--disable-nls \
--disable-werror
make CFLAGS="-w -O2 -DNDEBUG -g0 -fdiagnostics-color=always -fuse-ld=gold" \
CXXFLAGS="-w -O2 -DNDEBUG -g0 -fdiagnostics-color=always -fuse-ld=gold" \
LDFLAGS="-fuse-ld=gold" -j 6
make -j 6 install-strip
swappable.ii.txt (GitHub doesn't allow raw *.ii files, so I added .txt to trick it ๐).
Ubuntu 18.04
Gold 1.35
See #1.
See #1 (but change test from assignable.cpp
to swappable.cpp
).
root@721baa14bc58:/data/build/gcc-sutton/debug# ninja concepts.core.swappable
[1/2] Building CXX object test/concepts/core/CMakeFiles/concepts.core.swappable.dir/swappable.cpp.o
FAILED: test/concepts/core/CMakeFiles/concepts.core.swappable.dir/swappable.cpp.o
/opt/sutton/bin/g++-sutton -DCJDB_AUDIT_CONTRACTS -I../../../include -isystem /root/.conan/data/gsl_microsoft/20180102/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include -isystem /root/.conan/data/catch2/2.5.0/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include -save-temps -g -Wall -Wextra -Wno-attributes -Wsign-promo -Woverloaded-virtual -Wnon-virtual-dtor -Wodr -Werror -fdiagnostics-color=always -Wlogical-op -fstack-protector-all -std=c++2a -fsanitize=address -fsanitize=undefined -std=c++2a -MD -MT test/concepts/core/CMakeFiles/concepts.core.swappable.dir/swappable.cpp.o -MF test/concepts/core/CMakeFiles/concepts.core.swappable.dir/swappable.cpp.o.d -o test/concepts/core/CMakeFiles/concepts.core.swappable.dir/swappable.cpp.o -c ../../../test/concepts/core/swappable.cpp
In file included from ../../../include/cjdb/detail/type_traits/type_traits.hpp:19,
from ../../../include/cjdb/detail/concepts/core/convertibleto.hpp:19,
from ../../../include/cjdb/detail/concepts/core/commonreference.hpp:19,
from ../../../include/cjdb/detail/concepts/core/assignable.hpp:19,
from ../../../include/cjdb/detail/concepts/core/swappable.hpp:19,
from ../../../test/concepts/core/swappable.cpp:11:
../../../include/cjdb/detail/type_traits/expose_type.hpp: In substitution of 'template<class T> requires requires{typename T::type;} using _t = typename T::type [with T = cjdb::common_type<int (&)[4], bool (&)[4]>]':
../../../include/cjdb/detail/type_traits/common_type.hpp:56:48: required by substitution of 'template<class ... T> using common_type_t = cjdb::_t<cjdb::common_type<T ...> > [with T = {int (&)[4], bool (&)[4]}]'
../../../include/cjdb/detail/type_traits/common_reference.hpp:43:7: required from 'struct cjdb::detail_common_reference::common_reference4<int (&)[4], bool (&)[4]>'
../../../include/cjdb/detail/type_traits/common_reference.hpp:62:14: required from 'struct cjdb::detail_common_reference::common_reference3<int (&)[4], bool (&)[4]>'
../../../include/cjdb/detail/type_traits/common_reference.hpp:118:14: required from 'struct cjdb::detail_common_reference::common_reference2<int (&)[4], bool (&)[4]>'
../../../include/cjdb/detail/type_traits/common_reference.hpp:179:11: required from 'struct cjdb::common_reference<int (&)[4], bool (&)[4]>'
../../../include/cjdb/detail/concepts/core/commonreference.hpp:43:7: required from here
../../../include/cjdb/detail/type_traits/expose_type.hpp:22:31: internal compiler error: tree check: accessed elt 2 of tree_vec with 1 elts in map_arguments, at cp/constraint.cc:577
22 | using _t = typename T::type;
| ^
0x202f59e tree_vec_elt_check_failed(int, int, char const*, int, char const*)
../../gcc/gcc/tree.c:9955
0xeda986 tree_vec_elt_check(tree_node*, int, char const*, int, char const*)
../../gcc/gcc/tree.h:3378
0xeda986 map_arguments
../../gcc/gcc/cp/constraint.cc:577
0xeda986 build_parameter_mapping
../../gcc/gcc/cp/constraint.cc:588
0xeda986 normalize_atom
../../gcc/gcc/cp/constraint.cc:608
0xeda986 normalize_expression
../../gcc/gcc/cp/constraint.cc:631
0xedaf3c normalize_logical_operation
../../gcc/gcc/cp/constraint.cc:474
0xedaabe normalize_expression
../../gcc/gcc/cp/constraint.cc:629
0xede266 more_constrained(tree_node*, tree_node*)
../../gcc/gcc/cp/constraint.cc:2143
0x1049215 more_specialized_partial_spec
../../gcc/gcc/cp/pt.c:23231
0x1049658 most_specialized_partial_spec
../../gcc/gcc/cp/pt.c:23636
0x105e564 instantiate_class_template_1
../../gcc/gcc/cp/pt.c:11106
0x105e564 instantiate_class_template(tree_node*)
../../gcc/gcc/cp/pt.c:11642
0x10e41ad complete_type(tree_node*)
../../gcc/gcc/cp/typeck.c:138
0x102e894 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:15117
0x103c292 tsubst_decl
../../gcc/gcc/cp/pt.c:13937
0x102dd77 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:14463
0x1049e82 instantiate_template_1
../../gcc/gcc/cp/pt.c:19842
0x1049e82 instantiate_template(tree_node*, tree_node*, int)
../../gcc/gcc/cp/pt.c:19898
0x102e10d instantiate_alias_template
../../gcc/gcc/cp/pt.c:19922
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
ninja: build stopped: subcommand failed.
assignable.ii.txt (GitHub doesn't allow raw *.ii
files, so I added .txt
to trick it ๐)
Ubuntu 18.04
Gold 1.15
../gcc/configure \
--enable-languages=c,c++ \
--prefix=/opt/sutton \
--program-suffix=-sutton \
--disable-mutiarch \
--disable-multilib \
--disable-bootstrap \
--disable-nls \
--with-diagnostics-color=always \
--enable-lto
export CC=clang # clang-7
export CFLAGS='-Ofast -DNDEBUG -std=c11'
export CXX=clang++
export CXXFLAGS='-Ofast -DNDEBUG -std=c++17'
export LDFLAGS='-fuse-ld=lld'
make -j24
/opt/sutton/bin/g++-sutton \
-DCJDB_AUDIT_CONTRACTS \
-I../../../include \
-isystem /root/.conan/data/gsl_microsoft/20180102/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include \
-save-temps \
-g \
-Wall \
-Wextra \
-Wno-attributes \
-Wsign-promo \
-Woverloaded-virtual \
-Wnon-virtual-dtor \
-Wodr \
-Werror \
-fdiagnostics-color=always \
-Wlogical-op \
-fstack-protector-all \
-std=c++2a \
-fsanitize=address \
-fsanitize=undefined \
-std=c++2a \
-MD \
-MT \
test/concepts/core/CMakeFiles/concepts.core.assignable.dir/assignable.cpp.o \
-MF \
test/concepts/core/CMakeFiles/concepts.core.assignable.dir/assignable.cpp.o.d \
-o test/concepts/core/CMakeFiles/concepts.core.assignable.dir/assignable.cpp.o \
-c ../../../test/concepts/core/assignable.cpp
[assignable.ii.txt](https://github.com/asutton/gcc/files/2701076/assignable.ii.txt)
root@721baa14bc58:/data/build/gcc-sutton/debug# ninja concepts.core.assignable
[1/2] Building CXX object test/concepts/core/CMakeFiles/concepts.core.assignable.dir/assignable.cpp.o
FAILED: test/concepts/core/CMakeFiles/concepts.core.assignable.dir/assignable.cpp.o
/opt/sutton/bin/g++-sutton -DCJDB_AUDIT_CONTRACTS -I../../../include -isystem /root/.conan/data/gsl_microsoft/20180102/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include -g -Wall -Wextra -Wno-attributes -Wsign-promo -Woverloaded-virtual -Wnon-virtual-dtor -Wodr -Werror -fdiagnostics-color=always -Wlogical-op -fstack-protector-all -std=c++2a -fsanitize=address -fsanitize=undefined -std=c++2a -MD -MT test/concepts/core/CMakeFiles/concepts.core.assignable.dir/assignable.cpp.o -MF test/concepts/core/CMakeFiles/concepts.core.assignable.dir/assignable.cpp.o.d -o test/concepts/core/CMakeFiles/concepts.core.assignable.dir/assignable.cpp.o -c ../../../test/concepts/core/assignable.cpp
In file included from ../../../include/cjdb/detail/type_traits/type_traits.hpp:19,
from ../../../include/cjdb/detail/concepts/core/convertibleto.hpp:19,
from ../../../include/cjdb/detail/concepts/core/commonreference.hpp:19,
from ../../../include/cjdb/detail/concepts/core/assignable.hpp:19,
from ../../../test/concepts/core/assignable.cpp:16:
../../../include/cjdb/detail/type_traits/expose_type.hpp: In substitution of 'template<class T> requires requires{typename T::type;} using _t = typename T::type [with T = cjdb::common_type<const main()::fake_assignable&, const int&>]':
../../../include/cjdb/detail/type_traits/common_type.hpp:56:48: required by substitution of 'template<class ... T> using common_type_t = cjdb::_t<cjdb::common_type<T ...> > [with T = {const main()::fake_assignable&, const int&}]'
../../../include/cjdb/detail/type_traits/common_reference.hpp:43:7: required from 'struct cjdb::detail_common_reference::common_reference4<const main()::fake_assignable&, const int&>'
../../../include/cjdb/detail/type_traits/common_reference.hpp:62:14: required from 'struct cjdb::detail_common_reference::common_reference3<const main()::fake_assignable&, const int&>'
../../../include/cjdb/detail/type_traits/common_reference.hpp:118:14: required from 'struct cjdb::detail_common_reference::common_reference2<const main()::fake_assignable&, const int&>'
../../../include/cjdb/detail/type_traits/common_reference.hpp:179:11: required from 'struct cjdb::common_reference<const main()::fake_assignable&, const int&>'
../../../include/cjdb/detail/concepts/core/commonreference.hpp:43:7: required from here
../../../include/cjdb/detail/type_traits/expose_type.hpp:22:31: internal compiler error: tree check: accessed elt 2 of tree_vec with 1 elts in map_arguments, at cp/constraint.cc:577
22 | using _t = typename T::type;
| ^
0x202f59e tree_vec_elt_check_failed(int, int, char const*, int, char const*)
../../gcc/gcc/tree.c:9955
0xeda986 tree_vec_elt_check(tree_node*, int, char const*, int, char const*)
../../gcc/gcc/tree.h:3378
0xeda986 map_arguments
../../gcc/gcc/cp/constraint.cc:577
0xeda986 build_parameter_mapping
../../gcc/gcc/cp/constraint.cc:588
0xeda986 normalize_atom
../../gcc/gcc/cp/constraint.cc:608
0xeda986 normalize_expression
../../gcc/gcc/cp/constraint.cc:631
0xedaf3c normalize_logical_operation
../../gcc/gcc/cp/constraint.cc:474
0xedaabe normalize_expression
../../gcc/gcc/cp/constraint.cc:629
0xede266 more_constrained(tree_node*, tree_node*)
../../gcc/gcc/cp/constraint.cc:2143
0x1049215 more_specialized_partial_spec
../../gcc/gcc/cp/pt.c:23231
0x1049658 most_specialized_partial_spec
../../gcc/gcc/cp/pt.c:23636
0x105e564 instantiate_class_template_1
../../gcc/gcc/cp/pt.c:11106
0x105e564 instantiate_class_template(tree_node*)
../../gcc/gcc/cp/pt.c:11642
0x10e41ad complete_type(tree_node*)
../../gcc/gcc/cp/typeck.c:138
0x102e894 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:15117
0x103c292 tsubst_decl
../../gcc/gcc/cp/pt.c:13937
0x102dd77 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:14463
0x1049e82 instantiate_template_1
../../gcc/gcc/cp/pt.c:19842
0x1049e82 instantiate_template(tree_node*, tree_node*, int)
../../gcc/gcc/cp/pt.c:19898
0x102e10d instantiate_alias_template
../../gcc/gcc/cp/pt.c:19922
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
ninja: build stopped: subcommand failed.
root@721baa14bc58:/data/build/gcc-sutton/debug# ninja concepts.core.assignable
[0/1] Re-running CMake...
-- Configuring done
-- Generating done
-- Build files have been written to: /data/build/gcc-sutton/debug
[1/2] Building CXX object test/concepts/core/CMakeFiles/concepts.core.assignable.dir/assignable.cpp.o
FAILED: test/concepts/core/CMakeFiles/concepts.core.assignable.dir/assignable.cpp.o
/opt/sutton/bin/g++-sutton -DCJDB_AUDIT_CONTRACTS -I../../../include -isystem /root/.conan/data/gsl_microsoft/20180102/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include -save-temps -g -Wall -Wextra -Wno-attributes -Wsign-promo -Woverloaded-virtual -Wnon-virtual-dtor -Wodr -Werror -fdiagnostics-color=always -Wlogical-op -fstack-protector-all -std=c++2a -fsanitize=address -fsanitize=undefined -std=c++2a -MD -MT test/concepts/core/CMakeFiles/concepts.core.assignable.dir/assignable.cpp.o -MF test/concepts/core/CMakeFiles/concepts.core.assignable.dir/assignable.cpp.o.d -o test/concepts/core/CMakeFiles/concepts.core.assignable.dir/assignable.cpp.o -c ../../../test/concepts/core/assignable.cpp
In file included from ../../../include/cjdb/detail/type_traits/type_traits.hpp:19,
from ../../../include/cjdb/detail/concepts/core/convertibleto.hpp:19,
from ../../../include/cjdb/detail/concepts/core/commonreference.hpp:19,
from ../../../include/cjdb/detail/concepts/core/assignable.hpp:19,
from ../../../test/concepts/core/assignable.cpp:16:
../../../include/cjdb/detail/type_traits/expose_type.hpp: In substitution of 'template<class T> requires requires{typename T::type;} using _t = typename T::type [with T = cjdb::common_type<const main()::fake_assignable&, const int&>]':
../../../include/cjdb/detail/type_traits/common_type.hpp:56:48: required by substitution of 'template<class ... T> using common_type_t = cjdb::_t<cjdb::common_type<T ...> > [with T = {const main()::fake_assignable&, const int&}]'
../../../include/cjdb/detail/type_traits/common_reference.hpp:43:7: required from 'struct cjdb::detail_common_reference::common_reference4<const main()::fake_assignable&, const int&>'
../../../include/cjdb/detail/type_traits/common_reference.hpp:62:14: required from 'struct cjdb::detail_common_reference::common_reference3<const main()::fake_assignable&, const int&>'
../../../include/cjdb/detail/type_traits/common_reference.hpp:118:14: required from 'struct cjdb::detail_common_reference::common_reference2<const main()::fake_assignable&, const int&>'
../../../include/cjdb/detail/type_traits/common_reference.hpp:179:11: required from 'struct cjdb::common_reference<const main()::fake_assignable&, const int&>'
../../../include/cjdb/detail/concepts/core/commonreference.hpp:43:7: required from here
../../../include/cjdb/detail/type_traits/expose_type.hpp:22:31: internal compiler error: tree check: accessed elt 2 of tree_vec with 1 elts in map_arguments, at cp/constraint.cc:577
22 | using _t = typename T::type;
| ^
0x202f59e tree_vec_elt_check_failed(int, int, char const*, int, char const*)
../../gcc/gcc/tree.c:9955
0xeda986 tree_vec_elt_check(tree_node*, int, char const*, int, char const*)
../../gcc/gcc/tree.h:3378
0xeda986 map_arguments
../../gcc/gcc/cp/constraint.cc:577
0xeda986 build_parameter_mapping
../../gcc/gcc/cp/constraint.cc:588
0xeda986 normalize_atom
../../gcc/gcc/cp/constraint.cc:608
0xeda986 normalize_expression
../../gcc/gcc/cp/constraint.cc:631
0xedaf3c normalize_logical_operation
../../gcc/gcc/cp/constraint.cc:474
0xedaabe normalize_expression
../../gcc/gcc/cp/constraint.cc:629
0xede266 more_constrained(tree_node*, tree_node*)
../../gcc/gcc/cp/constraint.cc:2143
0x1049215 more_specialized_partial_spec
../../gcc/gcc/cp/pt.c:23231
0x1049658 most_specialized_partial_spec
../../gcc/gcc/cp/pt.c:23636
0x105e564 instantiate_class_template_1
../../gcc/gcc/cp/pt.c:11106
0x105e564 instantiate_class_template(tree_node*)
../../gcc/gcc/cp/pt.c:11642
0x10e41ad complete_type(tree_node*)
../../gcc/gcc/cp/typeck.c:138
0x102e894 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:15117
0x103c292 tsubst_decl
../../gcc/gcc/cp/pt.c:13937
0x102dd77 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:14463
0x1049e82 instantiate_template_1
../../gcc/gcc/cp/pt.c:19842
0x1049e82 instantiate_template(tree_node*, tree_node*, int)
../../gcc/gcc/cp/pt.c:19898
0x102e10d instantiate_alias_template
../../gcc/gcc/cp/pt.c:19922
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
ninja: build stopped: subcommand failed.
My Boolean
tests are probably one of my most thorough, and systematically turn off exactly one feature of Boolean
(so most of the types don't actually model Boolean
). The compiler currently thinks that they do.
boolean.ii.txt (GitHub doesn't allow raw *.ii files, so I added .txt to trick it ๐).
Ubuntu 18.04
Gold 1.35
See #1.
See #1 (but change test from core/assignable.cpp
to comparison/boolean.cpp
).
root@721baa14bc58:/data/build/gcc-sutton/debug# ninja concepts.comparison.boolean
[1/2] Building CXX object test/concepts/comparison/CMakeFiles/concepts.comparison.boolean.dir/boolean.cpp.o
FAILED: test/concepts/comparison/CMakeFiles/concepts.comparison.boolean.dir/boolean.cpp.o
/opt/sutton/bin/g++-sutton -DCJDB_AUDIT_CONTRACTS -I../../../include -isystem /root/.conan/data/gsl_microsoft/20180102/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include -save-temps -g -Wall -Wextra -Wno-attributes -Wsign-promo -Woverloaded-virtual -Wnon-virtual-dtor -Wodr -Werror -fdiagnostics-color=always -Wlogical-op -fstack-protector-all -std=c++2a -fsanitize=address -fsanitize=undefined -std=c++2a -MD -MT test/concepts/comparison/CMakeFiles/concepts.comparison.boolean.dir/boolean.cpp.o -MF test/concepts/comparison/CMakeFiles/concepts.comparison.boolean.dir/boolean.cpp.o.d -o test/concepts/comparison/CMakeFiles/concepts.comparison.boolean.dir/boolean.cpp.o -c ../../../test/concepts/comparison/boolean.cpp
../../../test/concepts/comparison/boolean.cpp: In function 'int main()':
../../../test/concepts/comparison/boolean.cpp:34:18: error: static assertion failed
34 | static_assert(not Boolean<cjdb_test::explicitly_convertible_boolean>);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../test/concepts/comparison/boolean.cpp:35:18: error: static assertion failed
35 | static_assert(not Boolean<cjdb_test::bad_not_boolean>);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../test/concepts/comparison/boolean.cpp:36:18: error: static assertion failed
36 | static_assert(not Boolean<cjdb_test::bad_and_boolean1>);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../test/concepts/comparison/boolean.cpp:37:18: error: static assertion failed
37 | static_assert(not Boolean<cjdb_test::bad_and_boolean2>);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../test/concepts/comparison/boolean.cpp:38:18: error: static assertion failed
38 | static_assert(not Boolean<cjdb_test::bad_and_boolean3>);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../test/concepts/comparison/boolean.cpp:39:18: error: static assertion failed
39 | static_assert(not Boolean<cjdb_test::bad_or_boolean1>);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../test/concepts/comparison/boolean.cpp:40:18: error: static assertion failed
40 | static_assert(not Boolean<cjdb_test::bad_or_boolean2>);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../test/concepts/comparison/boolean.cpp:41:18: error: static assertion failed
41 | static_assert(not Boolean<cjdb_test::bad_or_boolean3>);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../test/concepts/comparison/boolean.cpp:42:18: error: static assertion failed
42 | static_assert(not Boolean<cjdb_test::bad_equality_boolean>);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
equalitycomparable.ii.txt (GitHub doesn't allow raw *.ii files, so I added .txt to trick it ๐).
Ubuntu 18.04
Gold 1.35
See #1.
See #1 (but change test from core/assignable.cpp
to comparison/equalitycomparable.cpp
).
root@721baa14bc58:/data/build/gcc-sutton/debug# ninja concepts.comparison.equalitycomparable
[1/2] Building CXX object test/concepts/comparison/CMakeFiles/concepts.comparison.equalitycomparable.dir/equalitycomparable.cpp.o
FAILED: test/concepts/comparison/CMakeFiles/concepts.comparison.equalitycomparable.dir/equalitycomparable.cpp.o
/opt/sutton/bin/g++-sutton -DCJDB_AUDIT_CONTRACTS -I../../../include -isystem /root/.conan/data/gsl_microsoft/20180102/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include -save-temps -g -Wall -Wextra -Wno-attributes -Wsign-promo -Woverloaded-virtual -Wnon-virtual-dtor -Wodr -Werror -fdiagnostics-color=always -Wlogical-op -fstack-protector-all -std=c++2a -fsanitize=address -fsanitize=undefined -std=c++2a -MD -MT test/concepts/comparison/CMakeFiles/concepts.comparison.equalitycomparable.dir/equalitycomparable.cpp.o -MF test/concepts/comparison/CMakeFiles/concepts.comparison.equalitycomparable.dir/equalitycomparable.cpp.o.d -o test/concepts/comparison/CMakeFiles/concepts.comparison.equalitycomparable.dir/equalitycomparable.cpp.o -c ../../../test/concepts/comparison/equalitycomparable.cpp
../../../test/concepts/comparison/equalitycomparable.cpp: In function 'constexpr void check_EqualityComparable()':
../../../test/concepts/comparison/equalitycomparable.cpp:37:18: error: static assertion failed
37 | static_assert(not EqualityComparable<cjdb_test::not_equality_comparable3>);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../../include/cjdb/detail/type_traits/type_traits.hpp:19,
from ../../../include/cjdb/detail/concepts/core/convertibleto.hpp:19,
from ../../../include/cjdb/detail/concepts/comparison/boolean.hpp:19,
from ../../../include/cjdb/detail/concepts/comparison/equalitycomparable.hpp:19,
from ../../../test/concepts/comparison/equalitycomparable.cpp:16:
../../../include/cjdb/detail/type_traits/expose_type.hpp: In substitution of 'template<class T> requires requires{typename T::type;} using _t = typename T::type [with T = cjdb::common_type<const std::vector<int, std::allocator<int> >&, const int&>]':
../../../include/cjdb/detail/type_traits/common_type.hpp:56:48: required by substitution of 'template<class ... T> using common_type_t = cjdb::_t<cjdb::common_type<T ...> > [with T = {const std::vector<int, std::allocator<int> >&, const int&}]'
../../../include/cjdb/detail/type_traits/common_reference.hpp:43:7: required from 'struct cjdb::detail_common_reference::common_reference4<const std::vector<int>&, const int&>'
../../../include/cjdb/detail/type_traits/common_reference.hpp:62:14: required from 'struct cjdb::detail_common_reference::common_reference3<const std::vector<int>&, const int&>'
../../../include/cjdb/detail/type_traits/common_reference.hpp:118:14: required from 'struct cjdb::detail_common_reference::common_reference2<const std::vector<int>&, const int&>'
../../../include/cjdb/detail/type_traits/common_reference.hpp:179:11: required from 'struct cjdb::common_reference<const std::vector<int, std::allocator<int> >&, const int&>'
../../../include/cjdb/detail/concepts/core/commonreference.hpp:43:7: required from here
../../../include/cjdb/detail/type_traits/expose_type.hpp:22:31: internal compiler error: tree check: accessed elt 2 of tree_vec with 1 elts in map_arguments, at cp/constraint.cc:577
22 | using _t = typename T::type;
| ^
0x202f59e tree_vec_elt_check_failed(int, int, char const*, int, char const*)
../../gcc/gcc/tree.c:9955
0xeda986 tree_vec_elt_check(tree_node*, int, char const*, int, char const*)
../../gcc/gcc/tree.h:3378
0xeda986 map_arguments
../../gcc/gcc/cp/constraint.cc:577
0xeda986 build_parameter_mapping
../../gcc/gcc/cp/constraint.cc:588
0xeda986 normalize_atom
../../gcc/gcc/cp/constraint.cc:608
0xeda986 normalize_expression
../../gcc/gcc/cp/constraint.cc:631
0xedaf3c normalize_logical_operation
../../gcc/gcc/cp/constraint.cc:474
0xedaabe normalize_expression
../../gcc/gcc/cp/constraint.cc:629
0xede266 more_constrained(tree_node*, tree_node*)
../../gcc/gcc/cp/constraint.cc:2143
0x1049215 more_specialized_partial_spec
../../gcc/gcc/cp/pt.c:23231
0x1049658 most_specialized_partial_spec
../../gcc/gcc/cp/pt.c:23636
0x105e564 instantiate_class_template_1
../../gcc/gcc/cp/pt.c:11106
0x105e564 instantiate_class_template(tree_node*)
../../gcc/gcc/cp/pt.c:11642
0x10e41ad complete_type(tree_node*)
../../gcc/gcc/cp/typeck.c:138
0x102e894 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:15117
0x103c292 tsubst_decl
../../gcc/gcc/cp/pt.c:13937
0x102dd77 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:14463
0x1049e82 instantiate_template_1
../../gcc/gcc/cp/pt.c:19842
0x1049e82 instantiate_template(tree_node*, tree_node*, int)
../../gcc/gcc/cp/pt.c:19898
0x102e10d instantiate_alias_template
../../gcc/gcc/cp/pt.c:19922
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
ninja: build stopped: subcommand failed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.