BobSteagall / wg21

Various documents and code related to proposals for WG21
University of Illinois/NCSA Open Source License
65 stars 11 forks source link

Error in the converting constructor #37

Closed mpusz closed 4 years ago

mpusz commented 4 years ago

When I uncomment the following lines: https://github.com/mpusz/units/blob/master/example/linear_algebra.cpp#L132-L133 I get the following compilation error for the latest version of 0.6.0 on Conan:

[build] /home/mpusz/.conan/data/linear_algebra/0.0.1/public-conan/testing/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/linear_algebra/matrix.hpp: In instantiation of ‘constexpr std::experimental::math::matrix<ET, OT>::matrix(const std::experimental::math::matrix<ET2, OT2>&) [with ET2 = std::experimental::math::fs_matrix_engine<units::quantity<units::si::dim_length, units::si::metre, double>, 3, 3>; OT2 = std::experimental::math::matrix_operation_traits; ET = std::experimental::math::fs_matrix_engine<units::quantity<units::si::dim_length, units::si::millimetre, double>, 3, 3>; OT = std::experimental::math::matrix_operation_traits]’:
[build] ../../example/linear_algebra.cpp:132:51:   required from here
[build] /home/mpusz/.conan/data/linear_algebra/0.0.1/public-conan/testing/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/linear_algebra/matrix.hpp:167:11: error: ‘assign’ was not declared in this scope; did you mean ‘asin’?
[build]   167 |     assign(rhs);
[build]       |     ~~~~~~^~~~~
[build]       |     asin

The problem is here: https://github.com/BobSteagall/wg21/blob/la_r6/linear_algebra/code/include/linear_algebra/matrix.hpp#L167

It seems that there is no implementation of assign() in the case when ET2 and OT2 are different than ET and OT.

BobSteagall commented 4 years ago

This is a remnant of a mistake and will be removed for R7.