mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Replace BOOST_MPL_ASSERT with BOOST_STATIC_ASSERT
BOOST_MPL_ASSERT is causing warnings in the PGI compiler. Apparently, when BOOST_MPL_ASSERT succeeds it declares a static object with a unqiue name scoped to the file. The problem is that the PGI compiler is pretty picky about things being declared without being used, so it was emitting useless warnings about successful BOOST_MPL_ASSERTs. However, BOOST_STATIC_ASSERT does not seem to have this problem, so for the benefit of PGI change the compile-time assert method.
This commit is contained in:
parent
e182388cbe
commit
e301ba0a98
@ -28,6 +28,7 @@
|
||||
#include <vtkm/cont/DeviceAdapterAlgorithm.h>
|
||||
|
||||
VTKM_THIRDPARTY_PRE_INCLUDE
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
VTKM_THIRDPARTY_POST_INCLUDE
|
||||
|
||||
@ -94,8 +95,8 @@ struct CellSetCheck
|
||||
typedef typename boost::is_base_of<vtkm::cont::CellSet, T>::type type;
|
||||
};
|
||||
|
||||
#define VTKM_IS_CELL_SET(type) \
|
||||
BOOST_MPL_ASSERT(( ::vtkm::cont::internal::CellSetCheck<type> ))
|
||||
#define VTKM_IS_CELL_SET(T) \
|
||||
BOOST_STATIC_ASSERT(::vtkm::cont::internal::CellSetCheck<T>::type::value)
|
||||
|
||||
} // namespace internal
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <vtkm/testing/Testing.h>
|
||||
|
||||
VTKM_THIRDPARTY_PRE_INCLUDE
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
VTKM_THIRDPARTY_POST_INCLUDE
|
||||
|
||||
@ -166,17 +166,17 @@ struct TestWorkletErrorProxy : vtkm::exec::FunctorBase
|
||||
|
||||
// Check behavior of InvocationToFetch helper class.
|
||||
|
||||
BOOST_MPL_ASSERT(( boost::is_same<
|
||||
vtkm::exec::internal::detail::InvocationToFetch<InvocationType1,1>::type,
|
||||
vtkm::exec::arg::Fetch<TestFetchTagInput,vtkm::exec::arg::AspectTagDefault,InvocationType1,1> > ));
|
||||
BOOST_STATIC_ASSERT(( boost::is_same<
|
||||
vtkm::exec::internal::detail::InvocationToFetch<InvocationType1,1>::type,
|
||||
vtkm::exec::arg::Fetch<TestFetchTagInput,vtkm::exec::arg::AspectTagDefault,InvocationType1,1> >::type::value ));
|
||||
|
||||
BOOST_MPL_ASSERT(( boost::is_same<
|
||||
vtkm::exec::internal::detail::InvocationToFetch<InvocationType1,2>::type,
|
||||
vtkm::exec::arg::Fetch<TestFetchTagOutput,vtkm::exec::arg::AspectTagDefault,InvocationType1,2> > ));
|
||||
BOOST_STATIC_ASSERT(( boost::is_same<
|
||||
vtkm::exec::internal::detail::InvocationToFetch<InvocationType1,2>::type,
|
||||
vtkm::exec::arg::Fetch<TestFetchTagOutput,vtkm::exec::arg::AspectTagDefault,InvocationType1,2> >::type::value ));
|
||||
|
||||
BOOST_MPL_ASSERT(( boost::is_same<
|
||||
vtkm::exec::internal::detail::InvocationToFetch<InvocationType2,0>::type,
|
||||
vtkm::exec::arg::Fetch<TestFetchTagOutput,vtkm::exec::arg::AspectTagDefault,InvocationType2,2> > ));
|
||||
BOOST_STATIC_ASSERT(( boost::is_same<
|
||||
vtkm::exec::internal::detail::InvocationToFetch<InvocationType2,0>::type,
|
||||
vtkm::exec::arg::Fetch<TestFetchTagOutput,vtkm::exec::arg::AspectTagDefault,InvocationType2,2> >::type::value ));
|
||||
|
||||
void TestDoWorkletInvoke()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user