Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Error compiling with clang 13 #464

Open
tzovas opened this issue Mar 22, 2022 · 0 comments
Open

Error compiling with clang 13 #464

tzovas opened this issue Mar 22, 2022 · 0 comments

Comments

@tzovas
Copy link

tzovas commented Mar 22, 2022

I get an error

external/io_opencensus_cpp/opencensus/exporters/stats/prometheus/prometheus_exporter.h:44:51: error: non-virtual member function marked 'override' hides virtual member function
  std::vector<prometheus::MetricFamily> Collect() override;
                                                  ^
bazel-out/darwin-fastbuild/bin/external/com_github_jupp0r_prometheus_cpp/core/_virtual_includes/core/prometheus/collectable.h:22:37: note: hidden overloaded virtual function 'prometheus::Collectable::Collect' declared here: different qualifiers ('const' vs unqualified)
  virtual std::vector<MetricFamily> Collect() const = 0;
                                    ^
external/io_opencensus_cpp/opencensus/exporters/stats/prometheus/prometheus_exporter.h:42:7: warning: abstract class is marked 'final' [-Wabstract-final-class]
class PrometheusExporter final : public ::prometheus::Collectable {
      ^
bazel-out/darwin-fastbuild/bin/external/com_github_jupp0r_prometheus_cpp/core/_virtual_includes/core/prometheus/collectable.h:22:37: note: unimplemented pure virtual method 'Collect' in 'PrometheusExporter'
  virtual std::vector<MetricFamily> Collect() const = 0;
                                    ^

A possible reason is that PrometheusExporter::Collect() is not marked as virtual.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant