You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
454 B

3 months ago
  1. # MODERN_CXX
  2. # ----------
  3. # Check whether the C++ compiler supports enough of C++11.
  4. AC_DEFUN([MODERN_CXX],
  5. [AC_CACHE_CHECK([whether enough of C++11 is supported],
  6. [ac_cv_have_modern_cxx],
  7. [AC_LANG_PUSH([C++])
  8. AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
  9. class Myclass { explicit operator bool() const { return true; } };
  10. int main() {
  11. void *p = nullptr;
  12. }]])], [ac_cv_have_modern_cxx=yes], [ac_cv_have_modern_cxx=no])
  13. AC_LANG_POP([C++])])dnl
  14. ])# MODERN_CXX