Fix copyright lines
[folly.git] / folly / experimental / logging / LogCategory.h
index e861252699979a87cb842a248c5e69c620e5d655..6ea06cef48d7515b05a175b6f6093f815d91fe4d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004-present Facebook, Inc.
+ * Copyright 2017-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -221,6 +221,12 @@ class LogCategory {
  private:
   enum : uint32_t { FLAG_INHERIT = 0x80000000 };
 
+  // FLAG_INHERIT is the stored in the uppermost bit of the LogLevel field.
+  // assert that it does not conflict with valid LogLevel values.
+  static_assert(
+      static_cast<uint32_t>(LogLevel::MAX_LEVEL) < FLAG_INHERIT,
+      "The FLAG_INHERIT bit must not be set in any valid LogLevel value");
+
   // Forbidden copy constructor and assignment operator
   LogCategory(LogCategory const&) = delete;
   LogCategory& operator=(LogCategory const&) = delete;