diff options
Diffstat (limited to 'absl/flags/internal/flag.h')
-rw-r--r-- | absl/flags/internal/flag.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/absl/flags/internal/flag.h b/absl/flags/internal/flag.h index 2e6e6b87..7b056382 100644 --- a/absl/flags/internal/flag.h +++ b/absl/flags/internal/flag.h @@ -22,7 +22,6 @@ #include <atomic> #include <cstring> #include <memory> -#include <new> #include <string> #include <type_traits> #include <typeinfo> @@ -770,7 +769,8 @@ struct FlagRegistrarEmpty {}; template <typename T, bool do_register> class FlagRegistrar { public: - explicit FlagRegistrar(Flag<T>& flag, const char* filename) : flag_(flag) { + constexpr explicit FlagRegistrar(Flag<T>& flag, const char* filename) + : flag_(flag) { if (do_register) flags_internal::RegisterCommandLineFlag(flag_.impl_, filename); } @@ -783,7 +783,7 @@ class FlagRegistrar { // Make the registrar "die" gracefully as an empty struct on a line where // registration happens. Registrar objects are intended to live only as // temporary. - operator FlagRegistrarEmpty() const { return {}; } // NOLINT + constexpr operator FlagRegistrarEmpty() const { return {}; } // NOLINT private: Flag<T>& flag_; // Flag being registered (not owned). |