modern_cxx.m4 454 B

12345678910111213141516
  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