Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
djinni
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
djinni
Commits
34aea735
Commit
34aea735
authored
Sep 24, 2015
by
Jacob Potter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for C++11 build
Fixes #144
parent
366198c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
support-lib/proxy_cache_impl.hpp
support-lib/proxy_cache_impl.hpp
+3
-1
support-lib/proxy_cache_interface.hpp
support-lib/proxy_cache_interface.hpp
+3
-1
No files found.
support-lib/proxy_cache_impl.hpp
View file @
34aea735
...
...
@@ -37,7 +37,9 @@
namespace
djinni
{
// See comment on `get_unowning()` in proxy_cache_interface.hpp.
template
<
typename
T
>
static
inline
auto
upgrade_weak
(
const
T
&
ptr
)
{
return
ptr
.
lock
();
}
template
<
typename
T
>
static
inline
auto
upgrade_weak
(
const
T
&
ptr
)
->
decltype
(
ptr
.
lock
())
{
return
ptr
.
lock
();
}
template
<
typename
T
>
static
inline
T
*
upgrade_weak
(
T
*
ptr
)
{
return
ptr
;
}
template
<
typename
T
>
static
inline
bool
is_expired
(
const
T
&
ptr
)
{
return
ptr
.
expired
();
}
template
<
typename
T
>
static
inline
bool
is_expired
(
T
*
ptr
)
{
return
!
ptr
;
}
...
...
support-lib/proxy_cache_interface.hpp
View file @
34aea735
...
...
@@ -31,7 +31,9 @@ namespace djinni {
*
* (The helper for .lock() is only used by proxy_cache_impl.hpp, so it's defined there.)
*/
template
<
typename
T
>
static
inline
auto
get_unowning
(
const
T
&
ptr
)
{
return
ptr
.
get
();
}
template
<
typename
T
>
static
inline
auto
get_unowning
(
const
T
&
ptr
)
->
decltype
(
ptr
.
get
())
{
return
ptr
.
get
();
}
template
<
typename
T
>
static
inline
T
*
get_unowning
(
T
*
ptr
)
{
return
ptr
;
}
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment