Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
aa7830d0
Commit
aa7830d0
authored
5 years ago
by
Frank Gaede
Committed by
Frank Gaede
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix optional use of boost::any
parent
9b0e92cb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
DDCore/include/DD4hep/Plugins.h
+3
-1
3 additions, 1 deletion
DDCore/include/DD4hep/Plugins.h
DDCore/src/Plugins.cpp
+1
-1
1 addition, 1 deletion
DDCore/src/Plugins.cpp
with
4 additions
and
2 deletions
DDCore/include/DD4hep/Plugins.h
+
3
−
1
View file @
aa7830d0
...
...
@@ -23,13 +23,15 @@
#include
<typeinfo>
#if __cplusplus >= 201703
# include <any>
#include
<any>
inline
bool
any_has_value
(
std
::
any
a
){
return
a
.
has_value
();
}
#else
# include <boost/any.hpp>
namespace
std
{
using
boost
::
any
;
using
boost
::
any_cast
;
using
boost
::
bad_any_cast
;
inline
bool
any_has_value
(
std
::
any
a
){
return
!
a
.
empty
();
}
}
// namespace std
#endif
...
...
This diff is collapsed.
Click to expand it.
DDCore/src/Plugins.cpp
+
1
−
1
View file @
aa7830d0
...
...
@@ -157,7 +157,7 @@ void PluginService::print_bad_cast(const std::string& id,
str
<<
"Factory requested: "
<<
id
<<
" ("
<<
typeid
(
signature
).
name
()
<<
") :"
<<
msg
;
printout
(
ERROR
,
"PluginService"
,
"%s"
,
str
.
str
().
c_str
());
str
.
str
(
""
);
if
(
!
stub
.
has_value
()
)
{
if
(
!
any_
has_value
(
stub
)
)
{
str
<<
"Stub is invalid!"
;
printout
(
ERROR
,
"PluginService"
,
"%s"
,
str
.
str
().
c_str
());
}
...
...
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