mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 19:29:02 +08:00
Define NoChange as enum constant (bug #450).
This gets rid of some warnings on Intel Composer XE, apparently.
This commit is contained in:
parent
1741dbce1a
commit
65fb0d43ff
@ -287,26 +287,21 @@ enum {
|
|||||||
OnTheRight = 2
|
OnTheRight = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
/* the following could as well be written:
|
/* the following used to be written as:
|
||||||
* enum NoChange_t { NoChange };
|
*
|
||||||
* but it feels dangerous to disambiguate overloaded functions on enum/integer types.
|
* struct NoChange_t {};
|
||||||
* If on some platform it is really impossible to get rid of "unused variable" warnings, then
|
* namespace {
|
||||||
* we can always come back to that solution.
|
* EIGEN_UNUSED NoChange_t NoChange;
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* on the ground that it feels dangerous to disambiguate overloaded functions on enum/integer types.
|
||||||
|
* However, this leads to "variable declared but never referenced" warnings on Intel Composer XE,
|
||||||
|
* and we do not know how to get rid of them (bug 450).
|
||||||
*/
|
*/
|
||||||
struct NoChange_t {};
|
|
||||||
namespace {
|
|
||||||
EIGEN_UNUSED NoChange_t NoChange;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct Sequential_t {};
|
enum NoChange_t { NoChange };
|
||||||
namespace {
|
enum Sequential_t { Sequential };
|
||||||
EIGEN_UNUSED Sequential_t Sequential;
|
enum Default_t { Default };
|
||||||
}
|
|
||||||
|
|
||||||
struct Default_t {};
|
|
||||||
namespace {
|
|
||||||
EIGEN_UNUSED Default_t Default;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** \internal \ingroup enums
|
/** \internal \ingroup enums
|
||||||
* Used in AmbiVector. */
|
* Used in AmbiVector. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user