The motivation for this change is to make downstream code more in-line with how it would be written when using a std::string, and to enable patterns like std::unordered_map<ComponentPath, OpenSim::Joint const*> jointLookup etc.
Brief summary of changes
Added ComponentPath::root(), which returns a ComponentPath equivalent to "/"
ComponentPath is now less-than (<) comparable, making it usable in (e.g.) std::map
ComponentPath now has a std::hash<T> implementation, making it usable in (e.g.) std::unordered_map
Added .clear() and .empty() to ComponentPath for more parity with std::string's semantics
The motivation for this change is to make downstream code more in-line with how it would be written when using a
std::string
, and to enable patterns likestd::unordered_map<ComponentPath, OpenSim::Joint const*> jointLookup
etc.Brief summary of changes
ComponentPath::root()
, which returns aComponentPath
equivalent to "/"ComponentPath
is now less-than (<
) comparable, making it usable in (e.g.)std::map
ComponentPath
now has astd::hash<T>
implementation, making it usable in (e.g.)std::unordered_map
.clear()
and.empty()
toComponentPath
for more parity withstd::string
's semanticsTesting I've completed
CHANGELOG.md (choose one)
This change is