diff options
author | 2009-06-25 03:33:47 +0200 | |
---|---|---|
committer | 2009-06-25 03:33:47 +0200 | |
commit | 6ccb97620aa1206b992f81b048c586a4b9d51d05 (patch) | |
tree | 91015decf01c8bb5c76c7b8b4744c7b73e5d9d68 /Eigen/src/Core/util/Constants.h | |
parent | 60e6ac31784d903326abea68983d4702a236085d (diff) |
patch by Patrick Mihelich: use empty struct + anonymous namespace for NoChange
Diffstat (limited to 'Eigen/src/Core/util/Constants.h')
-rw-r--r-- | Eigen/src/Core/util/Constants.h | 11 |
1 files changed, 10 insertions, 1 deletions
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, |