Skip to content

Make Relations constructors from single size_t explicit

Gerhard Raven requested to merge explicit_constructors into master

This avoids implicit conversions from size_t to Relations, which can occur eg. when doing: std::vector<Relations> r{ 5, {} }; to create a vector of 5 default constructed relations -- but without this MR, one now gets a vector of 2 relations, where the first one has reserved memory for 5 entries instead... hopefully this will avoid someone from getting confused in future, and waisting their time to figure out what is going on.

Edited by Gerhard Raven

Merge request reports