Skip to content
Snippets Groups Projects
Commit d4290852 authored by Carsten Gräser's avatar Carsten Gräser
Browse files

Make IsBaseOf robust wrt qualifiers and references.

[[Imported from SVN: r5742]]
parent 8830c1c2
No related branches found
No related tags found
No related merge requests found
......@@ -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. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment