From 725ab60620f60115f1d7099d5446ee0a7da19436 Mon Sep 17 00:00:00 2001 From: Marco Agnese <m.agnese13@imperial.ac.uk> Date: Mon, 1 Feb 2016 14:53:57 +0000 Subject: [PATCH] [cleanup] Remove usage of Dune::Conversion<T1,T2>::exists and remove test for it --- dune/common/test/CMakeLists.txt | 2 -- dune/common/test/Makefile.am | 1 - dune/common/test/conversiontest.cc | 16 ---------------- dune/common/typetraits.hh | 2 +- 4 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 dune/common/test/conversiontest.cc diff --git a/dune/common/test/CMakeLists.txt b/dune/common/test/CMakeLists.txt index 95c4964b7..e8a111f62 100644 --- a/dune/common/test/CMakeLists.txt +++ b/dune/common/test/CMakeLists.txt @@ -38,8 +38,6 @@ dune_add_test(SOURCES classnametest.cc dune_add_test(SOURCES concept.cc LINK_LIBRARIES dunecommon) -dune_add_test(SOURCES conversiontest.cc) - dune_add_test(SOURCES diagonalmatrixtest.cc LINK_LIBRARIES dunecommon) diff --git a/dune/common/test/Makefile.am b/dune/common/test/Makefile.am index f8d822793..4690da4e0 100644 --- a/dune/common/test/Makefile.am +++ b/dune/common/test/Makefile.am @@ -8,7 +8,6 @@ TESTPROGS = \ calloncetest \ check_fvector_size \ classnametest \ - conversiontest \ diagonalmatrixtest \ dynmatrixtest \ dynvectortest \ diff --git a/dune/common/test/conversiontest.cc b/dune/common/test/conversiontest.cc deleted file mode 100644 index b87b4b00e..000000000 --- a/dune/common/test/conversiontest.cc +++ /dev/null @@ -1,16 +0,0 @@ -// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- -// vi: set et ts=4 sw=2 sts=2: -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <iostream> -#include <dune/common/typetraits.hh> - -int main () -{ - std :: cout << "Conversion from int to double exists? " - << Dune::Conversion< int, double > :: exists << std :: endl; - - return 0; -} diff --git a/dune/common/typetraits.hh b/dune/common/typetraits.hh index ff4bace32..00fb4460a 100644 --- a/dune/common/typetraits.hh +++ b/dune/common/typetraits.hh @@ -131,7 +131,7 @@ namespace Dune * @brief True if either a conversion from T1 to T2 or vice versa * exists. */ - value = Conversion<T1,T2>::exists || Conversion<T2,T1>::exists + value = std::is_convertible<T1,T2>::value || std::is_convertible<T2,T1>::value }; }; -- GitLab