diff --git a/src/catch2/internal/catch_unreachable.cpp b/src/catch2/internal/catch_unreachable.cpp new file mode 100644 index 0000000000..9f3af49e3a --- /dev/null +++ b/src/catch2/internal/catch_unreachable.cpp @@ -0,0 +1,17 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include + +namespace Catch { + namespace Detail { + + void unreachable(){} + + } +} // end namespace Catch diff --git a/src/catch2/internal/catch_unreachable.hpp b/src/catch2/internal/catch_unreachable.hpp new file mode 100644 index 0000000000..297b8d6d67 --- /dev/null +++ b/src/catch2/internal/catch_unreachable.hpp @@ -0,0 +1,21 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 +#ifndef CATCH_UNREACHABLE_HPP_INCLUDED +#define CATCH_UNREACHABLE_HPP_INCLUDED + +namespace Catch { + + namespace Detail { + // TODO: explain + [[noreturn]] void unreachable(); + + } + +} // end namespace Catch + +#endif // CATCH_UNREACHABLE_HPP_INCLUDED