base: Replace cppversion == version with >= version
authorBradley <animalvgamer@gmail.com>
Thu, 26 Jul 2018 10:02:03 +0000 (03:02 -0700)
committerBradley Wang <radwang@ucdavis.edu>
Fri, 10 Aug 2018 23:42:29 +0000 (23:42 +0000)
For forward compatibility with later compilers, we should have a greater
than comparison instead of an explicit equality with a particular C++
version.

Change-Id: If848097420b9575f80134986410da3dab32567da
Signed-off-by: Bradley Wang <radwang@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/11871
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/base/compiler.hh

index 35156ee67491cd014c8478f7a68cbae8f8fe523f..957ef40fd9d342ffd42b855c8224150762b50b80 100644 (file)
@@ -92,7 +92,7 @@
 namespace m5
 {
 
-#if __cplusplus == 201402L // C++14
+#if __cplusplus >= 201402L // C++14
 
 using std::make_unique;
 
@@ -108,7 +108,7 @@ make_unique( Args&&... constructor_args )
            );
 }
 
-#endif // __cplusplus == 201402L
+#endif // __cplusplus >= 201402L
 
 } //namespace m5