Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Roqc/plugins/ltac/   (Rocq Prover Version 9.1.0©)  Datei vom 15.8.2025 mit Größe 2 kB image not shown  

Quelle  check_libc++.m4   Sprache: Shell

 

dnl Checks whether we need to pass -std=libc++ to CXXFLAGS. Sadly this is needed on OS X \
dnl which for some insane reason defaults to an ancient stdlibc++ :(
dnl To check for this, we try to use std::forward from <utility>

AC_DEFUN([CHECK_LIBCXX], [

  AC_LANG_PUSH(C++)

  AC_MSG_CHECKING([for whether we need -stdlib=libc++])

  AC_COMPILE_IFELSE([
    AC_LANG_PROGRAM([[
      #include <utility>
    ]], [[
      int x = 23;
      int y = std::forward<int>(x);
      return x == y ? 0 : 1;
    ]])
  ], [
    AC_MSG_RESULT([no])
  ], [
    CXXFLAGS="$CXXFLAGS -stdlib=libc++"
    LDFLAGS="$LDFLAGS -stdlib=libc++"

    AC_COMPILE_IFELSE([
      AC_LANG_PROGRAM([[
        #include <utility>
      ]], [[
        int x = 23;
        int y = std::forward<int>(x);
        return x == y ? 0 : 1;
      ]])
    ], [
      AC_MSG_RESULT([yes])
    ], [
      AC_MSG_FAILURE([std::forward in <utility> is not available or seems unusable.])
    ])
  ])

  AC_LANG_POP(C++)
])

Messung
CHZG
8309371

¤ Dauer der Verarbeitung: 0.4 Sekunden  (vorverarbeitet am  2026-11-23) ¤

*© Formatika GbR, Deutschland