Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
code
pugs
Commits
b9e6bbe4
Commit
b9e6bbe4
authored
4 years ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Add an `is_std_tuple_v` type traits utility
parent
28e24b1d
No related branches found
No related tags found
1 merge request
!76
Feature/builtin functions
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/utils/PugsTraits.hpp
+10
-1
10 additions, 1 deletion
src/utils/PugsTraits.hpp
with
10 additions
and
1 deletion
src/utils/PugsTraits.hpp
+
10
−
1
View file @
b9e6bbe4
...
...
@@ -3,6 +3,7 @@
#include
<cstddef>
#include
<memory>
#include
<tuple>
#include
<type_traits>
#include
<variant>
#include
<vector>
...
...
@@ -40,7 +41,7 @@ inline constexpr bool is_shared_ptr_v = false;
template
<
typename
T
>
inline
constexpr
bool
is_shared_ptr_v
<
std
::
shared_ptr
<
T
>>
=
true
;
// Traits is_
shared
_ptr
// Traits is_
unique
_ptr
template
<
typename
T
>
inline
constexpr
bool
is_unique_ptr_v
=
false
;
...
...
@@ -76,6 +77,14 @@ inline constexpr bool is_std_vector_v = false;
template
<
typename
T
>
inline
constexpr
bool
is_std_vector_v
<
std
::
vector
<
T
>>
=
true
;
// Traits is_std_tuple
template
<
typename
...
T
>
inline
constexpr
bool
is_std_tuple_v
=
false
;
template
<
typename
...
T
>
inline
constexpr
bool
is_std_tuple_v
<
std
::
tuple
<
T
...
>>
=
true
;
// Traits is_tiny_vector
template
<
typename
T
>
...
...
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