const noexcept override try
hennna opened this issue · 4 comments
hennna commented
I'm getting compilation error "expected ';' at end of declaration list" from the following line of code: https://github.com/opentracing/opentracing-cpp/blob/master/include/opentracing/tracer.h#L219
I'm not familiar with the expected behavior of this code. Is wrapping with curly braces an option?
void Apply(StartSpanOptions& options) const noexcept override {
try {
if (referenced_) options.references.emplace_back(type_, referenced_);
} catch (const std::bad_alloc&) {
// Ignore reference if memory can't be allocated for it.
}
}
rnburn commented
Curious, which compiler gives that error? It should be valid C++, but your snippet behaves the same so I'm fine changing to that.
hennna commented
I'm using google's internal version of bazel. I believe it uses clang.