Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this allows all module implementation units to use a single definition without worrying about using different definitions in different units. without this change, clang-18 and libstdc++ shipped by GCC-13 fails to build the tree like: ``` FAILED: src/CMakeFiles/seastar-module.dir/core/memory.cc.o /home/kefu/.local/bin/clang++ -DFMT_SHARED -DSEASTAR_API_LEVEL=7 -DSEASTAR_COROUTINES_ENABLED -DSEASTAR_MODULE -DSEASTAR_SCHEDULING_GROUPS_COUNT=16 -DSEASTAR_SSTRING -Dseastar_module_EXPORTS -I/home/kefu/dev/seastar/include -I/home/kefu/d ev/seastar/build/debug/gen/include -I/home/kefu/dev/seastar/src -g -std=c++23 -fPIC -U_FORTIFY_SOURCE -Wno-include-angled-in-module-purview -MD -MT src/CMakeFiles/seastar-module.dir/core/memory.cc.o -MF src/CMakeFiles/seastar-module.dir/c ore/memory.cc.o.d @src/CMakeFiles/seastar-module.dir/core/memory.cc.o.modmap -o src/CMakeFiles/seastar-module.dir/core/memory.cc.o -c /home/kefu/dev/seastar/src/core/memory.cc In module 'seastar' imported from /home/kefu/dev/seastar/src/core/memory.cc:111: /usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/unordered_set.h:1827:5: error: 'std::operator==' has different definitions in different modules; definition in module 'seastar' first difference is function body 1826 | inline bool | ~~~~~~~~~~~ 1827 | operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1828 | const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1829 | { return __x._M_h._M_equal(__y._M_h); } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/unordered_set.h:1827:5: note: but in '' found a different body 1826 | inline bool | ~~~~~~~~~~~ 1827 | operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1828 | const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1829 | { return __x._M_h._M_equal(__y._M_h); } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In module 'seastar' imported from /home/kefu/dev/seastar/src/core/memory.cc:111: /usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/unordered_set.h:1813:5: error: 'std::operator==' has different definitions in different modules; definition in module 'seastar' first difference is function body 1812 | inline bool | ~~~~~~~~~~~ 1813 | operator==(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1814 | const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1815 | { return __x._M_h._M_equal(__y._M_h); } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
- Loading branch information