piranha  0.10
Public Member Functions | List of all members
piranha::math::is_unitary_impl< T, typename > Struct Template Reference

Default functor for the implementation of piranha::math::is_unitary(). More...

#include <piranha/math.hpp>

Public Member Functions

template<typename U , enabler< U > = 0>
bool operator() (const U &x) const
 Call operator. More...

Detailed Description

template<typename T, typename = void>
struct piranha::math::is_unitary_impl< T, typename >

Default functor for the implementation of piranha::math::is_unitary().

This functor should be specialised via the std::enable_if mechanism. The default implementation defines a call operator which is enabled only if the argument type is constructible from the C++ int type and T is equality comparable.

Definition at line 179 of file math.hpp.

Member Function Documentation

◆ operator()()

template<typename T , typename = void>
template<typename U , enabler< U > = 0>
bool piranha::math::is_unitary_impl< T, typename >::operator() ( const U &  x) const

Call operator.

This template method is enabled only if U can be constructed from int and U is equality comparable.

The operator will compare x to an instance of U constructed from the literal 1.

xargument to be tested.
true if x is equal to 1, false otherwise.
unspecifiedany exception thrown by the construction or comparison of instances of type U or by the conversion of the result to bool.

Definition at line 202 of file math.hpp.

The documentation for this struct was generated from the following file: