From ecbe9cac1fe74a6fcb42857f57ebd6930d6e8c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 6 May 2024 13:33:14 +0300 Subject: [PATCH] Remove a broken, unused template class Since Clang changes https://github.com/llvm/llvm-project/pull/84050 and https://github.com/llvm/llvm-project/pull/90152 (upcoming in Clang 19.x), Clang will diagnose member accesses before instantiating C++ templates. Within the optional_container_property template, this causes errors for the calls to this->Copy() and this->clear(), as there are no corresponding methods within that template class. This template is unused, and these faulty calls have been present since the class was added in 02915821cfb49cb6851086f5d991cee58328102b. Simply remove the unused template class, to avoid these compiler errors. This fixes https://github.com/cinecert/asdcplib/issues/136. --- src/MXF.h | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/MXF.h b/src/MXF.h index 8ce77e1..32422b2 100755 --- a/src/MXF.h +++ b/src/MXF.h @@ -263,30 +263,6 @@ namespace ASDCP const PropertyType& const_get() const { return m_property; } }; - // wrapper object manages optional properties - template - class optional_container_property - { - PropertyType m_property; - - public: - optional_container_property() {} - optional_container_property(const PropertyType& value) : m_property(value) {} - const optional_container_property& operator=(const PropertyType& rhs) { - this->Copy(rhs.m_property); - return *this; - } - - bool operator==(const PropertyType& rhs) const { return this->m_property == rhs; } - bool operator==(const optional_property& rhs) const { return this->m_property == rhs.m_property; } - operator PropertyType&() { return this->m_property; } - void set(const PropertyType& rhs) { this->m_property = rhs; } - void reset(const PropertyType& rhs) { this->clear(); } - bool empty() const { return ! this->m_property.HasValue(); } - PropertyType& get() { return m_property; } - const PropertyType& const_get() const { return m_property; } - }; - // base class of all metadata objects // class InterchangeObject : public ASDCP::KLVPacket -- 2.34.1