Skip to content

Commit 99bdcfe

Browse files
improve error message
improve error message for `GetNComponents` if not specialized for the given type
1 parent c3ab4b0 commit 99bdcfe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/libPMacc/include/traits/GetNComponents.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ namespace traits
3535
* \return \p ::value as public with number of components (uint32_t)
3636
*/
3737
template<typename T_Type, bool T_IsFundamental = boost::is_fundamental<T_Type>::value>
38-
struct GetNComponents;
38+
struct GetNComponents
39+
{
40+
PMACC_CASSERT_MSG_TYPE( __GetNComponents_is_not_defined_for_this_type, T_Type, false );
41+
static constexpr uint32_t value = 0;
42+
};
3943

4044
/** return value=1 for al fundamental c++ types
4145
*/

0 commit comments

Comments
 (0)