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

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

Change-Id: I1edff6477526fe4ce29df38852f47fe49117561e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Robert Loehning
2017-01-19 13:07:26 +01:00
parent 5dc8e9a743
commit eeb0b8fd21
8 changed files with 1 additions and 84 deletions

View File

@@ -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")

View File

@@ -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")

View File

@@ -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")

View File

@@ -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")

View File

@@ -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")

View File

@@ -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")

View File

@@ -29,10 +29,6 @@
#include <utils/smallstringvector.h>
#ifndef __cpp_constexpr
#define constexpr
#endif
namespace {
Utils::SmallStringView createText(int size)

View File

@@ -31,10 +31,6 @@
#include <utils/smallstringio.h>
#include <utils/smallstringvector.h>
#ifndef __cpp_constexpr
#define constexpr
#endif
using namespace ::testing;
using Utils::SmallString;