[Libreoffice-commits] core.git: config_host/config_global.h.in configure.ac include/o3tl include/sal include/vcl

Stephan Bergmann sbergman at redhat.com
Thu Mar 2 18:59:13 UTC 2017


 config_host/config_global.h.in   |    1 -
 configure.ac                     |    4 ++--
 include/o3tl/typed_flags_set.hxx |   22 +++++++++++-----------
 include/sal/types.h              |    2 +-
 include/vcl/vclptr.hxx           |    6 ++----
 5 files changed, 16 insertions(+), 19 deletions(-)

New commits:
commit b167466147baec95a3b123a07d648fc2589bc3c9
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Mar 2 17:43:25 2017 +0100

    Remove HAVE_CXX11_CONSTEXPR, always true now
    
    ...after 84b36c704d73362d4d86dc9e9c0efa0625958347 "Drop support for MSVC 2013".
    
    Make this a fatal configuration error for now.  The check should be removed
    completely after LO 5.4 branch-off.
    
    Change-Id: I990fd8fcb4ec1327282df4efe21640c938d3cf06
    Reviewed-on: https://gerrit.libreoffice.org/34821
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Tested-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in
index 5bb9992..a773818 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_CONSTEXPR 0
 #define HAVE_CXX14_CONSTEXPR 0
 #define HAVE_CXX11_REF_QUALIFIER 0
 #define HAVE_CXX11_UTF16_STRING_LITERAL 0
diff --git a/configure.ac b/configure.ac
index a4f0503..c56e6f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6244,8 +6244,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 AC_LANG_POP([C++])
 CXXFLAGS=$save_CXXFLAGS
 AC_MSG_RESULT([$cxx11_constexpr])
-if test "$cxx11_constexpr" = yes; then
-    AC_DEFINE([HAVE_CXX11_CONSTEXPR])
+if test "$cxx11_constexpr" = no; then
+    AC_MSG_ERROR([Your $CXX does not support 'constexpr'. This is no longer supported.])
 fi
 
 AC_MSG_CHECKING([whether $CXX supports C++14 constexpr])
