Commit 6407397
clang-19 build: workaround narrowing-const-reference error
```
In file included from build/cythonized/sage/graphs/base/boost_graph.cpp:1278:
build/cythonized/sage/graphs/base/boost_interface.cpp:119:34: error: non-constant-expression cannot be narrowed from type 'value_type' (aka 'unsigned long') to 'int' in initializer list [-Wc++11-narrowing-const-reference]
119 | to_return.push_back({index[boost::source(*ei, graph)],
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build/cythonized/sage/graphs/base/boost_graph.cpp:17503:29: note: in instantiation of member function 'BoostGraph<boost::vecS, boost::vecS, boost::directedS, boost::vecS, boost::property<boost::edge_weight_t, double>>::edge_list' requested here
17503 | __pyx_v_edges = __pyx_v_g.edge_list();
^
```
https://clang.llvm.org/docs/DiagnosticsReference.html#wc-11-narrowing-const-reference
To silence the error assign to a v_index outside of the
initializer list.1 parent 21d287c commit 6407397
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| |||
0 commit comments