diff options
-rw-r--r-- | external/boost/clang-cl.patch.0 | 4 | ||||
-rw-r--r-- | external/boost/msvc2017.patch.0 | 8 | ||||
-rw-r--r-- | include/o3tl/string_view.hxx | 11 | ||||
-rw-r--r-- | include/rtl/stringutils.hxx | 13 | ||||
-rw-r--r-- | include/vcl/vclptr.hxx | 6 |
5 files changed, 8 insertions, 34 deletions
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; |