feature/ use std::is_convertible istead of Dune::Conversion
Merge request reports
Activity
mentioned in merge request !27 (closed)
Added 10 commits:
- 85ba8f3a...f1f21006 - 7 commits from branch
master
- e3fffbf7 - use std::is_convertible istead of Dune::Conversion
- fc392240 - [cleanup] Remove usage of Dune::Conversion<T1,T2>::exists and remove test for it
- be56d04e - add deprecation warnings
Toggle commit list- 85ba8f3a...f1f21006 - 7 commits from branch
Hi @pipping :) Since you have done the transition to the standard type_traits may you please take a look at this merge request? This should fix the issues which I mentioned at the end of !27 (closed).
Moreover, since
Conversion
will have only one usefulenum
it would make sense to deprecate the whole class and create a new simple struct like thistemplate<class T1, class T2> struct IsConversionTwoWay { enum { value = std::is_convertible<T1,T2>::value && std::is_convertible<T2,T1>::value}; };
which is closer to the standard.
Edited by Marco Agnese@marco.agnese: That looks good to me for the most part. I'm not sure if conversiontest.cc shouldn't maybe be kept around until
Conversion
is not just deprecated but removed.I'm not sure about
IsTwoWayConversion
. If this is only used in two or three places in Dune, it might not even be necessary to provide a shortcut at all.The fact is that the test only check the
exist enum
which is a simple "forward" ofstd::is_convertible
so in practice doesn't test anything.Edited by Marco AgneseAdded 9 commits:
- be56d04e...f7c01419 - 5 commits from branch
master
- 68e8bcea - use std::is_convertible istead of Dune::Conversion
- 725ab606 - [cleanup] Remove usage of Dune::Conversion<T1,T2>::exists and remove test for it
- f7b0fede - add deprecation warnings
- e4411d9b - [cleanup] Fix fallout from changing to C++11's is_convertible
Toggle commit list- be56d04e...f7c01419 - 5 commits from branch
mentioned in commit f40d8e51
mentioned in commit f8b4a51d
mentioned in merge request !45 (merged)
mentioned in commit ac6ad235
Mentioned in commit f40d8e51
Mentioned in commit f8b4a51d
Mentioned in commit ac6ad235