diff --git a/include/o3tl/typed_flags_set.hxx b/include/o3tl/typed_flags_set.hxx
index 637fcfa..dfb196a 100644
--- a/include/o3tl/typed_flags_set.hxx
+++ b/include/o3tl/typed_flags_set.hxx
@@ -77,7 +77,7 @@ struct is_typed_flags {
             typename std::underlying_type<E>::type value):
             value_(value)
         {
-#if !HAVE_CXX11_CONSTEXPR || HAVE_CXX14_CONSTEXPR
+#if HAVE_CXX14_CONSTEXPR
             assert(detail::isNonNegative(value));
             assert(
                 static_cast<typename std::underlying_type<E>::type>(~0) == M
@@ -106,7 +106,7 @@ struct is_typed_flags {
 
 template<typename E>
 inline SAL_CONSTEXPR typename o3tl::typed_flags<E>::Wrap operator ~(E rhs) {
-#if !HAVE_CXX11_CONSTEXPR || HAVE_CXX14_CONSTEXPR
+#if HAVE_CXX14_CONSTEXPR
     assert(
         o3tl::detail::isNonNegative(
             static_cast<typename std::underlying_type<E>::type>(rhs)));
@@ -129,7 +129,7 @@ template<typename E>
 inline SAL_CONSTEXPR typename o3tl::typed_flags<E>::Wrap operator ^(
     E lhs, E rhs)
 {
-#if !HAVE_CXX11_CONSTEXPR || HAVE_CXX14_CONSTEXPR
+#if HAVE_CXX14_CONSTEXPR
     assert(
         o3tl::detail::isNonNegative(
             static_cast<typename std::underlying_type<E>::type>(lhs)));
@@ -146,7 +146,7 @@ template<typename E>
 inline SAL_CONSTEXPR typename o3tl::typed_flags<E>::Wrap operator ^(
     E lhs, typename o3tl::typed_flags<E>::Wrap rhs)
 {
-#if !HAVE_CXX11_CONSTEXPR || HAVE_CXX14_CONSTEXPR
+#if HAVE_CXX14_CONSTEXPR
     assert(
         o3tl::detail::isNonNegative(
             static_cast<typename std::underlying_type<E>::type>(lhs)));
@@ -160,7 +160,7 @@ template<typename E>
 inline SAL_CONSTEXPR typename o3tl::typed_flags<E>::Wrap operator ^(
     typename o3tl::typed_flags<E>::Wrap lhs, E rhs)
 {
-#if !HAVE_CXX11_CONSTEXPR || HAVE_CXX14_CONSTEXPR
+#if HAVE_CXX14_CONSTEXPR
     assert(
         o3tl::detail::isNonNegative(
             static_cast<typename std::underlying_type<E>::type>(rhs)));
@@ -188,7 +188,7 @@ template<typename E>
 inline SAL_CONSTEXPR typename o3tl::typed_flags<E>::Wrap operator &(
     E lhs, E rhs)
 {
-#if !HAVE_CXX11_CONSTEXPR || HAVE_CXX14_CONSTEXPR
+#if HAVE_CXX14_CONSTEXPR
     assert(
         o3tl::detail::isNonNegative(
             static_cast<typename std::underlying_type<E>::type>(lhs)));
@@ -205,7 +205,7 @@ template<typename E>
 inline SAL_CONSTEXPR typename o3tl::typed_flags<E>::Wrap operator &(
     E lhs, typename o3tl::typed_flags<E>::Wrap rhs)
 {
-#if !HAVE_CXX11_CONSTEXPR || HAVE_CXX14_CONSTEXPR
+#if HAVE_CXX14_CONSTEXPR
     assert(
         o3tl::detail::isNonNegative(
             static_cast<typename std::underlying_type<E>::type>(lhs)));
@@ -219,7 +219,7 @@ template<typename E>
 inline SAL_CONSTEXPR typename o3tl::typed_flags<E>::Wrap operator &(
     typename o3tl::typed_flags<E>::Wrap lhs, E rhs)
 {
-#if !HAVE_CXX11_CONSTEXPR || HAVE_CXX14_CONSTEXPR
+#if HAVE_CXX14_CONSTEXPR
     assert(
         o3tl::detail::isNonNegative(
             static_cast<typename std::underlying_type<E>::type>(rhs)));
@@ -245,7 +245,7 @@ typename o3tl::typed_flags<typename W::Unwrapped::Self>::Wrap operator &(
 
 template<typename E>
 inline SAL_CONSTEXPR typename o3tl::typed_flags<E>::Wrap operator |(E lhs, E rhs) {
-#if !HAVE_CXX11_CONSTEXPR || HAVE_CXX14_CONSTEXPR
+#if HAVE_CXX14_CONSTEXPR
     assert(
         o3tl::detail::isNonNegative(
             static_cast<typename std::underlying_type<E>::type>(lhs)));
@@ -262,7 +262,7 @@ template<typename E>
 inline SAL_CONSTEXPR typename o3tl::typed_flags<E>::Wrap operator |(
     E lhs, typename o3tl::typed_flags<E>::Wrap rhs)
 {
-#if !HAVE_CXX11_CONSTEXPR || HAVE_CXX14_CONSTEXPR
+#if HAVE_CXX14_CONSTEXPR
     assert(
         o3tl::detail::isNonNegative(
             static_cast<typename std::underlying_type<E>::type>(lhs)));
@@ -276,7 +276,7 @@ template<typename E>
 inline SAL_CONSTEXPR typename o3tl::typed_flags<E>::Wrap operator |(
     typename o3tl::typed_flags<E>::Wrap lhs, E rhs)
 {
-#if !HAVE_CXX11_CONSTEXPR || HAVE_CXX14_CONSTEXPR
+#if HAVE_CXX14_CONSTEXPR
     assert(
         o3tl::detail::isNonNegative(
             static_cast<typename std::underlying_type<E>::type>(rhs)));
diff --git a/include/sal/types.h b/include/sal/types.h
index 1bf6976..9da283b 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -422,7 +422,7 @@ namespace css = ::com::sun::star;
 
     @since LibreOffice 5.0
 */
-#if HAVE_CXX11_CONSTEXPR
+#if defined LIBO_INTERNAL_ONLY
 #define SAL_CONSTEXPR constexpr
 #else
 #define SAL_CONSTEXPR
diff --git a/include/vcl/vclptr.hxx b/include/vcl/vclptr.hxx
index 39e4fe9..e3e0e82 100644
--- a/include/vcl/vclptr.hxx
+++ b/include/vcl/vclptr.hxx
@@ -65,8 +65,7 @@ public:
     typedef typename C< value, void *, void >::t t;
 };
 
-#if HAVE_CXX11_CONSTEXPR \
-    && !(defined _MSC_VER && _MSC_VER <= 1900 && !defined __clang__)
+#if !(defined _MSC_VER && _MSC_VER <= 1900 && !defined __clang__)
 
 template<typename>
 constexpr bool isIncompleteOrDerivedFromVclReferenceBase(...) { return true; }
@@ -93,8 +92,7 @@ namespace detail {
 template <class reference_type>
 class VclPtr
 {
-#if HAVE_CXX11_CONSTEXPR \
-    && !(defined _MSC_VER && _MSC_VER <= 1900 && !defined __clang__)
+#if !(defined _MSC_VER && _MSC_VER <= 1900 && !defined __clang__)
     static_assert(
         vcl::detail::isIncompleteOrDerivedFromVclReferenceBase<reference_type>(
             nullptr),


More information about the Libreoffice-commits mailing list