Dear mrtrix,
The following compile error occurs on Ubuntu 16.04. I guess the newer g++ is a bit more stringent about template syntax. If I manage to resolve this I will post the modifications to the code.
If you manage to resolve first, thanks in advance.
Nick
ERROR: ( 48/317) [CC] release/src/dwi/sdeconv/constrained.o
g++ -c -std=c++11 -pthread -fPIC -march=native -DMRTRIX_WORD64 -isystem /usr/include/eigen3 -Wall -O2 -DNDEBUG -Isrc -Icmd -I./lib -Icmd -isystem /usr/include/eigen3 src/dwi/sdeconv/constrained.cpp -o release/src/dwi/sdeconv/constrained.o
failed with output
In file included from ./lib/cmdline_option.h:28:0,
from ./lib/app.h:28,
from src/dwi/sdeconv/constrained.h:19,
from src/dwi/sdeconv/constrained.cpp:15:
./lib/mrtrix.h: In instantiation of std::__cxx11::string MR::str(const T&, int) [with T = Eigen::Transpose<Eigen::Matrix<double, -1, 1> >; std::__cxx11::string = std::__cxx11::basic_string<char>]:
src/dwi/sdeconv/constrained.h:98:15: required from here
./lib/mrtrix.h:79:34: error: ambiguous template instantiation for struct MR::max_digits<Eigen::Transpose<Eigen::Matrix<double, -1, 1> >, int>
else if (max_digits<T>::value())
^
./lib/mrtrix.h:65:12: note: candidates are: template<class X> struct MR::max_digits<X, typename std::enable_if<std::is_fundamental<typename X::Scalar>::value, int>::type> [with X = Eigen::Transpose<Eigen::Matrix<double, -1, 1> >]
struct max_digits<X, typename std::enable_if<std::is_fundamental<typename X::Scalar>::value, int>::type> {
^
./lib/mrtrix.h:70:12: note: template<class X> struct MR::max_digits<X, typename std::enable_if<std::is_fundamental<typename X::value_type>::value, int>::type> [with X = Eigen::Transpose<Eigen::Matrix<double, -1, 1> >]
struct max_digits<X, typename std::enable_if<std::is_fundamental<typename X::value_type>::value, int>::type> {
^
./lib/mrtrix.h:79:34: error: incomplete type MR::max_digits<Eigen::Transpose<Eigen::Matrix<double, -1, 1> >, int> used in nested name specifier
else if (max_digits<T>::value())
^
./lib/mrtrix.h:80:47: error: incomplete type MR::max_digits<Eigen::Transpose<Eigen::Matrix<double, -1, 1> >, int> used in nested name specifier
stream.precision (max_digits<T>::value());
^