utils: Add copy constructor to EnumSet

Some versions of clang warn as error without this:

error: definition of implicit copy constructor for 'EnumSet<tint::ast::PipelineStage>' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
Change-Id: I02cee0b1f7b70d74f29da0067e888b50acf27ee1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/71600
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Ben Clayton 2021-12-02 13:00:32 +00:00 committed by Tint LUCI CQ
parent 62394b2492
commit abf4f17b8e
1 changed files with 4 additions and 0 deletions

View File

@ -36,6 +36,10 @@ struct EnumSet {
/// Constructor. Initializes the EnumSet with zero. /// Constructor. Initializes the EnumSet with zero.
constexpr EnumSet() = default; constexpr EnumSet() = default;
/// Copy constructor.
/// @param s the set to copy
constexpr EnumSet(const EnumSet& s) = default;
/// Constructor. Initializes the EnumSet with the given values. /// Constructor. Initializes the EnumSet with the given values.
/// @param values the enumerator values to construct the set with /// @param values the enumerator values to construct the set with
template <typename... VALUES> template <typename... VALUES>