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:
parent
ca30d6bb3d
commit
7547ad0391
@ -372,7 +372,6 @@ endif()
|
|||||||
# [3] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78905
|
# [3] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78905
|
||||||
check_cxx_source_compiles(
|
check_cxx_source_compiles(
|
||||||
"#include <regex>
|
"#include <regex>
|
||||||
#include <cstdlib>
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
#if __cplusplus >= 201103L && \
|
#if __cplusplus >= 201103L && \
|
||||||
@ -381,7 +380,6 @@ int main() {
|
|||||||
defined(_GLIBCXX_REGEX_DFS_QUANTIFIERS_LIMIT) || \
|
defined(_GLIBCXX_REGEX_DFS_QUANTIFIERS_LIMIT) || \
|
||||||
defined(_GLIBCXX_REGEX_STATE_LIMIT) || \
|
defined(_GLIBCXX_REGEX_STATE_LIMIT) || \
|
||||||
(defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE > 4))
|
(defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE > 4))
|
||||||
return EXIT_SUCCESS;
|
|
||||||
#else
|
#else
|
||||||
nullptr = void; // intentionally trigger a compilation error
|
nullptr = void; // intentionally trigger a compilation error
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user