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

HAVE_CXX_CWG1579_FIX is always true now

...(according to
<http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1579> it is fixed
in C++14), but for safety, leave the configure.ac check in for some longer.

Change-Id: Ibd2f0cac228117e35ac299e2fe74207394c900cd
Reviewed-on: https://gerrit.libreoffice.org/64773
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 66ef8ca2
......@@ -27,10 +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
/* 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
/* GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87150> "move ctor wrongly chosen in return
stmt (derived vs. base)": */
#define HAVE_GCC_BUG_87150 0
......
......@@ -6499,7 +6499,8 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
CXXFLAGS=$save_CXXFLAGS
AC_LANG_POP([C++])
AC_MSG_CHECKING([whether $CXX has a fix for CWG1579])
dnl This check can eventually be removed completely (e.g., after libreoffice-6-3 branch off):
AC_MSG_CHECKING([that $CXX has a fix for CWG1579])
AC_LANG_PUSH([C++])
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
......@@ -6511,10 +6512,8 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
std::unique_ptr<S2> s2(new S2);
return s2;
}
])], [
AC_DEFINE([HAVE_CXX_CWG1579_FIX],[1])
AC_MSG_RESULT([yes])
], [AC_MSG_RESULT([no])])
])],
AC_MSG_RESULT([yes]), AC_MSG_ERROR([$CXX lacks a required fix for CWG1579]))
CXXFLAGS=$save_CXXFLAGS
AC_LANG_POP([C++])
......
......@@ -19,7 +19,6 @@
#include <memory>
#include <config_global.h>
#include <drawinglayer/animation/animationtiming.hxx>
#include <basegfx/numeric/ftools.hxx>
#include <o3tl/make_unique.hxx>
......@@ -192,11 +191,7 @@ namespace drawinglayer
pNew->append(*i);
}
#if HAVE_CXX_CWG1579_FIX
return pNew;
#else
return std::move(pNew);
#endif
}
bool AnimationEntryList::operator==(const AnimationEntry& rCandidate) const
......@@ -289,11 +284,7 @@ namespace drawinglayer
pNew->append(*i);
}
#if HAVE_CXX_CWG1579_FIX
return pNew;
#else
return std::move(pNew);
#endif
}
bool AnimationEntryLoop::operator==(const AnimationEntry& rCandidate) const
......
......@@ -47,7 +47,6 @@
#include <vcl/dibtools.hxx>
#include <vcl/wmf.hxx>
#include <comphelper/classids.hxx>
#include <config_global.h>
#include <toolkit/helper/vclunohelper.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
......@@ -1022,11 +1021,7 @@ SdrObjectUniquePtr XclImpGroupObj::DoCreateSdrObj( XclImpDffConverter& rDffConv,
for( ::std::vector< XclImpDrawObjRef >::const_iterator aIt = maChildren.begin(), aEnd = maChildren.end(); aIt != aEnd; ++aIt )
rDffConv.ProcessObject( rObjList, **aIt );
rDffConv.Progress();
#if HAVE_CXX_CWG1579_FIX
return xSdrObj;
#else
return std::move(xSdrObj);
#endif
}
XclImpLineObj::XclImpLineObj( const XclImpRoot& rRoot ) :
......@@ -1461,11 +1456,7 @@ SdrObjectUniquePtr XclImpTextObj::DoCreateSdrObj( XclImpDffConverter& rDffConv,
xSdrObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( bAutoSize ) );
xSdrObj->SetMergedItem( makeSdrTextWordWrapItem( true ) );
rDffConv.Progress();
#if HAVE_CXX_CWG1579_FIX
return xSdrObj;
#else
return std::move(xSdrObj);
#endif
}
void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const
......
......@@ -21,7 +21,6 @@
#include <com/sun/star/i18n/UnicodeType.hpp>
#include <com/sun/star/i18n/KParseTokens.hpp>
#include <com/sun/star/i18n/KParseType.hpp>
#include <config_global.h>
#include <i18nlangtag/lang.h>
#include <tools/lineend.hxx>
#include <unotools/configmgr.hxx>
......@@ -1016,11 +1015,7 @@ std::unique_ptr<SmNode> SmParser::DoAlign(bool bUseExtraSpaces)
if (xSNode)
{
xSNode->SetSubNode(0, pNode.release());
#if HAVE_CXX_CWG1579_FIX
return xSNode;
#else
return std::move(xSNode);
#endif
}
return pNode;
}
......@@ -1055,11 +1050,7 @@ std::unique_ptr<SmNode> SmParser::DoLine()
auto xSNode = o3tl::make_unique<SmLineNode>(m_aCurToken);
xSNode->SetSubNodes(buildNodeArray(ExpressionArray));
#if HAVE_CXX_CWG1579_FIX
return xSNode;
#else
return std::move(xSNode);
#endif
}
std::unique_ptr<SmNode> SmParser::DoExpression(bool bUseExtraSpaces)
......@@ -1078,11 +1069,7 @@ std::unique_ptr<SmNode> SmParser::DoExpression(bool bUseExtraSpaces)
std::unique_ptr<SmExpressionNode> xSNode(new SmExpressionNode(m_aCurToken));
xSNode->SetSubNodes(buildNodeArray(RelationArray));
xSNode->SetUseExtraSpaces(bUseExtraSpaces);
#if HAVE_CXX_CWG1579_FIX
return xSNode;
#else
return std::move(xSNode);
#endif
}
else
{
......@@ -1287,11 +1274,7 @@ std::unique_ptr<SmNode> SmParser::DoSubSup(TG nActiveGroup, SmNode *pGivenNode)
}
pNode->SetSubNodes(buildNodeArray(aSubNodes));
#if HAVE_CXX_CWG1579_FIX
return pNode;
#else
return std::move(pNode);
#endif
}
std::unique_ptr<SmNode> SmParser::DoOpSubSup()
......@@ -1307,11 +1290,7 @@ std::unique_ptr<SmNode> SmParser::DoOpSubSup()
// get sub- supscripts if any
if (m_aCurToken.nGroup == TG::Power)
return DoSubSup(TG::Power, pNode.release());
#if HAVE_CXX_CWG1579_FIX
return pNode;
#else
return std::move(pNode);
#endif
}
std::unique_ptr<SmNode> SmParser::DoPower()
......@@ -1813,11 +1792,7 @@ std::unique_ptr<SmStructureNode> SmParser::DoAttribut()
xSNode->SetSubNodes(xAttr.release(), nullptr); // the body will be filled later
xSNode->SetScaleMode(eScaleMode);
#if HAVE_CXX_CWG1579_FIX
return xSNode;
#else
return std::move(xSNode);
#endif
}
std::unique_ptr<SmStructureNode> SmParser::DoFontAttribut()
......@@ -1838,11 +1813,7 @@ std::unique_ptr<SmStructureNode> SmParser::DoFontAttribut()
{
auto pNode = o3tl::make_unique<SmFontNode>(m_aCurToken);
NextToken();
#if HAVE_CXX_CWG1579_FIX
return pNode;
#else
return std::move(pNode);
#endif
}
case TSIZE :
......@@ -2002,11 +1973,7 @@ std::unique_ptr<SmStructureNode> SmParser::DoFontSize()
NextToken();
pFontNode->SetSizeParameter(aValue, Type);
#if HAVE_CXX_CWG1579_FIX
return pFontNode;
#else
return std::move(pFontNode);
#endif
}
std::unique_ptr<SmStructureNode> SmParser::DoBrace()
......
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