From ee69c7a4b7ef46bfbdf806f3b2a9243e46eebc9b Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Thu, 22 Feb 2018 11:34:08 -0500 Subject: [PATCH] Remove VS2013 workarounds from VTK-m. --- CMake/VTKmMacros.cmake | 6 --- README.md | 2 +- docs/CodingConventions.md | 3 +- vtkm/ListTag.h | 4 +- vtkm/cont/ArrayHandleSwizzle.h | 11 ++--- vtkm/cont/ArrayHandleTransform.h | 8 ---- vtkm/cont/Error.h | 4 +- vtkm/cont/arg/ControlSignatureTagBase.h | 2 +- vtkm/cont/arg/TypeCheckTagExecObject.h | 2 +- .../internal/DeviceAdapterAlgorithmSerial.h | 2 +- vtkm/cont/tbb/internal/ParallelSortTBB.h | 2 +- vtkm/filter/Gradient.hxx | 4 +- vtkm/internal/Configure.h.in | 13 +----- vtkm/internal/ExportMacros.h | 10 ----- vtkm/internal/FunctionInterface.h | 6 +-- vtkm/internal/FunctionInterfaceDetailPre.h | 6 +-- vtkm/internal/FunctionInterfaceDetailPre.h.in | 6 +-- vtkm/internal/ListTagDetail.h | 42 ++++--------------- vtkm/internal/brigand.hpp | 38 ++--------------- vtkm/io/reader/VTKDataSetReaderBase.h | 4 +- vtkm/rendering/AxisAnnotation3D.h | 3 -- vtkm/testing/Testing.h | 2 +- vtkm/testing/UnitTestListTag.cxx | 6 +-- vtkm/testing/UnitTestMatrix.cxx | 2 +- vtkm/worklet/WorkletPointNeighborhood.h | 2 +- vtkm/worklet/gradient/GradientOutput.h | 28 ------------- vtkm/worklet/internal/DispatcherBase.h | 2 +- vtkm/worklet/splatkernels/Gaussian.h | 2 +- 28 files changed, 48 insertions(+), 174 deletions(-) diff --git a/CMake/VTKmMacros.cmake b/CMake/VTKmMacros.cmake index 7fd148734..60e6b15fc 100644 --- a/CMake/VTKmMacros.cmake +++ b/CMake/VTKmMacros.cmake @@ -86,12 +86,6 @@ function(vtkm_setup_msvc_properties target ) # removed when doing header test builds. target_compile_options(${target} PRIVATE -wd4702 -wd4505) - # In VS2013 the C4127 warning has a bug in the implementation and - # generates false positive warnings for lots of template code - if(MSVC_VERSION LESS 1900) - target_compile_options(${target} PRIVATE -wd4127 ) - endif() - endfunction(vtkm_setup_msvc_properties) # vtkm_target_name() diff --git a/README.md b/README.md index 460cc6ff1..801c40e85 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ VTK-m Requires: + GCC 4.8+ + Clang 3.3+ + XCode 5.0+ - + MSVC 2013+ + + MSVC 2015+ + [CMake](http://www.cmake.org/download/) + CMake 3.3+ (for any build) + CMake 3.9+ (for CUDA build) diff --git a/docs/CodingConventions.md b/docs/CodingConventions.md index 60106b1f3..a9f55fd5b 100644 --- a/docs/CodingConventions.md +++ b/docs/CodingConventions.md @@ -168,8 +168,7 @@ class ExposedClass; namespace references are preferred). + All code must be valid by the C++11 specifications. It must also - compile correctly with Microsoft Visual Studio 2013, which implements a - subset of the C++11 standard. + compile with Microsoft Visual Studio 2015. + New code must include regression tests that will run on the dashboards. Generally a new class will have an associated "UnitTest" that will test diff --git a/vtkm/ListTag.h b/vtkm/ListTag.h index 691e27c2a..46ef653a0 100644 --- a/vtkm/ListTag.h +++ b/vtkm/ListTag.h @@ -36,7 +36,7 @@ namespace internal template struct ListTagCheck : std::is_base_of { - static VTKM_CONSTEXPR bool Valid = std::is_base_of::value; + static constexpr bool Valid = std::is_base_of::value; }; } // namespace internal @@ -111,7 +111,7 @@ template struct ListContains { VTKM_IS_LIST_TAG(ListTag); - static VTKM_CONSTEXPR bool value = detail::ListContainsImpl::value; + static constexpr bool value = detail::ListContainsImpl::value; }; } // namespace vtkm diff --git a/vtkm/cont/ArrayHandleSwizzle.h b/vtkm/cont/ArrayHandleSwizzle.h index 77bb490fc..785e3dd62 100644 --- a/vtkm/cont/ArrayHandleSwizzle.h +++ b/vtkm/cont/ArrayHandleSwizzle.h @@ -87,7 +87,7 @@ struct ArrayHandleSwizzleTraits /// A std::array containing the ComponentMap for runtime querying. using RuntimeComponentMapType = std::array; - static VTKM_CONSTEXPR RuntimeComponentMapType GenerateRuntimeComponentMap() + static constexpr RuntimeComponentMapType GenerateRuntimeComponentMap() { return RuntimeComponentMapType{ { ComponentMap... } }; } @@ -124,7 +124,7 @@ private: template struct GetImpl { - VTKM_CONSTEXPR vtkm::IdComponent operator()() const { return OutputIndex == 0 ? Head : -1; } + constexpr vtkm::IdComponent operator()() const { return OutputIndex == 0 ? Head : -1; } }; // Recursive case: @@ -133,17 +133,14 @@ private: { using Next = GetImpl; - VTKM_CONSTEXPR vtkm::IdComponent operator()() const - { - return OutputIndex == 0 ? Head : Next()(); - } + constexpr vtkm::IdComponent operator()() const { return OutputIndex == 0 ? Head : Next()(); } }; public: /// Get the component from ComponentMap at the specified index as a /// compile-time constant: template - static VTKM_CONSTEXPR vtkm::IdComponent Get() + static constexpr vtkm::IdComponent Get() { return GetImpl()(); } diff --git a/vtkm/cont/ArrayHandleTransform.h b/vtkm/cont/ArrayHandleTransform.h index 624e8f428..7cafbc0c9 100644 --- a/vtkm/cont/ArrayHandleTransform.h +++ b/vtkm/cont/ArrayHandleTransform.h @@ -183,15 +183,7 @@ template struct VTKM_ALWAYS_EXPORT StorageTagTransform { -#if defined(VTKM_MSVC) && (_MSC_VER == 1800) // workaround for VS2013 -private: - using ArrayHandleValueType = typename ArrayHandleType::ValueType; - -public: - using ValueType = decltype(FunctorType{}(ArrayHandleValueType{})); -#else using ValueType = decltype(FunctorType{}(typename ArrayHandleType::ValueType{})); -#endif }; template diff --git a/vtkm/cont/Error.h b/vtkm/cont/Error.h index 4a036a76e..afe90d2c9 100644 --- a/vtkm/cont/Error.h +++ b/vtkm/cont/Error.h @@ -27,7 +27,7 @@ #include #include -#include // For VTKM_NOEXCEPT +#include namespace vtkm { @@ -55,7 +55,7 @@ public: #endif // For std::exception compatibility: - const char* what() const VTKM_NOEXCEPT override { return this->Message.c_str(); } + const char* what() const noexcept override { return this->Message.c_str(); } protected: Error() {} diff --git a/vtkm/cont/arg/ControlSignatureTagBase.h b/vtkm/cont/arg/ControlSignatureTagBase.h index 4dc4104cb..3d0357957 100644 --- a/vtkm/cont/arg/ControlSignatureTagBase.h +++ b/vtkm/cont/arg/ControlSignatureTagBase.h @@ -53,7 +53,7 @@ namespace internal template struct ControlSignatureTagCheck { - static VTKM_CONSTEXPR bool Valid = + static constexpr bool Valid = std::is_base_of::value; }; diff --git a/vtkm/cont/arg/TypeCheckTagExecObject.h b/vtkm/cont/arg/TypeCheckTagExecObject.h index 58fc73656..5acb583d6 100644 --- a/vtkm/cont/arg/TypeCheckTagExecObject.h +++ b/vtkm/cont/arg/TypeCheckTagExecObject.h @@ -46,7 +46,7 @@ struct TypeCheckTagExecObject template struct TypeCheck { - static VTKM_CONSTEXPR bool value = std::is_base_of::value; + static constexpr bool value = std::is_base_of::value; }; } } diff --git a/vtkm/cont/serial/internal/DeviceAdapterAlgorithmSerial.h b/vtkm/cont/serial/internal/DeviceAdapterAlgorithmSerial.h index efb616ccc..87454ee02 100644 --- a/vtkm/cont/serial/internal/DeviceAdapterAlgorithmSerial.h +++ b/vtkm/cont/serial/internal/DeviceAdapterAlgorithmSerial.h @@ -433,7 +433,7 @@ public: const BinaryCompare& binary_compare) { internal::WrappedBinaryOperator wrappedCompare(binary_compare); - VTKM_CONSTEXPR bool larger_than_64bits = sizeof(U) > sizeof(vtkm::Int64); + constexpr bool larger_than_64bits = sizeof(U) > sizeof(vtkm::Int64); if (larger_than_64bits) { /// More efficient sort: diff --git a/vtkm/cont/tbb/internal/ParallelSortTBB.h b/vtkm/cont/tbb/internal/ParallelSortTBB.h index 13100bfdb..5835e4382 100644 --- a/vtkm/cont/tbb/internal/ParallelSortTBB.h +++ b/vtkm/cont/tbb/internal/ParallelSortTBB.h @@ -195,7 +195,7 @@ void parallel_sort_bykey(vtkm::cont::ArrayHandle& keys, PSortTag) { using KeyType = vtkm::cont::ArrayHandle; - VTKM_CONSTEXPR bool larger_than_64bits = sizeof(U) > sizeof(vtkm::Int64); + constexpr bool larger_than_64bits = sizeof(U) > sizeof(vtkm::Int64); if (larger_than_64bits) { /// More efficient sort: diff --git a/vtkm/filter/Gradient.hxx b/vtkm/filter/Gradient.hxx index 61554838a..d07c67a46 100644 --- a/vtkm/filter/Gradient.hxx +++ b/vtkm/filter/Gradient.hxx @@ -129,8 +129,8 @@ inline vtkm::filter::Result Gradient::DoExecute( transpose_3x3(outArray, adapter); } - VTKM_CONSTEXPR bool isVector = std::is_same::HasMultipleComponents, - vtkm::VecTraitsTagMultipleComponents>::value; + constexpr bool isVector = std::is_same::HasMultipleComponents, + vtkm::VecTraitsTagMultipleComponents>::value; vtkm::cont::Field::AssociationEnum fieldAssociation(this->ComputePointGradient ? vtkm::cont::Field::ASSOC_POINTS diff --git a/vtkm/internal/Configure.h.in b/vtkm/internal/Configure.h.in index 5ad3e4a4f..b591fc6bd 100644 --- a/vtkm/internal/Configure.h.in +++ b/vtkm/internal/Configure.h.in @@ -272,7 +272,7 @@ #cmakedefine VTKM_ENABLE_MPI #if __cplusplus >= 201103L || \ - ( defined(VTKM_MSVC) && _MSC_VER >= 1800 ) || \ + ( defined(VTKM_MSVC) && _MSC_VER >= 1900 ) || \ ( defined(VTKM_ICC) && defined(__INTEL_CXX11_MODE__) ) #define VTKM_HAVE_CXX_11 #else @@ -340,17 +340,6 @@ // #pragma warning(disable:4251) -// MSVC 2013 and earlier only: -#if _MSC_VER <= 1800 -// Generates numerous warnings that implicit constructors can't -// be constructed. This is understood and we don't care. -#pragma warning(disable:4510) - -// Generates numerous warnings that implicit assignment operators can't -// be constructed. This is understood and we don't care. -#pragma warning(disable:4512) -#endif // MSVC <= 2013 - #endif #endif //vtkm_internal_Configure_h diff --git a/vtkm/internal/ExportMacros.h b/vtkm/internal/ExportMacros.h index 36bc3c343..993d5478f 100644 --- a/vtkm/internal/ExportMacros.h +++ b/vtkm/internal/ExportMacros.h @@ -77,16 +77,6 @@ #define VTKM_NEVER_EXPORT __attribute__((visibility("hidden"))) #endif -// constexpr support was added to VisualStudio 2015 and above. So this makes -// sure when that we gracefully fall back to just const when using 2013 -#if defined(VTKM_MSVC) && _MSC_VER < 1900 -#define VTKM_CONSTEXPR const -#define VTKM_NOEXCEPT -#else -#define VTKM_CONSTEXPR constexpr -#define VTKM_NOEXCEPT noexcept -#endif - // Clang will warn about weak vtables (-Wweak-vtables) on exception classes, // but there's no good way to eliminate them in this case because MSVC (See // http://stackoverflow.com/questions/24511376). These macros will silence the diff --git a/vtkm/internal/FunctionInterface.h b/vtkm/internal/FunctionInterface.h index 5565a656c..c92054d77 100644 --- a/vtkm/internal/FunctionInterface.h +++ b/vtkm/internal/FunctionInterface.h @@ -389,7 +389,7 @@ public: { this->Result = src.GetReturnValueSafe(); - VTKM_CONSTEXPR vtkm::UInt16 minArity = (ARITY < FunctionInterface::ARITY) + constexpr vtkm::UInt16 minArity = (ARITY < FunctionInterface::ARITY) ? ARITY : FunctionInterface::ARITY; @@ -774,8 +774,8 @@ public: using interfaceSig = typename detail::AsSigType::type; using NextInterfaceType = FunctionInterface; - static VTKM_CONSTEXPR std::size_t newArity = NextInterfaceType::ARITY; - static VTKM_CONSTEXPR std::size_t oldArity = detail::FunctionSigInfo::Arity; + static constexpr std::size_t newArity = NextInterfaceType::ARITY; + static constexpr std::size_t oldArity = detail::FunctionSigInfo::Arity; typedef std::integral_constant ShouldDoNextTransformType; NextInterfaceType nextInterface = this->NewInterface.Append(newParameter); diff --git a/vtkm/internal/FunctionInterfaceDetailPre.h b/vtkm/internal/FunctionInterfaceDetailPre.h index cbf98fee3..46051257f 100644 --- a/vtkm/internal/FunctionInterfaceDetailPre.h +++ b/vtkm/internal/FunctionInterfaceDetailPre.h @@ -50,14 +50,14 @@ template struct FunctionInterfaceReturnContainer { T Value; - static VTKM_CONSTEXPR bool VALID = true; + static constexpr bool VALID = true; }; template <> struct FunctionInterfaceReturnContainer { // Nothing to store for void return. - static VTKM_CONSTEXPR bool VALID = false; + static constexpr bool VALID = false; }; namespace detail @@ -648,7 +648,7 @@ struct FunctionSigInfo; template struct FunctionSigInfo { - static VTKM_CONSTEXPR std::size_t Arity = sizeof...(ArgTypes); + static constexpr std::size_t Arity = sizeof...(ArgTypes); using ArityType = std::integral_constant(Arity)>; using ResultType = R; diff --git a/vtkm/internal/FunctionInterfaceDetailPre.h.in b/vtkm/internal/FunctionInterfaceDetailPre.h.in index c4fc1a477..65b0d01b4 100644 --- a/vtkm/internal/FunctionInterfaceDetailPre.h.in +++ b/vtkm/internal/FunctionInterfaceDetailPre.h.in @@ -96,14 +96,14 @@ template struct FunctionInterfaceReturnContainer { T Value; - static VTKM_CONSTEXPR bool VALID = true; + static constexpr bool VALID = true; }; template <> struct FunctionInterfaceReturnContainer { // Nothing to store for void return. - static VTKM_CONSTEXPR bool VALID = false; + static constexpr bool VALID = false; }; namespace detail @@ -139,7 +139,7 @@ struct FunctionSigInfo; template struct FunctionSigInfo { - static VTKM_CONSTEXPR std::size_t Arity = sizeof...(ArgTypes); + static constexpr std::size_t Arity = sizeof...(ArgTypes); using ArityType = std::integral_constant(Arity)>; using ResultType = R; diff --git a/vtkm/internal/ListTagDetail.h b/vtkm/internal/ListTagDetail.h index da6d28f6b..cae6b80f8 100644 --- a/vtkm/internal/ListTagDetail.h +++ b/vtkm/internal/ListTagDetail.h @@ -80,35 +80,35 @@ struct ListContainsImpl; template struct ListContainsImpl { - static VTKM_CONSTEXPR bool value = false; + static constexpr bool value = false; }; //----------------------------------------------------------------------------- template struct ListContainsImpl> { - static VTKM_CONSTEXPR bool value = true; + static constexpr bool value = true; }; //----------------------------------------------------------------------------- template struct ListContainsImpl> { - static VTKM_CONSTEXPR bool value = std::is_same::value; + static constexpr bool value = std::is_same::value; }; //----------------------------------------------------------------------------- template struct ListContainsImpl> { - static VTKM_CONSTEXPR bool value = std::is_same::value || std::is_same::value; + static constexpr bool value = std::is_same::value || std::is_same::value; }; //----------------------------------------------------------------------------- template struct ListContainsImpl> { - static VTKM_CONSTEXPR bool value = + static constexpr bool value = std::is_same::value || std::is_same::value || std::is_same::value; }; @@ -116,8 +116,8 @@ struct ListContainsImpl> template struct ListContainsImpl> { - static VTKM_CONSTEXPR bool value = std::is_same::value || - std::is_same::value || std::is_same::value || std::is_same::value; + static constexpr bool value = std::is_same::value || std::is_same::value || + std::is_same::value || std::is_same::value; }; //----------------------------------------------------------------------------- @@ -126,7 +126,7 @@ struct ListContainsImpl { using find_result = brigand::find>; using size = brigand::size; - static VTKM_CONSTEXPR bool value = (size::value != 0); + static constexpr bool value = (size::value != 0); }; //----------------------------------------------------------------------------- @@ -213,30 +213,7 @@ VTKM_CONT void ListForEachImpl(Functor&& f, template struct ListCrossProductImpl { -#if defined(VTKM_MSVC) && _MSC_VER == 1800 - // This is a Cartesian product generator that is used - // when building with visual studio 2013. Visual Studio - // 2013 is unable to handle the lazy version as it can't - // deduce the correct template parameters - using type = brigand::reverse_fold< - brigand::list, - brigand::list>, - brigand::bind< - brigand::join, - brigand::bind< - brigand::transform, - brigand::_2, - brigand::defer, - brigand::defer>>>>>>>>>; -#else - // This is a lazy Cartesian product generator that is used - // when using any compiler other than visual studio 2013. + // This is a lazy Cartesian product generator. // This version was settled on as being the best default // version as all compilers including Intel handle this // implementation without issue for very large cross products @@ -250,7 +227,6 @@ struct ListCrossProductImpl brigand::defer>>>>>>>>>; -#endif }; diff --git a/vtkm/internal/brigand.hpp b/vtkm/internal/brigand.hpp index f0769e643..5e9d304a8 100644 --- a/vtkm/internal/brigand.hpp +++ b/vtkm/internal/brigand.hpp @@ -14,8 +14,6 @@ #define BRIGAND_COMP_MSVC #if _MSC_VER == 1900 #define BRIGAND_COMP_MSVC_2015 -#elif _MSC_VER == 1800 -#define BRIGAND_COMP_MSVC_2013 #endif #elif __INTEL_COMPILER #define BRIGAND_COMP_INTEL @@ -902,7 +900,7 @@ namespace detail #include namespace brigand { -#if defined(BRIGAND_COMP_MSVC_2013) || defined(BRIGAND_COMP_CUDA) || defined(BRIGAND_COMP_INTEL) +#if defined(BRIGAND_COMP_CUDA) || defined(BRIGAND_COMP_INTEL) namespace detail { template @@ -961,7 +959,7 @@ namespace brigand } namespace brigand { -#if defined(BRIGAND_COMP_MSVC_2013) || defined(BRIGAND_COMP_CUDA) || defined(BRIGAND_COMP_INTEL) +#if defined(BRIGAND_COMP_CUDA) || defined(BRIGAND_COMP_INTEL) namespace detail { template @@ -1522,9 +1520,7 @@ namespace brigand namespace detail { template struct unique_x_t -#ifdef BRIGAND_COMP_MSVC_2013 - { operator T (); }; -#elif defined(BRIGAND_COMP_GCC) +#if defined(BRIGAND_COMP_GCC) : type_ {}; #else @@ -1545,39 +1541,11 @@ namespace detail template static auto is_set(Us...) -> decltype(true_fn(static_cast(Pack())...)); static std::false_type is_set(...); -#ifdef BRIGAND_COMP_MSVC_2013 - using type = decltype(is_set(Ts()...)); -#else using type = decltype(is_set(type_()...)); -#endif }; -#ifdef BRIGAND_COMP_MSVC_2013 - template struct qrref {}; - template struct qref {}; - template struct qnoref {}; - template - struct msvc_quali_ref - { - using type = qnoref; - }; - template - struct msvc_quali_ref - { - using type = qref; - }; - template - struct msvc_quali_ref - { - using type = qrref; - }; -#endif } template -#ifdef BRIGAND_COMP_MSVC_2013 - using is_set = typename detail::is_set_impl(sizeof...(Ts))>, detail::msvc_quali_ref...>::type; -#else using is_set = typename detail::is_set_impl(sizeof...(Ts))>, Ts...>::type; -#endif } #include namespace brigand diff --git a/vtkm/io/reader/VTKDataSetReaderBase.h b/vtkm/io/reader/VTKDataSetReaderBase.h index 3d113160a..e2c68710c 100644 --- a/vtkm/io/reader/VTKDataSetReaderBase.h +++ b/vtkm/io/reader/VTKDataSetReaderBase.h @@ -186,7 +186,7 @@ vtkm::cont::DynamicArrayHandle CreateDynamicArrayHandle(const std::vector& ve case 1: { using CommonType = typename ClosestCommonType::Type; - VTKM_CONSTEXPR bool not_same = !std::is_same::value; + constexpr bool not_same = !std::is_same::value; if (not_same) { std::cerr << "Type " << vtkm::io::internal::DataTypeName::Name() @@ -209,7 +209,7 @@ vtkm::cont::DynamicArrayHandle CreateDynamicArrayHandle(const std::vector& ve using InComponentType = typename vtkm::VecTraits::ComponentType; using OutComponentType = typename ClosestFloat::Type; using CommonType = vtkm::Vec; - VTKM_CONSTEXPR bool not_same = !std::is_same::value; + constexpr bool not_same = !std::is_same::value; if (not_same) { std::cerr << "Type " << vtkm::io::internal::DataTypeName::Name() << "[" diff --git a/vtkm/rendering/AxisAnnotation3D.h b/vtkm/rendering/AxisAnnotation3D.h index 6fa953d01..c2241916d 100644 --- a/vtkm/rendering/AxisAnnotation3D.h +++ b/vtkm/rendering/AxisAnnotation3D.h @@ -23,9 +23,6 @@ #include #include -#if defined(_MSC_VER) && _MSC_VER < 1900 -#define snprintf _snprintf -#endif #include #include diff --git a/vtkm/testing/Testing.h b/vtkm/testing/Testing.h index 8b6fce7e7..56e7713ea 100644 --- a/vtkm/testing/Testing.h +++ b/vtkm/testing/Testing.h @@ -519,7 +519,7 @@ static inline VTKM_EXEC_CONT bool test_equal(bool bool1, bool bool2) template static inline VTKM_EXEC_CONT T TestValue(vtkm::Id index, T, vtkm::TypeTraitsIntegerTag) { - VTKM_CONSTEXPR bool larger_than_2bytes = sizeof(T) > 2; + constexpr bool larger_than_2bytes = sizeof(T) > 2; if (larger_than_2bytes) { return T(index * 100); diff --git a/vtkm/testing/UnitTestListTag.cxx b/vtkm/testing/UnitTestListTag.cxx index 1971d4f58..284619d17 100644 --- a/vtkm/testing/UnitTestListTag.cxx +++ b/vtkm/testing/UnitTestListTag.cxx @@ -119,7 +119,7 @@ void CheckContains(TestClass, ListTag, const std::vector& contents) //Use intersect to verify at compile time that ListTag contains TestClass using intersectWith = vtkm::ListTagBase>; using intersectResult = typename vtkm::ListTagIntersect::list; - VTKM_CONSTEXPR bool intersectContains = (brigand::size::value != 0); + constexpr bool intersectContains = (brigand::size::value != 0); bool listContains = vtkm::ListContains>::value; bool shouldContain = std::find(contents.begin(), contents.end(), N) != contents.end(); @@ -135,8 +135,8 @@ void CheckContains(TestClass, TestListTagUniversal, const std::vector&) using intersectWith = vtkm::ListTagBase>; using intersectResult = typename vtkm::ListTagIntersect::list; - VTKM_CONSTEXPR bool intersectContains = (brigand::size::value != 0); - VTKM_CONSTEXPR bool listContains = vtkm::ListContains>::value; + constexpr bool intersectContains = (brigand::size::value != 0); + constexpr bool listContains = vtkm::ListContains>::value; VTKM_TEST_ASSERT(intersectContains == listContains, "ListTagIntersect check failed."); } diff --git a/vtkm/testing/UnitTestMatrix.cxx b/vtkm/testing/UnitTestMatrix.cxx index 249157fe4..21feff5de 100644 --- a/vtkm/testing/UnitTestMatrix.cxx +++ b/vtkm/testing/UnitTestMatrix.cxx @@ -324,7 +324,7 @@ template void SingularMatrix(vtkm::Matrix& singularMatrix) { FOR_ROW_COL(singularMatrix) { singularMatrix(row, col) = static_cast(row + col); } - VTKM_CONSTEXPR bool larger_than_1 = Size > 1; + constexpr bool larger_than_1 = Size > 1; if (larger_than_1) { vtkm::MatrixSetRow(singularMatrix, 0, vtkm::MatrixGetRow(singularMatrix, (Size + 1) / 2)); diff --git a/vtkm/worklet/WorkletPointNeighborhood.h b/vtkm/worklet/WorkletPointNeighborhood.h index b82ebdbcb..07d32115d 100644 --- a/vtkm/worklet/WorkletPointNeighborhood.h +++ b/vtkm/worklet/WorkletPointNeighborhood.h @@ -167,7 +167,7 @@ template class WorkletPointNeighborhood : public WorkletPointNeighborhoodBase { public: - static VTKM_CONSTEXPR vtkm::IdComponent Neighborhood = Neighborhood_; + static constexpr vtkm::IdComponent Neighborhood = Neighborhood_; /// \brief A control signature tag for neighborhood input values. /// diff --git a/vtkm/worklet/gradient/GradientOutput.h b/vtkm/worklet/gradient/GradientOutput.h index ce61a8f4c..acaa66621 100644 --- a/vtkm/worklet/gradient/GradientOutput.h +++ b/vtkm/worklet/gradient/GradientOutput.h @@ -171,49 +171,21 @@ struct GradientVecOutput : public vtkm::exec::ExecutionObjectBase template struct GradientOutput : public GradientScalarOutput { -#if defined(VTKM_MSVC) && (_MSC_VER == 1800) // workaround for VS2013 - template - GradientOutput(Args&&... args) - : GradientScalarOutput::GradientScalarOutput(std::forward(args)...) - { - } -#else using GradientScalarOutput::GradientScalarOutput; -#endif }; template struct GradientOutput, DeviceAdapter> : public GradientVecOutput, DeviceAdapter> { - -#if defined(VTKM_MSVC) && (_MSC_VER == 1800) // workaround for VS2013 - template - GradientOutput(Args&&... args) - : GradientVecOutput, DeviceAdapter>::GradientVecOutput( - std::forward(args)...) - { - } -#else using GradientVecOutput, DeviceAdapter>::GradientVecOutput; -#endif }; template struct GradientOutput, DeviceAdapter> : public GradientVecOutput, DeviceAdapter> { - -#if defined(VTKM_MSVC) && (_MSC_VER == 1800) // workaround for VS2013 - template - GradientOutput(Args&&... args) - : GradientVecOutput, DeviceAdapter>::GradientVecOutput( - std::forward(args)...) - { - } -#else using GradientVecOutput, DeviceAdapter>::GradientVecOutput; -#endif }; } } // namespace vtkm::exec diff --git a/vtkm/worklet/internal/DispatcherBase.h b/vtkm/worklet/internal/DispatcherBase.h index b05df4ea1..9d2a11370 100644 --- a/vtkm/worklet/internal/DispatcherBase.h +++ b/vtkm/worklet/internal/DispatcherBase.h @@ -114,7 +114,7 @@ struct DetermineHasCorrectParameters using ControlSignatureTag = typename brigand::at_c; using TypeCheckTag = typename ControlSignatureTag::TypeCheckTag; - static VTKM_CONSTEXPR bool isCorrect = vtkm::cont::arg::TypeCheck::value; + static constexpr bool isCorrect = vtkm::cont::arg::TypeCheck::value; // If you get an error on the line below, that means that your code has called the // Invoke method on a dispatcher, and one of the arguments of the Invoke is the wrong diff --git a/vtkm/worklet/splatkernels/Gaussian.h b/vtkm/worklet/splatkernels/Gaussian.h index 03cd92f8e..a5e979d67 100644 --- a/vtkm/worklet/splatkernels/Gaussian.h +++ b/vtkm/worklet/splatkernels/Gaussian.h @@ -59,7 +59,7 @@ struct Gaussian : public KernelBase> //--------------------------------------------------------------------- // return the multiplier between smoothing length and max cutoff distance VTKM_EXEC_CONT - VTKM_CONSTEXPR double getDilationFactor() const { return 5.0; } + constexpr double getDilationFactor() const { return 5.0; } //--------------------------------------------------------------------- // compute w(h) for the given distance