From 6ccb97620aa1206b992f81b048c586a4b9d51d05 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Thu, 25 Jun 2009 03:33:47 +0200 Subject: [PATCH] patch by Patrick Mihelich: use empty struct + anonymous namespace for NoChange --- Eigen/src/Core/util/Constants.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Eigen/src/Core/util/Constants.h b/Eigen/src/Core/util/Constants.h index 79efa700b..c2641537a 100644 --- a/Eigen/src/Core/util/Constants.h +++ b/Eigen/src/Core/util/Constants.h @@ -241,7 +241,16 @@ enum { DontAlign = 0x2 }; -enum NoChange_t { NoChange }; +/* the following could as well be written: + * enum NoChange_t { NoChange }; + * but it feels dangerous to disambiguate overloaded functions on enum/integer types. + * If on some platform it is really impossible to get rid of "unused variable" warnings, then + * we can always come back to that solution. + */ +struct NoChange_t {}; +namespace { + EIGEN_UNUSED NoChange_t NoChange; +} enum { IsDense = 0,