Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pistache
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
Libraries
pistache
Commits
5f504291
Commit
5f504291
authored
Nov 22, 2019
by
Krystian Kuzniarek
Committed by
Mateusz Szychowski (Muttley)
Nov 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: optional: add has_equalto_operator type_trait
parent
edcc6c6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
include/pistache/optional.h
include/pistache/optional.h
+12
-0
No files found.
include/pistache/optional.h
View file @
5f504291
...
...
@@ -14,6 +14,7 @@
#include <iostream>
#include <tuple>
#include <functional>
#include <type_traits>
namespace
Pistache
{
...
...
@@ -81,6 +82,17 @@ namespace types {
struct
is_move_constructible
:
std
::
is_constructible
<
T
,
typename
std
::
add_rvalue_reference
<
T
>::
type
>
{};
// Workaround for C++14 defect (CWG 1558)
template
<
typename
...
Ts
>
struct
make_void
{
typedef
void
type
;
};
template
<
typename
...
Ts
>
using
void_t
=
typename
make_void
<
Ts
...
>::
type
;
template
<
typename
,
typename
=
void_t
<
>
>
struct
has_equalto_operator
:
std
::
false_type
{};
template
<
typename
T
>
struct
has_equalto_operator
<
T
,
void_t
<
decltype
(
std
::
declval
<
T
>
()
==
std
::
declval
<
T
>
())
>>
:
std
::
true_type
{};
}
...
...
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