base: Assert Flags' type is unsigned
Operations rely on the use of unsigned integers. Change-Id: I825a88f81b54577585976d6558b1409870897721 Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38712 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Daniel Carvalho
parent
0c3dcfd314
commit
4a503306a7
@@ -29,10 +29,14 @@
|
||||
#ifndef __BASE_FLAGS_HH__
|
||||
#define __BASE_FLAGS_HH__
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
template <typename T>
|
||||
class Flags
|
||||
{
|
||||
private:
|
||||
static_assert(std::is_unsigned<T>::value, "Flag type must be unsigned");
|
||||
|
||||
T _flags;
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user