Skip to content

Commit

Permalink
ignore virtual dtor warning for CustomTags
Browse files Browse the repository at this point in the history
  • Loading branch information
odygrd committed Mar 15, 2024
1 parent aeccdb3 commit 663e5c8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
the terminal while the logger is running. ([#395](https://github.com/odygrd/quill/issues/395))
- Ensure that after a logger is removed, there are no subsequent calls to the Handler's flush() or run_loop(), provided
the Handler is not shared. ([#395](https://github.com/odygrd/quill/issues/395))
- Ignore the virtual destructor missing warning for the `CustomTags`
class. ([#402](https://github.com/odygrd/quill/pull/402))
- Update bundled `libfmt` to `v10.2.1`

## v3.6.0
Expand Down
19 changes: 19 additions & 0 deletions quill/include/quill/detail/misc/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,17 @@ enum TimestampClockType : uint8_t
Custom
};

#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#elif defined(_WIN32)
#pragma warning(push)
#pragma warning(disable : 4265) // Disable warning about non-virtual destructor in MSVC
#endif

/**
* CustomTags class that can be used for _WITH_TAGS log macros
*/
Expand All @@ -218,6 +229,14 @@ class CustomTags
virtual void format(std::string&) const = 0;
};

#if defined(__clang__)
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#elif defined(_WIN32)
#pragma warning(pop)
#endif

/**
* backend worker thread error handler type
*/
Expand Down

0 comments on commit 663e5c8

Please sign in to comment.