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

One more place to work around missing std::underlying_type for GCC 4.6

Change-Id: I46225e30f6326e0af5a8ac3bebe9847f4dbe50d0
üst 8a500428
......@@ -23,6 +23,8 @@
#include <com/sun/star/sheet/FormulaToken.hpp>
#include <formula/token.hxx>
#include <formula/ExternalReferenceHelper.hxx>
#include <o3tl/underlying_type.hxx>
#include <limits.h>
#include <type_traits>
#include <unordered_set>
......@@ -90,7 +92,7 @@ public:
inline bool isRewriteNeeded( OpCode eOp ) const;
};
typedef std::unordered_set<OpCode, std::hash<std::underlying_type<OpCode>::type> > unordered_opcode_set;
typedef std::unordered_set<OpCode, std::hash<o3tl::underlying_type<OpCode>::type> > unordered_opcode_set;
class FORMULA_DLLPUBLIC FormulaTokenArray
{
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef INCLUDED_O3TL_UNDERLYING_TYPE_HXX
#define INCLUDED_O3TL_UNDERLYING_TYPE_HXX
#include <sal/config.h>
#include <type_traits>
namespace o3tl {
template<typename T> struct underlying_type {
#if defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ <= 7 && \
!defined __clang__
typedef int type;
#else
typedef typename std::underlying_type<T>::type type;
#endif
};
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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