catch_version.hpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright Catch2 Authors
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE_1_0.txt or copy at
  4. // https://www.boost.org/LICENSE_1_0.txt)
  5. // SPDX-License-Identifier: BSL-1.0
  6. #ifndef CATCH_VERSION_HPP_INCLUDED
  7. #define CATCH_VERSION_HPP_INCLUDED
  8. #include <iosfwd>
  9. namespace Catch {
  10. // Versioning information
  11. struct Version {
  12. Version( Version const& ) = delete;
  13. Version& operator=( Version const& ) = delete;
  14. Version( unsigned int _majorVersion,
  15. unsigned int _minorVersion,
  16. unsigned int _patchNumber,
  17. char const * const _branchName,
  18. unsigned int _buildNumber );
  19. unsigned int const majorVersion;
  20. unsigned int const minorVersion;
  21. unsigned int const patchNumber;
  22. // buildNumber is only used if branchName is not null
  23. char const * const branchName;
  24. unsigned int const buildNumber;
  25. friend std::ostream& operator << ( std::ostream& os, Version const& version );
  26. };
  27. Version const& libraryVersion();
  28. }
  29. #endif // CATCH_VERSION_HPP_INCLUDED