Skip to content
Snippets Groups Projects
Commit c7a1e5cd authored by Max Lyon's avatar Max Lyon
Browse files

use std::declval

parent 77d3df03
No related branches found
No related tags found
No related merge requests found
......@@ -47,10 +47,6 @@
namespace OpenVolumeMesh
{
template<typename T>
T& decllval();
template <bool B> class bool_type;
template <> class bool_type<true> { char c[1]; };
template <> class bool_type<false> { char c[2]; };
......@@ -62,7 +58,7 @@ template <typename Stream, typename T>
class has_input_operator
{
private:
template<class U> static true_type test(char(*)[sizeof(decllval<Stream>() >> decllval<U>(), void(), 0)]);
template<class U> static true_type test(char(*)[sizeof(std::declval<Stream&>() >> std::declval<U&>(), void(), 0)]);
template<class U> static false_type test(...);
public:
......@@ -79,7 +75,7 @@ template <typename Stream, typename T>
class has_output_operator
{
private:
template<class U> static true_type test(char(*)[sizeof(decllval<Stream>() << decllval<U>(), void(), 0)]);
template<class U> static true_type test(char(*)[sizeof(std::declval<Stream&>() << std::declval<U&>(), void(), 0)]);
template<class U> static false_type test(...);
public:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment