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
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Timo Koch
dune-common
Commits
acc415b0
Commit
acc415b0
authored
14 years ago
by
Christian Engwer
Browse files
Options
Downloads
Patches
Plain Diff
implement extended make_shared test to fix problems with std::tr1
[[Imported from SVN: r6354]]
parent
abc42ffc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dune/common/shared_ptr.hh
+1
-1
1 addition, 1 deletion
dune/common/shared_ptr.hh
m4/dune_common.m4
+1
-1
1 addition, 1 deletion
m4/dune_common.m4
m4/make_shared.m4
+31
-5
31 additions, 5 deletions
m4/make_shared.m4
m4/shared_ptr.m4
+1
-0
1 addition, 0 deletions
m4/shared_ptr.m4
with
34 additions
and
7 deletions
dune/common/shared_ptr.hh
+
1
−
1
View file @
acc415b0
...
...
@@ -305,7 +305,7 @@ namespace Dune
// C++0x and Boost have a make_shared implementation, TR1 does not.
// Unfortunately, TR1 gets picked over Boost if present.
// Moreover, boost::make_shared() only exists for (remotely) recent versions of Boost.
#if HAVE_M
EMORY || (HAVE_BOOST_SHARED_PTR_HPP && HAVE_BOOST_MAKE_SHARED_HPP && !HAVE_TR1_MEMORY)
#if HAVE_M
AKE_SHARED
using
SHARED_PTR_NAMESPACE
::
make_shared
;
#else
...
...
This diff is collapsed.
Click to expand it.
m4/dune_common.m4
+
1
−
1
View file @
acc415b0
...
...
@@ -22,7 +22,7 @@ AC_DEFUN([DUNE_COMMON_CHECKS],
AC_REQUIRE([STATIC_ASSERT_CHECK])
AC_REQUIRE([NULLPTR_CHECK])
AC_REQUIRE([SHARED_PTR])
AC_REQUIRE([
BOOST_
MAKE_SHARED
_HPP
])
AC_REQUIRE([MAKE_SHARED])
AC_REQUIRE([DUNE_LINKCXX])
AC_REQUIRE([DUNE_CHECKDEPRECATED])
AC_REQUIRE([DUNE_SET_MINIMAL_DEBUG_LEVEL])
...
...
This diff is collapsed.
Click to expand it.
m4/make_shared.m4
+
31
−
5
View file @
acc415b0
AC_DEFUN([BOOST_MAKE_SHARED_HPP],[
AC_REQUIRE([AC_PROG_CXX])
AC_DEFUN([MAKE_SHARED],[
AC_REQUIRE([SHARED_PTR])
AS_IF([test "$SHARED_PTR_NAMESPACE" = "boost"],[
AC_CHECK_HEADER([boost/make_shared.hpp],
[AC_DEFINE([HAVE_BOOST_MAKE_SHARED_HPP], [1],
[Define to 1 if you have <boost/make_shared.hpp>.])])])
AC_MSG_CHECKING([whether SHARED_PTR_NAMESPACE ($SHARED_PTR_NAMESPACE) provides make_shared])
AC_LANG_PUSH([C++])
AC_CHECK_HEADER([boost/make_shared.hpp],
[AC_DEFINE([HAVE_BOOST_MAKE_SHARED_HPP], [1],
[Define to 1 if you have <boost/make_shared.hpp>.])])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[
#if defined(HAVE_MEMORY)
# include <memory>
#endif
#if defined(HAVE_TR1_MEMORY)
# include <tr1/memory>
#endif
#if defined(HAVE_BOOST_SHARED_PTR_HPP) && defined(HAVE_BOOST_MAKE_SHARED_HPP)
# include <boost/shared_ptr.hpp>
# include <boost/make_shared.hpp>
#endif
#include <string>
]],[[
$SHARED_PTR_NAMESPACE::make_shared<int>(3);
]])],
[ AC_MSG_RESULT(yes)
have_make_shared=yes
],[AC_MSG_RESULT(no)
have_make_shared=no
])
AS_IF([test "$have_make_shared" = "yes"],[
AC_DEFINE([HAVE_MAKE_SHARED], [1],
[Define to 1 if SHARED_PTR_NAMESPACE::make_shared is usable.])])
AC_LANG_POP
])
This diff is collapsed.
Click to expand it.
m4/shared_ptr.m4
+
1
−
0
View file @
acc415b0
...
...
@@ -54,6 +54,7 @@ shared_ptr<string> test_ptr(new string("test string"));
])
AS_IF([ test "x$ac_cv_shared_ptr_namespace" = xmissing ],
[], [
SHARED_PTR_NAMESPACE=${ac_cv_shared_ptr_namespace}
AC_DEFINE_UNQUOTED([SHARED_PTR_NAMESPACE],
${ac_cv_shared_ptr_namespace},
[The namespace in which SHARED_PTR can be found])
...
...
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