Skip to content
Snippets Groups Projects
Commit f5ae9bb4 authored by scott snyder's avatar scott snyder
Browse files

TrigExPartialEB: Work around clang 9 bug.

Was seeing clang 9 crash on some uses of std::string_view::find.
Can work around this by copying the string_view to a string.
parent 805a6e70
No related branches found
No related tags found
No related merge requests found
......@@ -281,7 +281,13 @@ StatusCode MTCalibPebHypoTool::decide(const MTCalibPebHypoTool::Input& input) co
}
// =============================================================================
MTCalibPebHypoTool::ROBRequestInstruction::ROBRequestInstruction(std::string_view str) {
MTCalibPebHypoTool::ROBRequestInstruction::ROBRequestInstruction(std::string_view strv) {
// Work around a bug in clang 9.
#if __clang_major__ == 9
std::string str (strv.begin(), strv.end());
#else
const std::string_view& str = strv;
#endif
if (str.find(":ADD:")!=std::string_view::npos) type = ROBRequestInstruction::ADD;
else if (str.find(":GET:")!=std::string_view::npos) type = ROBRequestInstruction::GET;
else if (str.find(":COL:")!=std::string_view::npos) type = ROBRequestInstruction::COL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment