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

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

#include <piranha/invert.hpp>

Public Member Functions

template<typename U >
auto operator() (const U &x) const -> decltype(math::pow(x, -1))
 Call operator. More...
 

Detailed Description

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

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

This functor should be specialised via the std::enable_if mechanism. The call operator will call piranha::math::pow() with an exponent of -1, and it is enabled only if integral exponentiation is supported by the argument type.

Definition at line 50 of file invert.hpp.

Member Function Documentation

◆ operator()()

template<typename T , typename = void>
template<typename U >
auto piranha::math::invert_impl< T, typename >::operator() ( const U &  x) const -> decltype(math::pow(x, -1))
inline

Call operator.

Parameters
xargument for the inversion,
Returns
piranha::math::pow(x,-1).
Exceptions
unspecifiedany exception thrown by piranha::math::pow().

Definition at line 60 of file invert.hpp.


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