如何初始化boost :: edge_weight_t类型在vs vs c 上

how to initialize boost::edge_weight_t type on VS C++

本文关键字:vs 类型 初始化 edge weight boost      更新时间:2023-10-16

以下代码使用vs vs vs c 编译此警告会导致EXER错误。

     boost::edge_weight_t EdgeWeightPropType;

警告是:

     warning C4700 uninitialized local variable EdgeWeightPropType

注意:edge_weight_t定义如下:

  enum edge_weight_t{ edge_weight };
    template <> struct property_kind<edge_weight_t> {
     typedef edge_property_tag type;
  };

如何避免此变量或初始化此变量?

edgeweightproptype可以初始化如下:

 boost::edge_weight_t  EdgeWeightPropType = boost::edge_weight;