This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi Jonathan,template<typename T> struct HasRandomAccessOp { typedef decltype(std::declval<T>()[0]) test_type; };
template<typename T, typename T_VECTOR, typename = typename HasRandomAccessOp<T_VECTOR>::test_type> int operator*(const T &l, const T_VECTOR &r) { return 1; }
Cheers, onay
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |