C++ Logo


Advanced search

Subject: Re: [EXTERNAL] Macro for <coroutine>
From: Barry Revzin (barry.revzin_at_[hidden])
Date: 2020-01-15 18:20:10

On Wed, Jan 15, 2020 at 6:14 PM Casey Carter <cartec69_at_[hidden]> wrote:

> I suppose I'm saying "it would be nice to have these two distinct
> feature-test macros, but it may be too late now since __cpp_coroutines has
> an established history."
> On Wed, Jan 15, 2020 at 4:13 PM Casey Carter <cartec69_at_[hidden]> wrote:
>> As a rule, it's useful to have distinct macros to indicate compiler and
>> library support of a feature that has both core language and library
>> surface. Standard libraries can then provide the library support / define
>> the library macro only when the necessary compiler support is present. If
>> the feature is unusable without library support, e.g., coroutines, users
>> check only the library macro.
How established? Just #include <coroutine> fails on latest gcc, clang
w/libc++, and the latest msvc on godbolt - unless there are extra flags I
need to pass in to get this to work on any of them:

SG10 list run by sg10-owner@lists.isocpp.org