diff --git a/include/alpaka/mem/Visibility.hpp b/include/alpaka/mem/Visibility.hpp index db32232f42b8..90f941457125 100644 --- a/include/alpaka/mem/Visibility.hpp +++ b/include/alpaka/mem/Visibility.hpp @@ -111,12 +111,13 @@ namespace alpaka typename alpaka::trait::MemVisibility::type, typename alpaka::trait::MemVisibility::type>::value; } - - return alpaka::meta::Contains< - typename alpaka::trait::MemVisibility::type, - typename alpaka::trait::MemVisibility::type>::value; - - // ALPAKA_UNREACHABLE({}); + else + { + return alpaka::meta::Contains< + typename alpaka::trait::MemVisibility::type, + typename alpaka::trait::MemVisibility::type>::value; + } + ALPAKA_UNREACHABLE({}); } template