piranha  0.10
Public Member Functions | List of all members
piranha::convert_to_impl< To, From, typename > Struct Template Reference

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

#include <piranha/convert_to.hpp>

Public Member Functions

template<typename From2 >
return_type< From2 > operator() (const From2 &x) const
 Call operator. More...
 

Detailed Description

template<typename To, typename From, typename = void>
struct piranha::convert_to_impl< To, From, typename >

Default functor for the implementation of piranha::convert_to().

Definition at line 43 of file convert_to.hpp.

Member Function Documentation

◆ operator()()

template<typename To , typename From , typename = void>
template<typename From2 >
return_type<From2> piranha::convert_to_impl< To, From, typename >::operator() ( const From2 &  x) const
inline

Call operator.

Note
This call operator is enabled only if static_cast<To>(x) is a well-formed expression, returning a type which satisfies piranha::is_returnable.

The body of this operator is equivalent to:

return static_cast<To>(x);
Parameters
xconversion argument.
Returns
an instance of type To cast from x.
Exceptions
unspecifiedany exception thrown by casting x to To.

Definition at line 69 of file convert_to.hpp.


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