Skip to content

Conversation

@aelovikov-intel
Copy link
Contributor

struct A {  // Fails to compile with clang 8.0.1, ok 9.0.0
    constexpr A& operator=(const A&) = default;
    ~A() = default;
};
struct B {  // Ok with either version
    ~B() = default;
    constexpr B& operator=(const B&) = default;
};

int main() {
    A a;
    B b;
    return 0;
}

Since the workaround isn't hurting readability/maintenance might just do it even if the support for such old clang is questionable.

```
struct A {  // Fails to compile with clang 8.0.1, ok 9.0.0
    constexpr A& operator=(const A&) = default;
    ~A() = default;
};
struct B {  // Ok with either version
    ~B() = default;
    constexpr B& operator=(const B&) = default;
};

int main() {
    A a;
    B b;
    return 0;
}
```

Since the workaround isn't hurting readability/maintenance might just do
it even if the support for such old clang is questionable.
@aelovikov-intel aelovikov-intel requested a review from a team as a code owner August 15, 2024 17:55
@aelovikov-intel aelovikov-intel changed the title [SYCL] Fix bfloat16 to compile with clang < 0.0.0 [SYCL] Fix bfloat16 to compile with clang < 9.0.0 Aug 15, 2024
@aelovikov-intel
Copy link
Contributor Author

https://godbolt.org/z/zj14hTKPe for the case from the PR's description.

@aelovikov-intel aelovikov-intel merged commit 66994a2 into intel:sycl Aug 16, 2024
@aelovikov-intel aelovikov-intel deleted the bfloat16-on-old-clang branch August 16, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants