Skip to content
Snippets Groups Projects
Commit 56a4dc5d authored by Christian Engwer's avatar Christian Engwer
Browse files

* fix nullptr with gcc 3.4

merge to release

[[Imported from SVN: r5875]]
parent 84c0bb39
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,18 @@ private:
typedef dune_nullptr_t nullptr_t;
template<class T>
bool operator == (T* t, dune_nullptr_t)
{
return (t == static_cast<T*>(nullptr));
}
template<class T>
bool operator == (dune_nullptr_t, T* t)
{
return (t == static_cast<T*>(nullptr));
}
#endif // HAVE_NULLPTR
#endif // DUNE_NULLPTR_HH
......@@ -17,6 +17,7 @@ void basic_tests()
int n2 = 0; // n2 is zero
if( ch == 0 ) ; // evaluates to true
if( ch == nullptr ) ; // evaluates to true
if( nullptr == ch ) ; // evaluates to true
if( ch ) ; // evaluates to false
if( n2 == 0 ) ; // evaluates to true
ch = ch2;
......
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