Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Core Modules
dune-common
Commits
c5975565
Commit
c5975565
authored
13 years ago
by
Oliver Sander
Browse files
Options
Downloads
Plain Diff
merge patch 6492 (fix for nullptr with g++ 4.6) from the trunk
[[Imported from SVN: r6504]]
parents
d0a64fb7
7a3a5456
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dune/common/nullptr.hh
+11
-1
11 additions, 1 deletion
dune/common/nullptr.hh
dune/common/test/nullptr-test.cc
+1
-1
1 addition, 1 deletion
dune/common/test/nullptr-test.cc
m4/cxx0x_nullptr.m4
+1
-1
1 addition, 1 deletion
m4/cxx0x_nullptr.m4
with
13 additions
and
3 deletions
dune/common/nullptr.hh
+
11
−
1
View file @
c5975565
...
...
@@ -28,7 +28,9 @@ private:
void
operator
&
()
const
;
// whose address can't be taken
}
nullptr
=
{};
// and whose name is nullptr
typedef
dune_nullptr_t
nullptr_t
;
namespace
Dune
{
typedef
dune_nullptr_t
nullptr_t
;
}
template
<
class
T
>
bool
operator
==
(
T
*
t
,
dune_nullptr_t
)
...
...
@@ -42,6 +44,14 @@ bool operator == (dune_nullptr_t, T* t)
return
(
t
==
static_cast
<
T
*>
(
nullptr
));
}
#else
#include
<cstddef>
namespace
Dune
{
using
std
::
nullptr_t
;
}
#endif // HAVE_NULLPTR
#endif // DUNE_NULLPTR_HH
This diff is collapsed.
Click to expand it.
dune/common/test/nullptr-test.cc
+
1
−
1
View file @
c5975565
...
...
@@ -8,7 +8,7 @@
void
basic_tests
()
{
typedef
nullptr_t
NULLPTR_T
;
typedef
Dune
::
nullptr_t
NULLPTR_T
;
char
*
ch
=
nullptr
;
// ch has the null pointer value
char
*
ch2
=
0
;
// ch2 has the null pointer value
#ifdef FAIL
...
...
This diff is collapsed.
Click to expand it.
m4/cxx0x_nullptr.m4
+
1
−
1
View file @
c5975565
...
...
@@ -3,7 +3,7 @@ AC_DEFUN([NULLPTR_CHECK],[
AC_REQUIRE([GXX0X])
AC_LANG_PUSH([C++])
AC_MSG_CHECKING([whether nullptr is supported])
AC_TRY_COMPILE([],[
typedef nullptr_t peng;
AC_TRY_COMPILE([],[
char* ch = nullptr;
], [
HAVE_NULLPTR=yes
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment