/usr/include/vigra/separableconvolution.hxx:1413:13: error: ISO C++17 does not
allow dynamic exception specifications
/usr/include/vigra/stdconvolution.hxx:796:13: error: ISO C++17 does not allow
dynamic exception specifications
For those two errors I propose the first patch (c++17conf, in
include/vigra): The original code had conditional compilation in place:
all non Microsoft compilers got a pre-C++11 and C++17-forbidden
construct, and Microsoft Visual C++ 2014 and up got a C++11-introduced
and C++17-conformant construct. I removed the condition and left only
the latter - this means you need at least GCC 4.8.1 to compile this (or
MSC 2014/201).
Then I found another syntax error in Python code - Python 3.10 requires
parentheses around multiple except-clauses (pythonexcept, in vigranumpy).
With those two patches it compiles, but then 22 tests fail, all with the
same error in C++ template syntax I am not familiar with. They all fail
because of a single discrepancy between Python and C++ representation of
the constructArrayFromAxistags function:
Boost.Python.ArgumentError: Python argument types in
vigra.vigranumpycore.constructArrayFromAxistags(type, tuple,
numpy.dtype[float32], AxisTags, bool)
did not match C++ signature:
constructArrayFromAxistags(boost::python::api::object, vigra::ArrayVector<long,
std::allocator<long> >, NPY_TYPES, vigra::AxisTags, bool)
Maybe someone can figure out what's wrong there.
Greetings
Heinz Repp
diff -Naur a/separableconvolution.hxx b/separableconvolution.hxx
--- a/separableconvolution.hxx 2021-12-14 12:47:58.561112628 +0100
+++ b/separableconvolution.hxx 2021-12-14 12:41:47.490153379 +0100
@@ -1409,11 +1409,7 @@
{}
~InitProxy()
-#ifndef _MSC_VER
- throw(PreconditionViolation)
-#elif _MSC_VER >= 1900
noexcept(false)
-#endif
{
vigra_precondition(count_ == 1 || count_ == sum_,
"Kernel1D::initExplicitly(): "
diff -Naur a/stdconvolution.hxx b/stdconvolution.hxx
--- a/stdconvolution.hxx 2021-12-14 12:47:58.561112628 +0100
+++ b/stdconvolution.hxx 2021-12-14 12:43:12.728503532 +0100
@@ -792,11 +792,7 @@
{}
~InitProxy()
-#ifndef _MSC_VER
- throw(PreconditionViolation)
-#elif _MSC_VER >= 1900
noexcept(false)
-#endif
{
vigra_precondition(count_ == 1 || count_ == sum_,
"Kernel2D::initExplicitly(): "
diff -Naur a/conf.py.cmake2.in b/conf.py.cmake2.in
--- a/conf.py.cmake2.in 2021-12-14 12:38:10.000000000 +0100
+++ b/conf.py.cmake2.in 2021-12-14 14:13:42.030342506 +0100
@@ -23,7 +23,7 @@
def _getargspec_workaround(*args, **kw):
try:
return _original_getargspec(*args, **kw)
- except TypeError, e:
+ except (TypeError, e):
if str(e).startswith('arg is not a Python function'):
return inspect.ArgSpec([], None, None, None)
else:
diff -Naur a/conf.py.in b/conf.py.in
--- a/conf.py.in 2021-12-14 12:38:10.000000000 +0100
+++ b/conf.py.in 2021-12-14 14:14:07.576442837 +0100
@@ -22,7 +22,7 @@
def _getargspec_workaround(*args, **kw):
try:
return _original_getargspec(*args, **kw)
- except TypeError, e:
+ except (TypeError, e):
if str(e).startswith('arg is not a Python function'):
return inspect.ArgSpec([], None, None, None)
else: