Commit eeb0b8fd authored by Robert Loehning's avatar Robert Loehning

Revert "Revert "Utils: Remove old compiler support code""

Thomas provided a smaller fix.
This reverts commit 78fb7f44.

Change-Id: I1edff6477526fe4ce29df38852f47fe49117561e
Reviewed-by: Alessandro Portale's avatarAlessandro Portale <alessandro.portale@qt.io>
parent 5dc8e9a7
......@@ -45,19 +45,6 @@
#include <utility>
#include <vector>
#pragma push_macro("constexpr")
#ifndef __cpp_constexpr
#define constexpr
#endif
#pragma push_macro("noexcept")
#ifdef __clang__
#define __cpp_noexcept 201003
#endif
#ifndef __cpp_noexcept
#define noexcept
#endif
#ifdef UNIT_TESTS
#define unitttest_public public
#else
......@@ -864,6 +851,3 @@ using SmallString = BasicSmallString<31>;
using PathString = BasicSmallString<191>;
} // namespace Utils
#pragma pop_macro("noexcept")
#pragma pop_macro("constexpr")
......@@ -28,11 +28,6 @@
#include <cstddef>
#include <iterator>
#pragma push_macro("noexcept")
#ifndef __cpp_noexcept
#define noexcept
#endif
namespace Utils {
namespace Internal {
......@@ -151,5 +146,3 @@ private:
} // namespace Internal
} // namespace Utils
#pragma pop_macro("noexcept")
......@@ -29,22 +29,6 @@
#include <cstdint>
#pragma push_macro("constexpr")
#ifndef __cpp_constexpr
#define constexpr
#endif
#pragma push_macro("noexcept")
#ifndef __cpp_noexcept
#define noexcept
#endif
#ifdef __cpp_alignas
#define ALIGNAS_16 alignas(16)
#else
#define ALIGNAS_16
#endif
namespace Utils {
namespace Internal {
......@@ -86,7 +70,7 @@ struct ShortStringLayout {
};
template <uint MaximumShortStringDataAreaSize>
struct ALIGNAS_16 StringDataLayout {
struct alignas(16) StringDataLayout {
static_assert( MaximumShortStringDataAreaSize >= 15, "Size must be greater equal than 15 bytes!");
static_assert(((MaximumShortStringDataAreaSize + 1) % 16) == 0, "Size + 1 must be dividable by 16!");
StringDataLayout() noexcept = default;
......@@ -136,6 +120,3 @@ struct ALIGNAS_16 StringDataLayout {
} // namespace Internal
} // namespace Utils
#pragma pop_macro("noexcept")
#pragma pop_macro("constexpr")
......@@ -29,16 +29,6 @@
#include "smallstringlayout.h"
#include "smallstringview.h"
#pragma push_macro("constexpr")
#ifndef __cpp_constexpr
#define constexpr
#endif
#pragma push_macro("noexcept")
#ifndef __cpp_noexcept
#define noexcept
#endif
namespace Utils {
template <int Size>
......@@ -129,6 +119,3 @@ private:
using SmallStringLiteral = BasicSmallStringLiteral<31>;
} // namespace Utils
#pragma pop_macro("noexcept")
#pragma pop_macro("constexpr")
......@@ -33,11 +33,6 @@
#include <QStringList>
#pragma push_macro("noexcept")
#ifndef __cpp_noexcept
#define noexcept
#endif
namespace Utils {
template<uint SmallStringSize>
......@@ -160,5 +155,3 @@ private:
using SmallStringVector = BasicSmallStringVector<31>;
using PathStringVector = BasicSmallStringVector<191>;
} // namespace Utils;
#pragma pop_macro("noexcept")
......@@ -31,16 +31,6 @@
#include <cstring>
#pragma push_macro("constexpr")
#ifndef __cpp_constexpr
#define constexpr
#endif
#pragma push_macro("noexcept")
#ifndef __cpp_noexcept
#define noexcept
#endif
namespace Utils {
class SmallStringView
......@@ -135,6 +125,3 @@ bool operator!=(const SmallStringView& first, const SmallStringView& second) noe
}
} // namespace Utils
#pragma pop_macro("noexcept")
#pragma pop_macro("constexpr")
......@@ -29,10 +29,6 @@
#include <utils/smallstringvector.h>
#ifndef __cpp_constexpr
#define constexpr
#endif
namespace {
Utils::SmallStringView createText(int size)
......
......@@ -31,10 +31,6 @@
#include <utils/smallstringio.h>
#include <utils/smallstringvector.h>
#ifndef __cpp_constexpr
#define constexpr
#endif
using namespace ::testing;
using Utils::SmallString;
......
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