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 <[email protected]> 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. > > On Tue, Jan 14, 2020 at 5:45 PM Barry Revzin via SG10 < > [email protected]> wrote: > >> I'm not sure, just thought I'd ask. >> >> Barry >> >> On Wed, Jan 15, 2020, 1:28 AM Gor Nishanov <[email protected]> wrote: >> >>> Correct. You cannot define coroutine types, like a task or generator >>> without including <coroutine> header. >>> >>> What would be the purpose of the __cpp_lib_coroutines? >>> How do you envision it is going to be used? >>> ------------------------------ >>> *From:* Barry Revzin <[email protected]> >>> *Sent:* Monday, January 13, 2020 9:07 PM >>> *To:* [email protected] <[email protected]> >>> *Cc:* [email protected] <[email protected]>; Gor Nishanov <[email protected]> >>> *Subject:* [EXTERNAL] Macro for <coroutine> >>> >>> Hi SG10, >>> >>> We currently have the feature test macro __cpp_coroutines, but we have >>> no macro for the library machinery in <coroutine>. I'm not super familiar >>> with coroutines, but it seems like this works a lot like <=> and <compare> >>> where you need the library bit to do anything? >>> >>> Should we then change the language macro to __cpp_impl_coroutines and >>> introduce a new library macro __cpp_lib_coroutines, that users check for? >>> >>> Barry >>> >> -- >> SG10 mailing list >> [email protected] >> https://lists.isocpp.org/mailman/listinfo.cgi/sg10 >> >
-- SG10 mailing list [email protected] https://lists.isocpp.org/mailman/listinfo.cgi/sg10
