diff --git a/dune/common/typetraits.hh b/dune/common/typetraits.hh
index e66e84bff97087ddb037e2a825ed39a915f40e77..f18e44ec6c758fc041e5c79fa99fe378e0537ced 100644
--- a/dune/common/typetraits.hh
+++ b/dune/common/typetraits.hh
@@ -250,11 +250,13 @@ namespace Dune
   template <class Base, class Derived>
   class IsBaseOf
   {
+    typedef typename ConstantVolatileTraits< typename TypeTraits< Base >::ReferredType >::UnqualifiedType RawBase;
+    typedef typename ConstantVolatileTraits< typename TypeTraits< Derived >::ReferredType >::UnqualifiedType RawDerived;
     typedef char Small;
     struct Big {char dummy[2];};
-    static Small test(Base*);
+    static Small test(RawBase*);
     static Big test(...);
-    static typename TypeTraits< Derived* >::ReferredType &makePtr ();
+    static RawDerived* &makePtr ();
   public:
     enum {
       /** @brief True if Base is a base class of Derived. */