Kaydet (Commit) 66ef8ca2 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

HAVE_CPP_INLINE_VARIABLES is always true now

...but for safety, leave the configure.ac check in for some longer.

Also remove now-redundant SAL_INLINE_VARIABLE again (which was
LIBO_INTERNAL_ONLY).

Change-Id: Id049e0cb84b4f97f5859f1b16b867b39b448dec0
Reviewed-on: https://gerrit.libreoffice.org/64772
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 7ffdd830
......@@ -27,9 +27,6 @@ Any change in this header will cause a rebuild of almost everything.
/* Guaranteed copy elision (C++17), __cpp_guaranteed_copy_elision (C++2a): */
#define HAVE_CPP_GUARANTEED_COPY_ELISION 0
/* Inline variables (C++17), __cpp_inline_variables (C++2a): */
#define HAVE_CPP_INLINE_VARIABLES 0
/* Fix for <http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1579> "Return by converting
move constructor": */
#define HAVE_CXX_CWG1579_FIX 0
......
......@@ -12474,7 +12474,8 @@ if test "$build_os" = "cygwin"; then
AC_SUBST(ILIB)
fi
AC_MSG_CHECKING([whether $CXX supports inline variables])
dnl This check can eventually be removed completely (e.g., after libreoffice-6-3 branch off):
AC_MSG_CHECKING([that $CXX supports inline variables])
AC_LANG_PUSH([C++])
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
......@@ -12490,10 +12491,8 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
struct T { static constexpr S s{}; };
S const * f() { return &T::s; }
#endif
]])], [
AC_DEFINE([HAVE_CPP_INLINE_VARIABLES],[1])
AC_MSG_RESULT([yes])
], [AC_MSG_RESULT([no])])
]])],
AC_MSG_RESULT([yes]), AC_MSG_ERROR([$CXX lacks required inline variable support]))
CXXFLAGS=$save_CXXFLAGS
if test "$build_os" = cygwin; then
LIB=$save_LIB
......
......@@ -677,20 +677,6 @@ template< typename T1, typename T2 > inline T1 static_int_cast(T2 n) {
#endif
/// @endcond
/// @cond INTERNAL
/** Inline variables, where supported.
@since LibreOffice 6.2
*/
#if defined LIBO_INTERNAL_ONLY
#if HAVE_CPP_INLINE_VARIABLES
#define SAL_INLINE_VARIABLE inline
#else
#define SAL_INLINE_VARIABLE
#endif
#endif
/// @endcond
#endif // INCLUDED_SAL_TYPES_H
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -41,7 +41,6 @@
#include "reflcnst.hxx"
#include "keyimpl.hxx"
#include <config_global.h>
#include <osl/thread.h>
#include <rtl/alloc.h>
#include <rtl/ustring.hxx>
......@@ -421,10 +420,6 @@ void dumpType(typereg::Reader const & reader, OString const & indent) {
}
#if !HAVE_CPP_INLINE_VARIABLES
constexpr OUStringLiteral ORegistry::ROOT;
#endif
ORegistry::ORegistry()
: m_refCount(1)
, m_readOnly(false)
......
......@@ -192,11 +192,6 @@ struct ScShapeDataLess
}
};
#if !HAVE_CPP_INLINE_VARIABLES
constexpr OUStringLiteral ScShapeDataLess::gsLayerId;
constexpr OUStringLiteral ScShapeDataLess::gsZOrder;
#endif
struct DeselectShape
{
void operator() (const ScAccessibleShapeData* pAccShapeData) const
......
This diff is collapsed.
......@@ -80,15 +80,6 @@ using namespace ::svx;
namespace svxform
{
#if !HAVE_CPP_INLINE_VARIABLES
constexpr OUStringLiteral ReplaceString::m_sDoc_API;
constexpr OUStringLiteral ReplaceString::m_sInstance_API;
constexpr OUStringLiteral ReplaceString::m_sNone_API;
constexpr OUStringLiteral MethodString::m_sPost_API;
constexpr OUStringLiteral MethodString::m_sPut_API;
constexpr OUStringLiteral MethodString::m_sGet_API;
#endif
// properties of instance
#define PN_INSTANCE_MODEL "Instance"
#define PN_INSTANCE_ID "ID"
......
......@@ -20,7 +20,6 @@
#include <memory>
#include <stdlib.h>
#include <config_global.h>
#include <svx/svxids.hrc>
#include <i18nlangtag/languagetag.hxx>
#include <svtools/ctrltool.hxx>
......@@ -359,10 +358,6 @@ void SvxCSS1BorderInfo::SetBorderLine( SvxBoxItemLine nLine, SvxBoxItem &rBoxIte
rBoxItem.SetLine( &aBorderLine, nLine );
}
#if !HAVE_CPP_INLINE_VARIABLES
constexpr sal_uInt16 SvxCSS1PropertyInfo::UNSET_BORDER_DISTANCE;
#endif
SvxCSS1PropertyInfo::SvxCSS1PropertyInfo()
{
Clear();
......
......@@ -23,7 +23,6 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/text/XTextTable.hpp>
#include <com/sun/star/table/XCellRange.hpp>
#include <config_global.h>
#include <o3tl/numeric.hxx>
#include <o3tl/make_unique.hxx>
#include <o3tl/safeint.hxx>
......@@ -1227,10 +1226,6 @@ public:
}
};
#if !HAVE_CPP_INLINE_VARIABLES
constexpr sal_Int32 SwXMLTableContext::MAX_WIDTH;
#endif
const SwXMLTableCell_Impl *SwXMLTableContext::GetCell( sal_uInt32 nRow,
sal_uInt32 nCol ) const
{
......
......@@ -74,11 +74,6 @@ namespace
class theOptionsDlgOptions_ImplMutex : public rtl::Static<osl::Mutex, theOptionsDlgOptions_ImplMutex>{};
}
#if !HAVE_CPP_INLINE_VARIABLES
constexpr OUStringLiteral SvtOptionsDlgOptions_Impl::g_sPathDelimiter;
#endif
::osl::Mutex & SvtOptionsDlgOptions_Impl::getInitMutex()
{
return theOptionsDlgOptions_ImplMutex::get();
......
......@@ -399,10 +399,6 @@ public:
}
};
#if !HAVE_CPP_INLINE_VARIABLES
constexpr sal_Int32 GraphicImport_Impl::nFillColor;
#endif
GraphicImport::GraphicImport(uno::Reference<uno::XComponentContext> const& xComponentContext,
uno::Reference<lang::XMultiServiceFactory> const& xTextFactory,
DomainMapper& rDMapper,
......
......@@ -49,10 +49,6 @@ private:
Property m_aColorProp;
};
#if !HAVE_CPP_INLINE_VARIABLES
constexpr OUStringLiteral lcl_ColorPropertySetInfo::g_aColorPropName;
#endif
lcl_ColorPropertySetInfo::lcl_ColorPropertySetInfo() :
m_aColorProp( g_aColorPropName, -1,
cppu::UnoType<sal_Int32>::get(), 0)
......@@ -83,10 +79,6 @@ namespace xmloff
namespace chart
{
#if !HAVE_CPP_INLINE_VARIABLES
constexpr OUStringLiteral ColorPropertySet::g_aColorPropName;
#endif
ColorPropertySet::ColorPropertySet( sal_Int32 nColor ) :
m_nColor( nColor ),
m_nDefaultColor( 0x0099ccff ) // blue 8
......
......@@ -271,10 +271,6 @@ public:
OUString maCategoriesRange;
};
#if !HAVE_CPP_INLINE_VARIABLES
constexpr OUStringLiteral SchXMLExportHelper_Impl::gsTableName;
#endif
namespace
{
......
......@@ -241,21 +241,6 @@ public:
static constexpr OUStringLiteral gsAnimPath = "AnimationPath";
};
#if !HAVE_CPP_INLINE_VARIABLES
constexpr OUStringLiteral AnimExpImpl::gsDimColor;
constexpr OUStringLiteral AnimExpImpl::gsDimHide;
constexpr OUStringLiteral AnimExpImpl::gsDimPrev;
constexpr OUStringLiteral AnimExpImpl::gsEffect;
constexpr OUStringLiteral AnimExpImpl::gsPlayFull;
constexpr OUStringLiteral AnimExpImpl::gsPresOrder;
constexpr OUStringLiteral AnimExpImpl::gsSound;
constexpr OUStringLiteral AnimExpImpl::gsSoundOn;
constexpr OUStringLiteral AnimExpImpl::gsSpeed;
constexpr OUStringLiteral AnimExpImpl::gsTextEffect;
constexpr OUStringLiteral AnimExpImpl::gsIsAnimation;
constexpr OUStringLiteral AnimExpImpl::gsAnimPath;
#endif
XMLAnimationsExporter::XMLAnimationsExporter( XMLShapeExport* pShapeExp )
: mpImpl( new AnimExpImpl )
{
......
......@@ -335,21 +335,6 @@ public:
static constexpr OUStringLiteral gsIsAnimation = "IsAnimation";
};
#if !HAVE_CPP_INLINE_VARIABLES
constexpr OUStringLiteral AnimImpImpl::gsDimColor;
constexpr OUStringLiteral AnimImpImpl::gsDimHide;
constexpr OUStringLiteral AnimImpImpl::gsDimPrev;
constexpr OUStringLiteral AnimImpImpl::gsEffect;
constexpr OUStringLiteral AnimImpImpl::gsPlayFull;
constexpr OUStringLiteral AnimImpImpl::gsSound;
constexpr OUStringLiteral AnimImpImpl::gsSoundOn;
constexpr OUStringLiteral AnimImpImpl::gsSpeed;
constexpr OUStringLiteral AnimImpImpl::gsTextEffect;
constexpr OUStringLiteral AnimImpImpl::gsPresShapeService;
constexpr OUStringLiteral AnimImpImpl::gsAnimPath;
constexpr OUStringLiteral AnimImpImpl::gsIsAnimation;
#endif
enum XMLActionKind
{
XMLE_SHOW,
......
......@@ -288,11 +288,6 @@ SERVICE( XMLDrawMetaImportOasis, "com.sun.star.comp.Draw.XMLOasisMetaImporter",
SERVICE( XMLImpressSettingsImportOasis, "com.sun.star.comp.Impress.XMLOasisSettingsImporter", "XMLImpressSettingsImportOasis", false, SvXMLImportFlags::SETTINGS )
SERVICE( XMLDrawSettingsImportOasis, "com.sun.star.comp.Draw.XMLOasisSettingsImporter", "XMLImpressSettingsImportOasis", true, SvXMLImportFlags::SETTINGS )
#if !HAVE_CPP_INLINE_VARIABLES
constexpr OUStringLiteral SdXMLImport::gsPageLayouts;
constexpr OUStringLiteral SdXMLImport::gsPreview;
#endif
SdXMLImport::SdXMLImport(
const css::uno::Reference< css::uno::XComponentContext >& xContext,
OUString const & implementationName,
......
......@@ -37,23 +37,6 @@ using ::com::sun::star::beans::XPropertySetInfo;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any;
#if !HAVE_CPP_INLINE_VARIABLES
constexpr OUStringLiteral XMLIndexMarkExport::gsLevel;
constexpr OUStringLiteral XMLIndexMarkExport::gsUserIndexName;
constexpr OUStringLiteral XMLIndexMarkExport::gsPrimaryKey;
constexpr OUStringLiteral XMLIndexMarkExport::gsSecondaryKey;
constexpr OUStringLiteral XMLIndexMarkExport::gsDocumentIndexMark;
constexpr OUStringLiteral XMLIndexMarkExport::gsIsStart;
constexpr OUStringLiteral XMLIndexMarkExport::gsIsCollapsed;
constexpr OUStringLiteral XMLIndexMarkExport::gsAlternativeText;
constexpr OUStringLiteral XMLIndexMarkExport::gsTextReading;
constexpr OUStringLiteral XMLIndexMarkExport::gsPrimaryKeyReading;
constexpr OUStringLiteral XMLIndexMarkExport::gsSecondaryKeyReading;
constexpr OUStringLiteral XMLIndexMarkExport::gsMainEntry;
#endif
XMLIndexMarkExport::XMLIndexMarkExport(
SvXMLExport& rExp)
: rExport(rExp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment