29 #ifndef VC_TRAITS_HAS_SUBSCRIPT_OPERATOR_H_ 
   30 #define VC_TRAITS_HAS_SUBSCRIPT_OPERATOR_H_ 
   35 template <
typename T, 
typename I, 
typename = decltype(std::declval<T &>()[std::declval<I>()])> std::true_type test(
int);
 
   36 template <
typename T, 
typename I> std::false_type test(
float);
 
   40 template <
typename T, 
typename I = std::
size_t>
 
   41 struct has_subscript_operator : 
public decltype(has_subscript_operator_impl::test<T, I>(1))
 
   45 static_assert(has_subscript_operator<
int[]>::value, 
"");
 
   46 static_assert(has_subscript_operator<
int[], 
int>::value, 
"");
 
   47 static_assert(!has_subscript_operator<
int[], 
void *>::value, 
"");
 
   49 #endif // VC_TRAITS_HAS_SUBSCRIPT_OPERATOR_H_