SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWTResultOf< T > Struct Template Reference

Determines the return type of T. More...

#include <rw/tools/traits/RWTResultOf.h>

Public Types

typedef unspecified_type type
 

Detailed Description

template<typename T>
struct RWTResultOf< T >

For T of the form F(A1, A2, ..., AN), sets the type member typedef to the return type of the expression f(a1, a2, ..., aN), where f is an instance of F, and a1, a2, ..., aN are instances of A1, A2, ..., AN, respectively.

The return type is determined by one of the following methods (in order):

  • If F is a function pointer or function reference, type is the return type of F.
  • If F is a member function pointer, type is the return type of F.
  • If the compiler supports the decltype keyword, type is the result of decltype(f(a1, a2, ..., aN)).
  • If the compiler supports the std::result_of type trait, type is an alias for std::result_of<T>::type.
  • If the compiler supports the std::tr1::result_of type trait, type is an alias for std::tr1::result_of<T>::type.
  • If F is a class type with a member type F::result_type, type is an alias for F::result_type;
  • If F is a class type without a member type F::result_type, or if F::result_type is not a type:
    • If N = 0 (no arguments) type is void.
    • If N > 0 type is F::template result<F(A1, A2, ..., AN)>::type
  • Otherwise, the program is ill-formed.
Note
N is allowed to be between 0 and 10, inclusive.

Member Typedef Documentation

◆ type

template<typename T >
typedef unspecified_type RWTResultOf< T >::type

The return type of T.

Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.