Skip to content

Commit 0deb855

Browse files
author
John Wellbelove
committed
Disabled constexpr const container tests for C++11
1 parent 958c331 commit 0deb855

13 files changed

+63
-34
lines changed

support/Release notes.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ Updates:
55
#1170 Place a typed pointer instead of a bool into etl::typed_storage
66
Modified the storage used by etl::typed_storage to be a union, along the lines of etl::optional.
77
Added etl::typed_storage_ext to wrap external storage.
8+
9+
Fixes:
810
#1176 Fix GCC __builtin_memcpy errors when compiling with -O2 optimisation
911
#1180 Duplicate definition of const_reference in etl::const_set_ext
1012

11-
1213
===============================================================================
1314
20.43.0
1415

test/test_const_map_ext_constexpr.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ SOFTWARE.
4141

4242
#include "data.h"
4343

44+
#if ETL_USING_CPP14
45+
4446
namespace
4547
{
4648
static constexpr size_t Max_Size = 10UL;
@@ -1711,3 +1713,5 @@ namespace
17111713
}
17121714
};
17131715
}
1716+
1717+
#endif

test/test_const_multimap_ext_constexpr.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ SOFTWARE.
4141

4242
#include "data.h"
4343

44+
#if ETL_USING_CPP14
45+
4446
namespace
4547
{
4648
static constexpr size_t Max_Size = 10UL;
@@ -1509,3 +1511,5 @@ namespace
15091511
}
15101512
};
15111513
}
1514+
1515+
#endif

test/test_const_multiset.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ namespace
8686
}
8787

8888
// Equality operator for Key != Key
89-
//constexpr bool operator !=(const Key& lhs, const Key& rhs) noexcept
90-
//{
91-
// return !(lhs.k == rhs.k);
92-
//}
89+
constexpr bool operator !=(const Key& lhs, const Key& rhs) noexcept
90+
{
91+
return !(lhs.k == rhs.k);
92+
}
9393

9494
#define TEST_GREATER_THAN
9595
#ifdef TEST_GREATER_THAN

test/test_const_multiset_constexpr.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ SOFTWARE.
3737

3838
#include "data.h"
3939

40+
#if ETL_USING_CPP14
41+
4042
namespace
4143
{
4244
static constexpr size_t Max_Size = 10UL;
@@ -86,10 +88,10 @@ namespace
8688
}
8789

8890
// Equality operator for Key != Key
89-
//constexpr bool operator !=(const Key& lhs, const Key& rhs) noexcept
90-
//{
91-
// return !(lhs.k == rhs.k);
92-
//}
91+
constexpr bool operator !=(const Key& lhs, const Key& rhs) noexcept
92+
{
93+
return !(lhs.k == rhs.k);
94+
}
9395

9496
#define TEST_GREATER_THAN
9597
#ifdef TEST_GREATER_THAN
@@ -1324,3 +1326,5 @@ namespace
13241326
}
13251327
};
13261328
}
1329+
1330+
#endif

test/test_const_multiset_ext.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ namespace
8787
}
8888

8989
// Equality operator for Key != Key
90-
//constexpr bool operator !=(const Key& lhs, const Key& rhs) noexcept
91-
//{
92-
// return !(lhs.k == rhs.k);
93-
//}
90+
constexpr bool operator !=(const Key& lhs, const Key& rhs) noexcept
91+
{
92+
return !(lhs.k == rhs.k);
93+
}
9494

9595
#define TEST_GREATER_THAN
9696
#ifdef TEST_GREATER_THAN

test/test_const_multiset_ext_constexpr.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ SOFTWARE.
3838

3939
#include "data.h"
4040

41+
#if ETL_USING_CPP14
42+
4143
namespace
4244
{
4345
static constexpr size_t Max_Size = 10UL;
@@ -86,11 +88,11 @@ namespace
8688
return (lhs.k == rhs.k);
8789
}
8890

89-
//// Equality operator for Key != Key
90-
//constexpr bool operator !=(const Key& lhs, const Key& rhs) noexcept
91-
//{
92-
// return !(lhs.k == rhs.k);
93-
//}
91+
// Equality operator for Key != Key
92+
constexpr bool operator !=(const Key& lhs, const Key& rhs) noexcept
93+
{
94+
return !(lhs.k == rhs.k);
95+
}
9496

9597
#define TEST_GREATER_THAN
9698
#ifdef TEST_GREATER_THAN
@@ -1421,3 +1423,5 @@ namespace
14211423
}
14221424
};
14231425
}
1426+
1427+
#endif

test/test_const_set.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ namespace
8484
}
8585

8686
// Equality operator for Key != Key
87-
//constexpr bool operator !=(const Key& lhs, const Key& rhs) noexcept
88-
//{
89-
// return !(lhs.k == rhs.k);
90-
//}
87+
constexpr bool operator !=(const Key& lhs, const Key& rhs) noexcept
88+
{
89+
return !(lhs.k == rhs.k);
90+
}
9191

9292
#define TEST_GREATER_THAN
9393
#ifdef TEST_GREATER_THAN

test/test_const_set_constexpr.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ SOFTWARE.
3333
#include <utility>
3434
#include <iterator>
3535

36+
#if ETL_USING_CPP14
37+
3638
#include "etl/const_set.h"
3739

3840
namespace
@@ -84,10 +86,10 @@ namespace
8486
}
8587

8688
// Equality operator for Key != Key
87-
//constexpr bool operator !=(const Key& lhs, const Key& rhs) noexcept
88-
//{
89-
// return !(lhs.k == rhs.k);
90-
//}
89+
constexpr bool operator !=(const Key& lhs, const Key& rhs) noexcept
90+
{
91+
return !(lhs.k == rhs.k);
92+
}
9193

9294
#define TEST_GREATER_THAN
9395
#ifdef TEST_GREATER_THAN
@@ -1433,3 +1435,5 @@ namespace
14331435
}
14341436
};
14351437
}
1438+
1439+
#endif

test/test_const_set_ext.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ namespace
9090
}
9191

9292
// Equality operator for Key != Key
93-
//constexpr bool operator !=(const Key& lhs, const Key& rhs) noexcept
94-
//{
95-
// return !(lhs.k == rhs.k);
96-
//}
93+
constexpr bool operator !=(const Key& lhs, const Key& rhs) noexcept
94+
{
95+
return !(lhs.k == rhs.k);
96+
}
9797

9898
#define TEST_GREATER_THAN
9999
#ifdef TEST_GREATER_THAN

0 commit comments

Comments
 (0)