Skip to content

Commit

Permalink
Error out when Kokkoks_Vector.hpp is included with deprecated code di…
Browse files Browse the repository at this point in the history
…sabled
  • Loading branch information
masterleinad committed Jul 5, 2023
1 parent 990ac55 commit 91fdd34
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions containers/src/Kokkos_Vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

#include <Kokkos_Macros.hpp>

#if !defined(KOKKOS_ENABLE_DEPRECATED_CODE_4) || \
defined(KOKKOS_ENABLE_DEPRECATION_WARNINGS)
#if defined(KOKKOS_ENABLE_DEPRECATED_CODE_4)
#if defined(KOKKOS_ENABLE_DEPRECATION_WARNINGS)
namespace {
[[deprecated("Deprecated <Kokkos_Vector.hpp> header is included")]] int
emit_warning_kokkos_vector_deprecated() {
Expand All @@ -33,6 +33,9 @@ emit_warning_kokkos_vector_deprecated() {
static auto do_not_include = emit_warning_kokkos_vector_deprecated();
} // namespace
#endif
#else
#error "Deprecated <Kokkos_Vector.hpp> header is included"
#endif

#include <Kokkos_Core_fwd.hpp>
#include <Kokkos_DualView.hpp>
Expand Down

0 comments on commit 91fdd34

Please sign in to comment.