[Libreoffice-commits] core.git: external/boost include/o3tl include/rtl include/vcl

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Nov 30 07:25:41 UTC 2018


 external/boost/clang-cl.patch.0 |    4 ++--
 external/boost/msvc2017.patch.0 |    8 ++++----
 include/o3tl/string_view.hxx    |   11 +----------
 include/rtl/stringutils.hxx     |   13 +------------
 include/vcl/vclptr.hxx          |    6 ------
 5 files changed, 8 insertions(+), 34 deletions(-)

New commits:
commit 83102e4fa21e22ae18d2bbd19e29b1d37f50bab9
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Nov 29 13:45:27 2018 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Nov 30 08:25:13 2018 +0100

    Remove obsolete _MSC_VER checks
    
    ...after 206b8c4ae320d7d8614f21800d8f77fa29f8f5ff "On Windows, check for at
    least Visual Studio 2017 version 15.7"
    
    Change-Id: I38ee86e1649bbdc828a7e328f2dbbac0dc163c8a
    Reviewed-on: https://gerrit.libreoffice.org/64250
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/external/boost/clang-cl.patch.0 b/external/boost/clang-cl.patch.0
index 3990f27eb3f5..e563c637e2c3 100644
--- a/external/boost/clang-cl.patch.0
+++ b/external/boost/clang-cl.patch.0
@@ -5,7 +5,7 @@
  // that an Output Iterator have output_iterator_tag in its iterator_category if 
  // that iterator is not bidirectional_iterator or random_access_iterator.
 -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1600)
-+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1600) || (defined __clang__ && BOOST_WORKAROUND(_MSC_VER, >= 1600))
++#if BOOST_WORKAROUND(BOOST_MSVC, >= 1600) || defined __clang__
  struct mutable_iterator_tag
   : boost::random_access_traversal_tag, std::input_iterator_tag
  {
@@ -14,7 +14,7 @@
    // iterator support
    //
 -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1600)
-+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1600) || (defined __clang__ && BOOST_WORKAROUND(_MSC_VER, >= 1600))
++#if BOOST_WORKAROUND(BOOST_MSVC, >= 1600) || defined __clang__
    // Deal with VC 2010 output_iterator_tag requirement
    typedef array_iterator<T,T*,mpl::size_t<NumDims>,reference,
                           mutable_iterator_tag> iterator;
diff --git a/external/boost/msvc2017.patch.0 b/external/boost/msvc2017.patch.0
index 525f3c95cbab..e888fd96aba4 100644
--- a/external/boost/msvc2017.patch.0
+++ b/external/boost/msvc2017.patch.0
@@ -4,7 +4,7 @@
  // Helper types
  
      //! Base iterator.
-+#if defined _MSC_VER && !defined __clang__ && _MSC_VER >= 1914
++#if defined _MSC_VER && !defined __clang__
 +#pragma warning(push)
 +#pragma warning(disable: 4996)
 +#endif
@@ -14,7 +14,7 @@
          typename Traits::difference_type,
          typename Traits::pointer,
          typename Traits::reference> base_iterator;
-+#if defined _MSC_VER && !defined __clang__ && _MSC_VER >= 1914
++#if defined _MSC_VER && !defined __clang__
 +#pragma warning(pop)
 +#endif
  
