Cabana 0.8.0-dev
 
Loading...
Searching...
No Matches
Cabana_Utils.hpp
Go to the documentation of this file.
1/****************************************************************************
2 * Copyright (c) 2018-2022 by the Cabana authors *
3 * All rights reserved. *
4 * *
5 * This file is part of the Cabana library. Cabana is distributed under a *
6 * BSD 3-clause license. For the licensing terms see the LICENSE file in *
7 * the top-level directory. *
8 * *
9 * SPDX-License-Identifier: BSD-3-Clause *
10 ****************************************************************************/
11
16#ifndef CABANA_UTILS_HPP
17#define CABANA_UTILS_HPP
18
19#include <Cabana_Core_Config.hpp>
20
21#include <type_traits>
22
23namespace Cabana
24{
25namespace Impl
26{
28
29// Custom warning for use within static_assert.
30constexpr bool deprecated( std::false_type ) { return true; }
31
32[[deprecated( "Cabana deprecation." )]] constexpr bool
33deprecated( std::true_type )
34{
35 return true;
36}
37
38// Custom warning.
39#ifdef Cabana_DISABLE_DEPRECATION_WARNINGS
40#define CABANA_DEPRECATED
41#else
42#define CABANA_DEPRECATED [[deprecated( "Cabana deprecation." )]]
43#endif
44
46
47} // namespace Impl
48} // namespace Cabana
49
50#endif
Core: particle data structures and algorithms.
Definition Cabana_AoSoA.hpp:36