diff --git a/DataStructures/StaticGraph.h b/DataStructures/StaticGraph.h index e7807ccff..0376f35ba 100644 --- a/DataStructures/StaticGraph.h +++ b/DataStructures/StaticGraph.h @@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include #include template class StaticGraph @@ -55,7 +56,9 @@ template class StaticGraph EdgeDataT data; NodeIterator source; NodeIterator target; - InputEdge(NodeIterator source, NodeIterator target, EdgeDataT data) : source(source), target(target), data(data) { } + + template + InputEdge(NodeIterator source, NodeIterator target, Ts &&...data) : source(source), target(target), data(std::forward(data)...) { } bool operator<(const InputEdge &right) const { if (source != right.source)