You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to compile the stored array example in the documentation. However, the compiler gave me the following error message.
In file included from /home/hankliu5/workspace/xtensor-example/xtensor-io-example/src/first_example.cpp:1:0:
/usr/local/include/xtensor-io/xfile_array.hpp: In instantiation of ‘xt::xfile_array_container<E, IOH>::reference xt::xfile_array_container<E, IOH>::operator()(Idxs ...) [with Idxs = {int, int}; E = xt::xarray_container<xt::uvector<long unsigned int, std::allocator<long unsigned int> >, (xt::layout_type)1, xt::svector<long unsigned int, 4ul, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>; IOH = xt::xio_disk_handler<xt::xio_binary_config>; xt::xfile_array_container<E, IOH>::reference = xt::xfile_value_reference<long unsigned int>]’:
/home/hankliu5/workspace/xtensor-example/xtensor-io-example/src/first_example.cpp:15:12: required from here
/usr/local/include/xtensor-io/xfile_array.hpp:539:53: error: no matching function for call to ‘xt::xfile_value_reference<long unsigned int>::xfile_value_reference(long unsigned int&, xt::xfile_dirty&)’
return reference(m_storage(idxs...), m_dirty);
^
In file included from /home/hankliu5/workspace/xtensor-example/xtensor-io-example/src/first_example.cpp:1:0:
/usr/local/include/xtensor-io/xfile_array.hpp:46:9: note: candidate: xt::xfile_value_reference<T>::xfile_value_reference(xt::xfile_value_reference<T>&&) [with T = long unsigned int]
xfile_value_reference(xfile_value_reference&&) = default;
^
/usr/local/include/xtensor-io/xfile_array.hpp:46:9: note: candidate expects 1 argument, 2 provided
/usr/local/include/xtensor-io/xfile_array.hpp:45:9: note: candidate: xt::xfile_value_reference<T>::xfile_value_reference(const xt::xfile_value_reference<T>&) [with T = long unsigned int]
xfile_value_reference(const xfile_value_reference&) = default;
^
/usr/local/include/xtensor-io/xfile_array.hpp:45:9: note: candidate expects 1 argument, 2 provided
/usr/local/include/xtensor-io/xfile_array.hpp:270:12: note: candidate: xt::xfile_value_reference<T>::xfile_value_reference(T&, xt::xfile_dirty&, bool&) [with T = long unsigned int]
inline xfile_value_reference<T>::xfile_value_reference(T& value, xfile_dirty& dirty, bool& inval
^
/usr/local/include/xtensor-io/xfile_array.hpp:270:12: note: candidate expects 3 arguments, 2 provided
In file included from /home/hankliu5/workspace/xtensor-example/xtensor-io-example/src/first_example.cpp:1:0:
/usr/local/include/xtensor-io/xfile_array.hpp: In instantiation of ‘xt::xfile_array_container<E, IOH>::reference xt::xfile_array_container<E, IOH>::operator()(Idxs ...) [with Idxs = {int}; E = xt::xarray_container<xt::uvector<long unsigned int, std::allocator<long unsigned int> >, (xt::layout_type)1, xt::svector<long unsigned int, 4ul, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>; IOH = xt::xio_disk_handler<xt::xio_binary_config>; xt::xfile_array_container<E, IOH>::reference = xt::xfile_value_reference<long unsigned int>]’:
/home/hankliu5/workspace/xtensor-example/xtensor-io-example/src/first_example.cpp:35:26: required from here
/usr/local/include/xtensor-io/xfile_array.hpp:539:53: error: no matching function for call to ‘xt::xfile_value_reference<long unsigned int>::xfile_value_reference(long unsigned int&, xt::xfile_dirty&)’
return reference(m_storage(idxs...), m_dirty);
^
In file included from /home/hankliu5/workspace/xtensor-example/xtensor-io-example/src/first_example.cpp:1:0:
/usr/local/include/xtensor-io/xfile_array.hpp:46:9: note: candidate: xt::xfile_value_reference<T>::xfile_value_reference(xt::xfile_value_reference<T>&&) [with T = long unsigned int]
xfile_value_reference(xfile_value_reference&&) = default;
^
/usr/local/include/xtensor-io/xfile_array.hpp:46:9: note: candidate expects 1 argument, 2 provided
/usr/local/include/xtensor-io/xfile_array.hpp:45:9: note: candidate: xt::xfile_value_reference<T>::xfile_value_reference(const xt::xfile_value_reference<T>&) [with T = long unsigned int]
xfile_value_reference(const xfile_value_reference&) = default;
^
/usr/local/include/xtensor-io/xfile_array.hpp:45:9: note: candidate expects 1 argument, 2 provided
/usr/local/include/xtensor-io/xfile_array.hpp:270:12: note: candidate: xt::xfile_value_reference<T>::xfile_value_reference(T&, xt::xfile_dirty&, bool&) [with T = long unsigned int]
inline xfile_value_reference<T>::xfile_value_reference(T& value, xfile_dirty& dirty, bool& inval
^
/usr/local/include/xtensor-io/xfile_array.hpp:270:12: note: candidate expects 3 arguments, 2 provided
CMakeFiles/first_example.dir/build.make:75: recipe for target 'CMakeFiles/first_example.dir/src/first_example.cpp.o' failed
make[2]: *** [CMakeFiles/first_example.dir/src/first_example.cpp.o] Error 1
CMakeFiles/Makefile2:110: recipe for target 'CMakeFiles/first_example.dir/all' failed
make[1]: *** [CMakeFiles/first_example.dir/all] Error 2
Makefile:90: recipe for target 'all' failed
make: *** [all] Error 2
After searching the source code, I found out that there is one additional parameter in xfile_value_reference's constructor, which doesn't appear in the stable branch.
I created a pull request (#163) that fixes the missing parameter and now I'm able to compile the example.
The text was updated successfully, but these errors were encountered:
Hello all,
I was trying to compile the stored array example in the documentation. However, the compiler gave me the following error message.
After searching the source code, I found out that there is one additional parameter in
xfile_value_reference
's constructor, which doesn't appear in thestable
branch.I created a pull request (#163) that fixes the missing parameter and now I'm able to compile the example.
The text was updated successfully, but these errors were encountered: