Re: [PATCH] PR libstdc++/79433 no #error for including headers with wrong -std

2017-09-12 Thread Jonathan Wakely
On 07/09/17 15:18 +0100, Jonathan Wakely wrote: As discussed in PR 79433, the recommended way to test for new features such as std::optional has problems. The current version of SD-6 at https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations says to simply check __has_inc

Re: [PATCH] PR libstdc++/79433 no #error for including headers with wrong -std

2017-09-07 Thread Ville Voutilainen
On 7 September 2017 at 17:18, Jonathan Wakely wrote: > Does anybody object to this change? Is getting a #error still useful, > given the existence of __has_include and __cpp_lib macros? I wholeheartedly agree with this change. And I should point out that vast amounts of optional's implementation

[PATCH] PR libstdc++/79433 no #error for including headers with wrong -std

2017-09-07 Thread Jonathan Wakely
As discussed in PR 79433, the recommended way to test for new features such as std::optional has problems. The current version of SD-6 at https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations says to simply check __has_include(optional). This test will be true even when