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
64f906b9
Commit
64f906b9
authored
3 years ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Make NaNHelper constructor explicit
parent
ef9a9edc
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!105
Add NaNHelper utility
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/utils/NaNHelper.hpp
+6
-1
6 additions, 1 deletion
src/utils/NaNHelper.hpp
with
6 additions
and
1 deletion
src/utils/NaNHelper.hpp
+
6
−
1
View file @
64f906b9
#ifndef NAN_HELPER_HPP
#define NAN_HELPER_HPP
#include
<utils/PugsMacros.hpp>
#include
<cmath>
#include
<iostream>
#include
<type_traits>
...
...
@@ -12,6 +14,7 @@ class NaNHelper
const
T
&
m_t
;
public:
PUGS_INLINE
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
NaNHelper
<
T
>&
helper
)
{
...
...
@@ -26,7 +29,9 @@ class NaNHelper
}
return
os
;
}
NaNHelper
(
const
T
&
t
)
:
m_t
{
t
}
{}
PUGS_INLINE
explicit
NaNHelper
(
const
T
&
t
)
:
m_t
{
t
}
{}
NaNHelper
(
NaNHelper
&&
)
=
delete
;
NaNHelper
(
const
NaNHelper
&
)
=
delete
;
...
...
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