In file included from /builddir/build/BUILD/krita-4.4.3-beta1/libs/global/kis_dom_utils.h:35, from /builddir/build/BUILD/krita-4.4.3-beta1/libs/image/KisBezierTransformMesh.cpp:138: /builddir/build/BUILD/krita-4.4.3-beta1/libs/global/krita_container_utils.h: In instantiation of 'static constexpr bool KritaUtils::is_appendable_container<T>::test(A*) [with A = boost::operators_impl::equality_comparable<KisBezierMeshDetails::BaseMeshNode>; T = boost::operators_impl::equality_comparable<KisBezierMeshDetails::BaseMeshNode>]': /builddir/build/BUILD/krita-4.4.3-beta1/libs/global/krita_container_utils.h:114:46: required from 'const bool KritaUtils::is_appendable_container<boost::operators_impl::equality_comparable<KisBezierMeshDetails::BaseMeshNode> >::value' /builddir/build/BUILD/krita-4.4.3-beta1/libs/global/kis_dom_utils.h:276:1: required by substitution of 'template<template<class ...> class Container, class T, class E, class ... Args> typename std::enable_if<KritaUtils::is_appendable_container<Container<T, Args ...> >::value, bool>::type KisDomUtils::loadValue(const QDomElement&, Container<T, Args ...>*, const E&) [with Container = boost::operators_impl::equality_comparable; T = KisBezierMeshDetails::BaseMeshNode; E = std::tuple<>; Args = {KisBezierMeshDetails::BaseMeshNode, boost::operators_impl::operators_detail::empty_base<KisBezierMeshDetails::BaseMeshNode>, boost::operators_impl::operators_detail::false_t}]' /builddir/build/BUILD/krita-4.4.3-beta1/libs/global/kis_dom_utils.h:283:23: required from 'typename std::enable_if<KritaUtils::is_appendable_container<Container<T, Args ...> >::value, bool>::type KisDomUtils::loadValue(const QDomElement&, Container<T, Args ...>*, const E&) [with Container = std::vector; T = KisBezierMeshDetails::BaseMeshNode; E = std::tuple<>; Args = {std::allocator<KisBezierMeshDetails::BaseMeshNode>}; typename std::enable_if<KritaUtils::is_appendable_container<Container<T, Args ...> >::value, bool>::type = bool]' /builddir/build/BUILD/krita-4.4.3-beta1/libs/global/kis_dom_utils.h:312:21: required from 'bool KisDomUtils::loadValue(const QDomElement&, const QString&, T*, const E&) [with T = std::vector<KisBezierMeshDetails::BaseMeshNode, std::allocator<KisBezierMeshDetails::BaseMeshNode> >; E = std::tuple<>]' /builddir/build/BUILD/krita-4.4.3-beta1/libs/image/KisBezierTransformMesh.cpp:167:54: required from here /builddir/build/BUILD/krita-4.4.3-beta1/libs/global/krita_container_utils.h:105:48: error: 'struct boost::operators_impl::equality_comparable<KisBezierMeshDetails::BaseMeshNode>' has no member named 'push_back' 105 | std::is_same<decltype(pointer->push_back(std::declval<typename T::value_type>())), void>::value ; | ~~~~~~~~~^~~~~~~~~ /builddir/build/BUILD/krita-4.4.3-beta1/libs/global/krita_container_utils.h:105:63: error: no type named 'value_type' in 'struct boost::operators_impl::equality_comparable<KisBezierMeshDetails::BaseMeshNode>' 105 | std::is_same<decltype(pointer->push_back(std::declval<typename T::value_type>())), void>::value ; | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/krita-4.4.3-beta1/libs/global/krita_container_utils.h: In instantiation of 'const bool KritaUtils::is_appendable_container<boost::operators_impl::equality_comparable<KisBezierMeshDetails::BaseMeshNode> >::value': /builddir/build/BUILD/krita-4.4.3-beta1/libs/global/kis_dom_utils.h:276:1: required by substitution of 'template<template<class ...> class Container, class T, class E, class ... Args> typename std::enable_if<KritaUtils::is_appendable_container<Container<T, Args ...> >::value, bool>::type KisDomUtils::loadValue(const QDomElement&, Container<T, Args ...>*, const E&) [with Container = boost::operators_impl::equality_comparable; T = KisBezierMeshDetails::BaseMeshNode; E = std::tuple<>; Args = {KisBezierMeshDetails::BaseMeshNode, boost::operators_impl::operators_detail::empty_base<KisBezierMeshDetails::BaseMeshNode>, boost::operators_impl::operators_detail::false_t}]' /builddir/build/BUILD/krita-4.4.3-beta1/libs/global/kis_dom_utils.h:283:23: required from 'typename std::enable_if<KritaUtils::is_appendable_container<Container<T, Args ...> >::value, bool>::type KisDomUtils::loadValue(const QDomElement&, Container<T, Args ...>*, const E&) [with Container = std::vector; T = KisBezierMeshDetails::BaseMeshNode; E = std::tuple<>; Args = {std::allocator<KisBezierMeshDetails::BaseMeshNode>}; typename std::enable_if<KritaUtils::is_appendable_container<Container<T, Args ...> >::value, bool>::type = bool]' /builddir/build/BUILD/krita-4.4.3-beta1/libs/global/kis_dom_utils.h:312:21: required from 'bool KisDomUtils::loadValue(const QDomElement&, const QString&, T*, const E&) [with T = std::vector<KisBezierMeshDetails::BaseMeshNode, std::allocator<KisBezierMeshDetails::BaseMeshNode> >; E = std::tuple<>]' /builddir/build/BUILD/krita-4.4.3-beta1/libs/image/KisBezierTransformMesh.cpp:167:54: required from here /builddir/build/BUILD/krita-4.4.3-beta1/libs/global/krita_container_utils.h:114:46: in 'constexpr' expansion of 'KritaUtils::is_appendable_container<boost::operators_impl::equality_comparable<KisBezierMeshDetails::BaseMeshNode> >::test<boost::operators_impl::equality_comparable<KisBezierMeshDetails::BaseMeshNode> >(0)' /builddir/build/BUILD/krita-4.4.3-beta1/libs/global/krita_container_utils.h:114:23: error: 'constexpr' call flows off the end of the function 114 | static const bool value = test<test_type>(nullptr); | ^~~~~ gmake[2]: *** [libs/image/CMakeFiles/kritaimage.dir/build.make:3790: libs/image/CMakeFiles/kritaimage.dir/KisBezierTransformMesh.cpp.o] Error 1
This looks a bit like an old gcc bug has returned: https://gcc.gnu.org/legacy-ml/gcc-patches/2018-01/msg01866.html
may be multiple things? fedora34 uses a newer boost-1.75, which may be relevant to: /builddir/build/BUILD/krita-4.4.3-beta1/libs/global/krita_container_utils.h:105:48: error: 'struct boost::operators_impl::equality_comparable<KisBezierMeshDetails::BaseMeshNode>' has no member named 'push_back'
oh, that might be it, too. Meh...
KritaUtils::is_appendable_container is completely broken. You need to test the pointer->push_back expression in a SFINAE context, not in the function body. This is not a GCC bug.
Maybe you meant to use typename A::value_type not typename T::value_type, but it still wouldn't work. This would be better: template<typename A, typename R = decltype(declval<A&>().push_back(std::declval<typename A::value_type>()))> static constexpr bool test(A *pointer) { return is_container<A>::value && std::is_same<R, void>::value; } You could also use std::is_void<R>::value instead of is_same.
Dmitry, can you please take a look?
Git commit 10f61f0733a728dfa49dd2c3c70deb64be9cc7a4 by Dmitry Kazakov. Committed on 09/03/2021 at 17:53. Pushed by dkazakov into branch 'krita/4.3'. Fix compilation for GCC11 SFINAE tests should happen in the functin signature, not in its body. Thanks Jonathan Wakely for the suggested fix! M +4 -6 libs/global/krita_container_utils.h https://invent.kde.org/graphics/krita/commit/10f61f0733a728dfa49dd2c3c70deb64be9cc7a4
Git commit 9c7cec0a0412a2fee681dd9c83cc3d1ad25ce042 by Dmitry Kazakov. Committed on 09/03/2021 at 17:54. Pushed by dkazakov into branch 'master'. Fix compilation for GCC11 SFINAE tests should happen in the functin signature, not in its body. Thanks Jonathan Wakely for the suggested fix! M +4 -6 libs/global/krita_container_utils.h https://invent.kde.org/graphics/krita/commit/9c7cec0a0412a2fee681dd9c83cc3d1ad25ce042
(In reply to Jonathan Wakely from comment #5) > static constexpr bool test(A *pointer) { Oh, now that 'poionter' is unused you might want to remove the name of that parameter, to avoid -Wunused-parameter warnings.
Git commit cd42aa43521a5258e5cfcdfb21b1cfe18f784be3 by Halla Rempt, on behalf of Dmitry Kazakov. Committed on 10/03/2021 at 11:51. Pushed by rempt into branch 'krita/4.4.3'. Fix compilation for GCC11 SFINAE tests should happen in the functin signature, not in its body. Thanks Jonathan Wakely for the suggested fix! (cherry picked from commit 10f61f0733a728dfa49dd2c3c70deb64be9cc7a4) M +4 -6 libs/global/krita_container_utils.h https://invent.kde.org/graphics/krita/commit/cd42aa43521a5258e5cfcdfb21b1cfe18f784be3