Improve formatting of the HAVE_WORKING_STD_REGEX test

Indent the test code in a nicer way and shorten it, taking advantage of
this guarantee from the C++ standard:

  If control reaches the end of main without encountering a return
  statement, the effect is that of executing return 0.

-> no need for "#include <cstdlib>" nor for "return EXIT_SUCCESS".
This commit is contained in:
Florent Rougon 2018-01-03 00:34:52 +01:00
parent ca30d6bb3d
commit 7547ad0391

View File

@ -372,7 +372,6 @@ endif()
# [3] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78905
check_cxx_source_compiles(
"#include <regex>
#include <cstdlib>
int main() {
#if __cplusplus >= 201103L && \
@ -381,7 +380,6 @@ int main() {
defined(_GLIBCXX_REGEX_DFS_QUANTIFIERS_LIMIT) || \
defined(_GLIBCXX_REGEX_STATE_LIMIT) || \
(defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE > 4))
return EXIT_SUCCESS;
#else
nullptr = void; // intentionally trigger a compilation error
#endif