From b6831c339537560f96b878412720f85bedc1f990 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Fri, 30 Apr 2021 21:27:02 +0000 Subject: [PATCH] castable.h: Fix warning > clang --version Apple clang version 11.0.3 (clang-1103.0.32.29) ../src/castable.h:199:11: error: definition of implicit copy assignment operator for 'CastableBase' is deprecated because it has a user-declared destructor [-Werror,-Wdeprecated] Seems to only be raised with this particular flavor of clang? Change-Id: I9a549c753cd28a11855138a97823e7c1c92fab25 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/49532 Commit-Queue: Ben Clayton Commit-Queue: Antonio Maiorano Auto-Submit: Ben Clayton Reviewed-by: Antonio Maiorano Kokoro: Kokoro --- src/castable.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/castable.h b/src/castable.h index 5bb8fdb58b..d825de164c 100644 --- a/src/castable.h +++ b/src/castable.h @@ -196,8 +196,14 @@ class CastableBase { /// Copy constructor CastableBase(const CastableBase&) = default; + /// Destructor virtual ~CastableBase() = default; + /// Copy assignment + /// @param other the CastableBase to copy + /// @returns the new CastableBase + CastableBase& operator=(const CastableBase& other) = default; + /// @returns the TypeInfo of the object virtual const tint::TypeInfo& TypeInfo() const = 0;