File staticwarning.h
File List > code_source > templat > include > TempLat > util > staticwarning.h
Go to the documentation of this file
#ifndef TEMPLAT_UTIL_STATICWARNING_H
#define TEMPLAT_UTIL_STATICWARNING_H
/* This file is part of TempLat, available at https://cosmolattice.github.io/templat .
Copyright 2021-2026 The TempLat authors, see AUTHORS.md.
Released under the MIT license, see LICENSE.md. */
// File info: Main contributor(s): Wessel Valkenburg, Year: 2019
namespace TempLat
{
template <bool condition> struct warn_if {
};
template <> struct [[deprecated]] warn_if<false> {
constexpr warn_if() = default;
};
#define static_warn(x, ...) ((void)warn_if<x>())
// int main() {
// static_warn(false, "This is bad");
// }
class StaticWarning
{
};
} // namespace TempLat
#endif