base: Remove Flags<U> assignment
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Sat, 26 Dec 2020 01:52:19 +0000 (22:52 -0300)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Wed, 13 Jan 2021 11:15:18 +0000 (11:15 +0000)
Currently unused and broken. Since these are templated classes,
and _flags is private, the assignment is a compilation error.
Furthermore, assignment of flags of different types is likely
undefined behavior.

Change-Id: I8430045c42c003efc74e343cc5b4a4350bc2ad92
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38713
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/base/flags.hh

index 505a1e54fc39e92707c3c6cf75efe205873ca3e5..8cefd2d3399a297c9d72fa5f812b12b7b23f876b 100644 (file)
@@ -55,17 +55,6 @@ class Flags
      */
     operator const Type() const { return _flags; }
 
-    /**
-     * @ingroup api_flags
-     */
-    template <typename U>
-    const Flags<T> &
-    operator=(const Flags<U> &flags)
-    {
-        _flags = flags._flags;
-        return *this;
-    }
-
     /**
      * @ingroup api_flags
      */