diff options
-rw-r--r-- | odb/details/unused.hxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/odb/details/unused.hxx b/odb/details/unused.hxx index bf1638f..31ceb52 100644 --- a/odb/details/unused.hxx +++ b/odb/details/unused.hxx @@ -8,7 +8,15 @@ #include <odb/pre.hxx> -#define ODB_POTENTIALLY_UNUSED(x) (void*)&x +// VC++ doesn't like the (void)x expression if x is a reference to +// an incomplete type. On the other hand, GCC warns that (void*)&x +// doesn't have any effect. +// +#ifdef _MSC_VER +# define ODB_POTENTIALLY_UNUSED(x) (void*)&x +#else +# define ODB_POTENTIALLY_UNUSED(x) (void)x +#endif #include <odb/post.hxx> |