enable.h 660 B

1234567891011
  1. #pragma once
  2. namespace NAllocSetup {
  3. // The IsEnabledByDefault variable should always have static initialization. It is safe to use it in initialization
  4. // of global and thread-local objects because standard guarantees that static initalization always takes place
  5. // before dynamic initialization:
  6. // * C++11 3.6.2.2: "Static initialization shall be performed before any dynamic initialization takes place."
  7. // * C++17 6.6.2.2: "All static initialization strongly happens before any dynamic initialization."
  8. // On practice a constant value is just baked into the executable during the linking.
  9. extern const bool EnableByDefault;
  10. }