Found the following significant warnings:
  /usr/include/opencv4/opencv2/core/matx.hpp:145:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/matx.hpp:146:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/matx.hpp:147:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/matx.hpp:148:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/matx.hpp:149:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/matx.hpp:155:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/matx.hpp:160:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:1200:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:1207:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:1371:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:1377:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:1384:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:1402:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:1408:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:1415:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:1431:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:1437:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2300:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2313:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2314:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2315:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2316:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2317:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2318:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2319:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2320:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2463:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2464:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2467:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2498:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2499:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2500:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2501:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2502:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2503:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2504:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2505:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2506:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2507:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2508:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2509:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2510:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2511:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2512:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2513:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:2779:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/core/mat.hpp:3016:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/features2d.hpp:1108:13: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/features2d.hpp:1168:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/features2d.hpp:1209:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
  /usr/include/opencv4/opencv2/features2d.hpp:1248:5: warning: use of the 'nodiscard' attribute is a C++17 extension [-Wc++17-attribute-extensions]
See '/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/image.textlinedetector.Rcheck/00install.out' for details.