diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-10-12 16:07:13 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-10-12 17:52:29 +0200 |
commit | b9f34146be786f3f40625e285a87111a01b874d9 (patch) | |
tree | 550fc3322eab055bf9b3adf1d82a8866af745265 | |
parent | b36963c0a6a09f70ca6d8d607dd3249a3496497d (diff) |
HAVE_CXX11_FINAL is required on all supported toolchains
Change-Id: I85ed86fdd8b11863c96b7a6c3ba76d77dbecf192
-rw-r--r-- | config_host/config_global.h.in | 1 | ||||
-rw-r--r-- | configure.ac | 65 | ||||
-rw-r--r-- | include/sal/types.h | 4 |
3 files changed, 2 insertions, 68 deletions
diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in index bbebc3efb41b..bd099674a341 100644 --- a/config_host/config_global.h.in +++ b/config_host/config_global.h.in @@ -12,7 +12,6 @@ Any change in this header will cause a rebuild of almost everything. #ifndef CONFIG_GLOBAL_H #define CONFIG_GLOBAL_H -#define HAVE_CXX11_FINAL 0 #define HAVE_CXX11_PERFECT_FORWARDING 0 #define HAVE_CXX11_CONSTEXPR 0 #define HAVE_CXX14_CONSTEXPR 0 diff --git a/configure.ac b/configure.ac index 20d292192c0a..49bc0fc63497 100644 --- a/configure.ac +++ b/configure.ac @@ -6191,71 +6191,6 @@ CXXFLAGS=$save_CXXFLAGS AC_SUBST(CXXFLAGS_CXX11) -dnl ================================== -dnl Check for C++11 "final" support -dnl ================================== - -AC_MSG_CHECKING([whether $CXX supports C++11 "final" syntax]) -save_CXXFLAGS=$CXXFLAGS -CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11" -AC_LANG_PUSH([C++]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -// First check that this correct program that uses "final" compiles -struct A final -{ -}; - -struct B -{ - virtual void test(); -}; - -struct C : B -{ - void test() final; -}; -]])],[have_final=yes],[]) - -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -// Then check that the "final" works as expected, -// that this program fails to compile -struct A final -{ -}; - -struct B : A -{ -}; -]])],[],[final_class_works=yes]) - -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -// Also this should fail to compile -struct B -{ - virtual void test(); -}; - -struct C : B -{ - void test() final; -}; - -struct D : C -{ - void test(); -}; -]])],[],[final_method_works=yes]) -AC_LANG_POP([C++]) - -CXXFLAGS=$save_CXXFLAGS - -if test "$have_final" = yes -a "$final_class_works" = yes -a "$final_method_works" = yes; then - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_CXX11_FINAL]) -else - AC_MSG_RESULT([no]) -fi - dnl =================================================================== dnl Check for C++11 perfect forwarding support dnl =================================================================== diff --git a/include/sal/types.h b/include/sal/types.h index 498a154f1f9f..3f999fc15e4e 100644 --- a/include/sal/types.h +++ b/include/sal/types.h @@ -419,11 +419,11 @@ namespace css = ::com::sun::star; /** C++11 "final" feature. - With HAVE_CXX11_FINAL, mark a class as non-derivable or a method as non-overridable. + For LIBO_INTERNAL_ONLY, mark a class as non-derivable or a method as non-overridable. @since LibreOffice 4.1 */ -#if HAVE_CXX11_FINAL +#if defined LIBO_INTERNAL_ONLY #define SAL_FINAL final #else #define SAL_FINAL |