mirror of
https://github.com/catchorg/Catch2.git
synced 2025-02-02 05:33:30 +01:00
WIP: unreachable?
This commit is contained in:
parent
506276c592
commit
6146a104b8
17
src/catch2/internal/catch_unreachable.cpp
Normal file
17
src/catch2/internal/catch_unreachable.cpp
Normal file
@ -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 <catch2/internal/catch_unreachable.hpp>
|
||||||
|
|
||||||
|
namespace Catch {
|
||||||
|
namespace Detail {
|
||||||
|
|
||||||
|
void unreachable(){}
|
||||||
|
|
||||||
|
}
|
||||||
|
} // end namespace Catch
|
21
src/catch2/internal/catch_unreachable.hpp
Normal file
21
src/catch2/internal/catch_unreachable.hpp
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user