@@ -26,12 +26,12 @@
  namespace boost
  {
  
-+#if defined _MSC_VER && !defined __clang__ && _MSC_VER >= 1914
++#if defined _MSC_VER && !defined __clang__
 +#pragma warning(push)
 +#pragma warning(disable: 4996)
 +#endif
  using std::iterator;
-+#if defined _MSC_VER && !defined __clang__ && _MSC_VER >= 1914
++#if defined _MSC_VER && !defined __clang__
 +#pragma warning(pop)
 +#endif
  
diff --git a/include/o3tl/string_view.hxx b/include/o3tl/string_view.hxx
index bdc81e8d7261..4da7fcf0bf0f 100644
--- a/include/o3tl/string_view.hxx
+++ b/include/o3tl/string_view.hxx
@@ -177,16 +177,7 @@ public:
 #if HAVE_CXX14_CONSTEXPR
     constexpr
 #endif
-    basic_string_view & operator =(basic_string_view const & other) noexcept
-#if defined _MSC_VER && _MSC_VER <= 1900 && !defined __clang__
-    {
-        data_ = other.data_;
-        size_ = other.size_;
-        return *this;
-    }
-#else
-        = default;
-#endif
+    basic_string_view & operator =(basic_string_view const & other) noexcept = default;
 
     // The various character types are handled below in the "LO specifics, to
     // make up for traits::length not necessarily being constexpr yet for
diff --git a/include/rtl/stringutils.hxx b/include/rtl/stringutils.hxx
index f7cd0ad1a47d..7e9ff1cc86fd 100644
--- a/include/rtl/stringutils.hxx
+++ b/include/rtl/stringutils.hxx
@@ -65,12 +65,7 @@ namespace rtl
 
     Instances of OUStringLiteral1 need to be const, as those literal-optimized
     functions take the literal argument by non-const lvalue reference, for
-    technical reasons.  Except with MSVC, at least up to Visual Studio 2013:
-    For one, it fails to take that const-ness into account when trying to match
-    "OUStringLiteral1_ const" against T in a "T & literal" parameter of a
-    function template.  But for another, as a language extension, it allows to
-    bind non-const temporary OUStringLiteral1_ instances to non-const lvalue
-    references, but also with a warning that thus needs to be disabled.
+    technical reasons.
 
     @since LibreOffice 5.0
 */
@@ -78,13 +73,7 @@ struct SAL_WARN_UNUSED OUStringLiteral1_ {
     constexpr OUStringLiteral1_(sal_Unicode theC): c(theC) {}
     sal_Unicode const c;
 };
-#if defined _MSC_VER && _MSC_VER <= 1900 && !defined __clang__
-    // Visual Studio 2015
-using OUStringLiteral1 = OUStringLiteral1_;
-#pragma warning(disable: 4239) // nonstandard extension used: 'argument': conversion from 'rtl::OUStringLiteral1_' to 'rtl::OUStringLiteral1_ &'
-#else
 using OUStringLiteral1 = OUStringLiteral1_ const;
-#endif
 
 /// @endcond
 #endif
diff --git a/include/vcl/vclptr.hxx b/include/vcl/vclptr.hxx
index 019f4c593c49..9e1ce33d3184 100644
--- a/include/vcl/vclptr.hxx
+++ b/include/vcl/vclptr.hxx
@@ -35,8 +35,6 @@
 #endif
 #endif
 
-#if !(defined _MSC_VER && _MSC_VER <= 1900 && !defined __clang__)
-
 namespace vcl { namespace detail {
 
 template<typename>
@@ -48,8 +46,6 @@ template<typename T> constexpr bool isIncompleteOrDerivedFromVclReferenceBase(
 
 }; }; // namespace detail, namespace vcl
 
-#endif
-
 /**
  * A thin wrapper around rtl::Reference to implement the acquire and dispose semantics we want for references to vcl::Window subclasses.
  *
@@ -60,12 +56,10 @@ template<typename T> constexpr bool isIncompleteOrDerivedFromVclReferenceBase(
 template <class reference_type>
 class VclPtr
 {
-#if !(defined _MSC_VER && _MSC_VER <= 1900 && !defined __clang__)
     static_assert(
         vcl::detail::isIncompleteOrDerivedFromVclReferenceBase<reference_type>(
             nullptr),
         "template argument type must be derived from VclReferenceBase");
-#endif
 
     ::rtl::Reference<reference_type> m_rInnerRef;
 


More information about the Libreoffice-commits mailing list