In file included from test.cpp:3:0:
/usr/include/c++/7/tuple: In instantiation of ‘std::tuple<_T1, _T2>& std::tuple<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) [with _U1 = std::shared_ptr<odil::DataSet>; _U2 = std::shared_ptr<odil::DataSet>; _T1 = odil::DataSet&; _T2 = odil::DataSet&]’:
test.cpp:13:64: required from here
/usr/include/c++/7/tuple:1252:25: error: no match for ‘operator=’ (operand types are ‘odil::DataSet’ and ‘std::shared_ptr<odil::DataSet>’)
this->_M_head(*this) = std::forward<_U1>(__in.first);
In file included from test.cpp:5:0:
/opt/odil/install/include/odil/DataSet.h:41:15: note: candidate: odil::DataSet& odil::DataSet::operator=(const odil::DataSet&)
DataSet & operator=(DataSet const &) =default;
^~~~~~~~
/opt/odil/install/include/odil/DataSet.h:41:15: note: no known conversion for argument 1 from ‘std::shared_ptr<odil::DataSet>’ to ‘const odil::DataSet&’
/opt/odil/install/include/odil/DataSet.h:42:15: note: candidate: odil::DataSet& odil::DataSet::operator=(odil::DataSet&&)
DataSet & operator=(DataSet &&) =default;
^~~~~~~~
/opt/odil/install/include/odil/DataSet.h:42:15: note: no known conversion for argument 1 from ‘std::shared_ptr<odil::DataSet>’ to ‘odil::DataSet&&’
In file included from test.cpp:3:0:
/usr/include/c++/7/tuple:1253:40: error: no match for ‘operator=’ (operand types are ‘odil::DataSet’ and ‘std::shared_ptr<odil::DataSet>’)
this->_M_tail(*this)._M_head(*this) = std::forward<_U2>(__in.second);
In file included from test.cpp:5:0:
/opt/odil/install/include/odil/DataSet.h:41:15: note: candidate: odil::DataSet& odil::DataSet::operator=(const odil::DataSet&)
DataSet & operator=(DataSet const &) =default;
^~~~~~~~
/opt/odil/install/include/odil/DataSet.h:41:15: note: no known conversion for argument 1 from ‘std::shared_ptr<odil::DataSet>’ to ‘const odil::DataSet&’
/opt/odil/install/include/odil/DataSet.h:42:15: note: candidate: odil::DataSet& odil::DataSet::operator=(odil::DataSet&&)
DataSet & operator=(DataSet &&) =default;
^~~~~~~~
/opt/odil/install/include/odil/DataSet.h:42:15: note: no known conversion for argument 1 from ‘std::shared_ptr<odil::DataSet>’ to ‘odil::DataSet&&’
I am trying to compile the second snippet in https://odil.readthedocs.io/en/latest/developer/cpp/io.html, but I get a compilation error: