mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01:00 
			
		
		
		
	Add CATCH_ATTR_LIFETIMEBOUND macro polyfill over lifetimebound attr
This commit is contained in:
		| @@ -98,6 +98,7 @@ set(IMPL_HEADERS | ||||
|   ${SOURCES_DIR}/internal/catch_jsonwriter.hpp | ||||
|   ${SOURCES_DIR}/internal/catch_lazy_expr.hpp | ||||
|   ${SOURCES_DIR}/internal/catch_leak_detector.hpp | ||||
|   ${SOURCES_DIR}/internal/catch_lifetimebound.hpp | ||||
|   ${SOURCES_DIR}/internal/catch_list.hpp | ||||
|   ${SOURCES_DIR}/internal/catch_logical_traits.hpp | ||||
|   ${SOURCES_DIR}/internal/catch_message_info.hpp | ||||
|   | ||||
| @@ -79,6 +79,7 @@ | ||||
| #include <catch2/internal/catch_jsonwriter.hpp> | ||||
| #include <catch2/internal/catch_lazy_expr.hpp> | ||||
| #include <catch2/internal/catch_leak_detector.hpp> | ||||
| #include <catch2/internal/catch_lifetimebound.hpp> | ||||
| #include <catch2/internal/catch_list.hpp> | ||||
| #include <catch2/internal/catch_logical_traits.hpp> | ||||
| #include <catch2/internal/catch_message_info.hpp> | ||||
|   | ||||
							
								
								
									
										24
									
								
								src/catch2/internal/catch_lifetimebound.hpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								src/catch2/internal/catch_lifetimebound.hpp
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
|  | ||||
| //              Copyright Catch2 Authors | ||||
| // Distributed under the Boost Software License, Version 1.0. | ||||
| //   (See accompanying file LICENSE.txt or copy at | ||||
| //        https://www.boost.org/LICENSE_1_0.txt) | ||||
|  | ||||
| // SPDX-License-Identifier: BSL-1.0 | ||||
|  | ||||
| #ifndef CATCH_LIFETIMEBOUND_HPP_INCLUDED | ||||
| #define CATCH_LIFETIMEBOUND_HPP_INCLUDED | ||||
|  | ||||
| #if !defined( __has_cpp_attribute ) | ||||
| #    define CATCH_ATTR_LIFETIMEBOUND | ||||
| #elif __has_cpp_attribute( msvc::lifetimebound ) | ||||
| #    define CATCH_ATTR_LIFETIMEBOUND [[msvc::lifetimebound]] | ||||
| #elif __has_cpp_attribute( clang::lifetimebound ) | ||||
| #    define CATCH_ATTR_LIFETIMEBOUND [[clang::lifetimebound]] | ||||
| #elif __has_cpp_attribute( lifetimebound ) | ||||
| #    define CATCH_ATTR_LIFETIMEBOUND [[lifetimebound]] | ||||
| #else | ||||
| #    define CATCH_ATTR_LIFETIMEBOUND | ||||
| #endif | ||||
|  | ||||
| #endif // CATCH_LIFETIMEBOUND_HPP_INCLUDED | ||||
| @@ -105,6 +105,7 @@ internal_headers = [ | ||||
|   'internal/catch_jsonwriter.hpp', | ||||
|   'internal/catch_lazy_expr.hpp', | ||||
|   'internal/catch_leak_detector.hpp', | ||||
|   'internal/catch_lifetimebound.hpp', | ||||
|   'internal/catch_list.hpp', | ||||
|   'internal/catch_logical_traits.hpp', | ||||
|   'internal/catch_message_info.hpp', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský