Commit 43dc4ccf authored by Paul's avatar Paul
Browse files

Add fixes for cppcheck

parent 97d5b3ca
...@@ -106,6 +106,8 @@ rocm_enable_cppcheck( ...@@ -106,6 +106,8 @@ rocm_enable_cppcheck(
${CMAKE_CURRENT_SOURCE_DIR}/src/include ${CMAKE_CURRENT_SOURCE_DIR}/src/include
${CMAKE_CURRENT_SOURCE_DIR}/src/targets/cpu/include ${CMAKE_CURRENT_SOURCE_DIR}/src/targets/cpu/include
${CMAKE_CURRENT_SOURCE_DIR}/src/targets/miopen/include ${CMAKE_CURRENT_SOURCE_DIR}/src/targets/miopen/include
DEFINE
CPPCHECK=1
) )
add_subdirectory(src) add_subdirectory(src)
......
...@@ -6,11 +6,15 @@ ...@@ -6,11 +6,15 @@
namespace rtg { namespace rtg {
template <bool... Bs> template <bool... Bs>
struct and_ : std::is_same<and_<Bs...>, and_<(Bs || true)...>> struct and_ : std::is_same<and_<Bs...>, and_<(Bs || true)...>> // NOLINT
{ {
}; };
#ifdef CPPCHECK
#define RTG_REQUIRES(...) class=void
#else
#define RTG_REQUIRES(...) class = typename std::enable_if<and_<__VA_ARGS__, true>{}>::type #define RTG_REQUIRES(...) class = typename std::enable_if<and_<__VA_ARGS__, true>{}>::type
#endif
} // namespace rtg } // namespace rtg
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment