Skip to content

Commit

Permalink
WIP: unreachable?
Browse files Browse the repository at this point in the history
  • Loading branch information
horenmar committed Dec 27, 2024
1 parent 506276c commit 6146a10
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/catch2/internal/catch_unreachable.cpp
Original file line number Diff line number Diff line change
@@ -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 changes: 21 additions & 0 deletions src/catch2/internal/catch_unreachable.hpp
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6146a10

Please sign in to comment.