source_location-inl.h 730 B

12345678910111213141516171819202122232425
  1. #ifndef SOURCE_LOCATION_INL_H_
  2. #error "Direct inclusion of this file is not allowed, include source_location.h"
  3. // For the sake of sane code completion.
  4. #include "source_location.h"
  5. #endif
  6. namespace NYT {
  7. ////////////////////////////////////////////////////////////////////////////////
  8. inline TSourceLocation::TSourceLocation(const char* fileName, int line)
  9. : FileName_(fileName)
  10. , Line_(line)
  11. { }
  12. #ifdef __cpp_lib_source_location
  13. inline TSourceLocation::TSourceLocation(const std::source_location& location)
  14. : FileName_(location.file_name())
  15. , Line_(location.line())
  16. { }
  17. #endif // __cpp_lib_source_location
  18. ////////////////////////////////////////////////////////////////////////////////
  19. } // namespace std