C++ Logo

std-proposals

Advanced search

Re: std::as

From: Thiago Macieira <thiago_at_[hidden]>
Date: Mon, 26 Oct 2020 20:32:07 -0700
On Monday, 26 October 2020 07:03:21 PDT Dusan Jovanovic (DBJ) via Std-
Proposals wrote:
> [[noreturn]]
> inline void unreachable() {}

This gives you a warning that a noreturn function does return in 3 out of the
4 major compilers: https://gcc.godbolt.org/z/h7sq5r

Two of them don't optimise on the hint either.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering

Received on 2020-10-26 22:32:12