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

Commit cd3f710

Browse files
author
Ian Sturdy
authored
Document that Measure/TagKey have trivial destructors. (#160)
Inspired by concern about whether the style guide allowed our recommended function-wrapping-a-static style: grpc/grpc#15196.
1 parent c6cfa85 commit cd3f710

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

opencensus/stats/measure.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ namespace stats {
2727
// that measure can retrieve the data for those events. Measures can only be
2828
// obtained from the static functions MeasureRegistry::Register() and
2929
// MeasureRegistry::GetMeasureByName().
30-
// Measure is immutable, and should be passed by value.
30+
// Measure is immutable, and should be passed by value. It has a trivial
31+
// destructor and can be safely used as a local static variable.
3132
template <typename MeasureT>
3233
class Measure final {
3334
public:

opencensus/stats/tag_key.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
namespace opencensus {
2525
namespace stats {
2626

27-
// TagKey is a lightweight, immutable representation of a tag key.
27+
// TagKey is a lightweight, immutable representation of a tag key. It has a
28+
// trivial destructor and can be safely used as a local static variable.
2829
class TagKey final {
2930
public:
3031
// Registers a tag key with 'name'. Registering the same name twice produces

0 commit comments

Comments
 (0)