Skip to content
Snippets Groups Projects
Commit 64f906b9 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Make NaNHelper constructor explicit

parent ef9a9edc
Branches
Tags
1 merge request!105Add NaNHelper utility
#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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment