【无标题】‘.Children‘ must have class/struct/union

tree_operations.h(97,66): error C2228: left of '.Children' must have class/struct/union
tree_operations.h(97,66): message : type is '_Add_reference<_Ty,void>::_Rvalue'
tree_operations.h(176,41): error C2976:

'verible::tree_operations_internal::TreeNodeChildrenTraits': too few template arguments
tree_operations.h(101,31): message : see declaration of 'verible::tree_operations_internal::TreeNodeChildrenTraits'
tree_operations.h(176,41): error C3203: 'TreeNodeChildrenTraits': unspecialized class template can't be used as a template argument for template parameter 'Children_', expected a real type
formatter.cc(381,18): error C2664: 'absl::lts_20230125::string_view verible::make_string_view_range(const char *,const char *)': cannot convert argument 1 from 'std::_String_view_iterator<_Traits>' to 'const char *'
 

// #define ABSL_USES_STD_STRING_VIEW 1

template <typename Node,  //
          typename ChildrenType_ = decltype(std::declval<Node>().Children()),
          typename =
              std::void_t<decltype(*std::declval<Node>().Children().begin()),
                          decltype(std::declval<Node>().Children().end())>>
struct TreeNodeChildrenTraits : FeatureTraits {
  // Container type which should be used for storing arrays of detached
  // child nodes. It must be move-assignable to, and move-constructible from,
  // a value returned by `Children()` method.
  using container_type = verible::remove_cvref_t<
      detected_or_t<ChildrenType_, TreeNodeSubnodesType, Node>>;
};

猜你喜欢

转载自blog.csdn.net/durongze/article/details/131657431