mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Simplify ScalarBinaryOpTraits by removing the Defined enum, and extend its documentation.
This commit is contained in:
@@ -358,6 +358,19 @@ struct result_of<Func(ArgType0,ArgType1,ArgType2)> {
|
||||
};
|
||||
#endif
|
||||
|
||||
// Check whether T::ReturnType does exist
|
||||
template <typename T>
|
||||
struct has_ReturnType
|
||||
{
|
||||
typedef char yes[1];
|
||||
typedef char no[2];
|
||||
|
||||
template <typename C> static yes& testFunctor(C const *, typename C::ReturnType const * = 0);
|
||||
static no& testFunctor(...);
|
||||
|
||||
static const bool value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(yes);
|
||||
};
|
||||
|
||||
/** \internal In short, it computes int(sqrt(\a Y)) with \a Y an integer.
|
||||
* Usage example: \code meta_sqrt<1023>::ret \endcode
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user