Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
libvlcpp
Commits
e5e07871
Commit
e5e07871
authored
Mar 12, 2015
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common.hpp: Add a MSVC complient signature_match implementation
parent
c588d2c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
vlcpp/common.hpp
vlcpp/common.hpp
+12
-0
No files found.
vlcpp/common.hpp
View file @
e5e07871
...
...
@@ -53,6 +53,7 @@ namespace VLC
return
std
::
unique_ptr
<
char
,
void
(
*
)(
void
*
)
>
(
str
,
[](
void
*
ptr
)
{
libvlc_free
(
ptr
);
}
);
}
#if !defined(_MSC_VER)
// Kudos to 3xxO for the signature_match helper
template
<
typename
,
typename
,
typename
=
void
>
struct
signature_match
:
std
::
false_type
{};
...
...
@@ -66,6 +67,17 @@ namespace VLC
>::
value
// true or false
>::
type
// void or SFINAE
>
:
std
::
true_type
{};
#else
template
<
typename
...
Args
>
struct
signature_match
:
std
::
false_type
{};
template
<
typename
Func
,
typename
Ret
,
class
...
Args
>
struct
signature_match
<
Func
,
Ret
(
Args
...)
>
:
std
::
integral_constant
<
bool
,
std
::
is_convertible
<
decltype
(
std
::
declval
<
Func
>
()(
std
::
declval
<
Args
>
()...)),
Ret
>
::
value
>
{};
#endif
template
<
typename
Func
,
typename
Ret
,
typename
...
Args
>
struct
signature_match_or_nullptr
:
std
::
integral_constant
<
bool
,
...
...
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