mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 13:19:51 -05:00
cmext/enum_set: Fix static default construction on older AppleClang versions
AppleClang 8.0 and below do not understand a `= default;` constructor
in static constant default initialization, but do accept `{}`.
This commit is contained in:
@@ -45,6 +45,13 @@ void testDeclaration()
|
||||
{
|
||||
std::cout << "testDeclaration()" << std::endl;
|
||||
|
||||
{
|
||||
static EnumSetTest const testSet1;
|
||||
static EnumSetTest2 const testSet2;
|
||||
static_cast<void>(testSet1);
|
||||
static_cast<void>(testSet2);
|
||||
}
|
||||
|
||||
{
|
||||
EnumSetTest testSet1;
|
||||
EnumSetTest testSet2 = Test::A;
|
||||
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
using reverse_iterator = std::reverse_iterator<iterator>;
|
||||
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
|
||||
|
||||
constexpr enum_set() noexcept = default;
|
||||
constexpr enum_set() noexcept {}
|
||||
enum_set(key_type e) { this->insert(e); }
|
||||
enum_set(enum_set const& other) noexcept { this->insert(other); }
|
||||
template <typename E,
|
||||
|
||||
Reference in New Issue
Block a user