Skip to content

Commit ffb6121

Browse files
committed
Remove a broken, unused template class
Since Clang changes llvm/llvm-project#84050 and llvm/llvm-project#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, errors like these: asdcplib/src/MXF.h:276:12: error: no member named 'Copy' in 'optional_container_property<PropertyType>' 276 | this->Copy(rhs.m_property); | ~~~~ ^ asdcplib/src/MXF.h:284:48: error: no member named 'clear' in 'optional_container_property<PropertyType>' 284 | void reset(const PropertyType& rhs) { this->clear(); } | ~~~~ ^ This template is unused, and these faulty calls have been present since the class was added in 0291582. Simply remove the unused template class, to avoid these compiler errors. This fixes cinecert#136.
1 parent 9b13644 commit ffb6121

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

src/MXF.h

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -263,30 +263,6 @@ namespace ASDCP
263263
const PropertyType& const_get() const { return m_property; }
264264
};
265265

266-
// wrapper object manages optional properties
267-
template <class PropertyType>
268-
class optional_container_property
269-
{
270-
PropertyType m_property;
271-
272-
public:
273-
optional_container_property() {}
274-
optional_container_property(const PropertyType& value) : m_property(value) {}
275-
const optional_container_property<PropertyType>& operator=(const PropertyType& rhs) {
276-
this->Copy(rhs.m_property);
277-
return *this;
278-
}
279-
280-
bool operator==(const PropertyType& rhs) const { return this->m_property == rhs; }
281-
bool operator==(const optional_property<PropertyType>& rhs) const { return this->m_property == rhs.m_property; }
282-
operator PropertyType&() { return this->m_property; }
283-
void set(const PropertyType& rhs) { this->m_property = rhs; }
284-
void reset(const PropertyType& rhs) { this->clear(); }
285-
bool empty() const { return ! this->m_property.HasValue(); }
286-
PropertyType& get() { return m_property; }
287-
const PropertyType& const_get() const { return m_property; }
288-
};
289-
290266
// base class of all metadata objects
291267
//
292268
class InterchangeObject : public ASDCP::KLVPacket

0 commit comments

Comments
 (0)