Skip to content

Commit 66994a2

Browse files
[SYCL] Fix bfloat16 to compile with clang < 9.0.0 (#15102)
``` 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.
1 parent 683123f commit 66994a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/include/sycl/ext/oneapi/bfloat16.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ class bfloat16 {
9292

9393
public:
9494
bfloat16() = default;
95+
~bfloat16() = default;
9596
constexpr bfloat16(const bfloat16 &) = default;
9697
constexpr bfloat16(bfloat16 &&) = default;
9798
constexpr bfloat16 &operator=(const bfloat16 &rhs) = default;
98-
~bfloat16() = default;
9999

100100
private:
101101
static detail::Bfloat16StorageT from_float_fallback(const float &a) {

0 commit comments

Comments
 (0)