Fix storage_for and revert one changed macro to correct constexpr behavior
This commit is contained in:
parent
2578895b40
commit
99b0ac2ed3
@ -70,6 +70,7 @@ install(FILES ${LIBREXY_BUILT_LIBRARY_HEADERS} DESTINATION "${CMAKE_INSTALL_INCL
|
||||
install(DIRECTORY "include/rexy/detail" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/rexy" FILES_MATCHING PATTERN "*.hpp" PATTERN "*.tpp")
|
||||
install(DIRECTORY "include/rexy/cx" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/rexy" FILES_MATCHING PATTERN "*.hpp" PATTERN "*.tpp")
|
||||
install(DIRECTORY "include/rexy/compat" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/rexy" FILES_MATCHING PATTERN "*.hpp" PATTERN "*.tpp")
|
||||
install(DIRECTORY "include/rexy/concepts" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/rexy" FILES_MATCHING PATTERN "*.hpp" PATTERN "*.tpp")
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/pc/librexy.pc.cmake.in"
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
#ifndef REXY_COMPAT_CPP20_HPP
|
||||
#define REXY_COMPAT_CPP20_HPP
|
||||
|
||||
#ifdef __cpp_consteval
|
||||
#if __cplusplus >= 202002L
|
||||
#define REXY_CPP20_CONSTEXPR constexpr
|
||||
#define REXY_CPP20_CONSTEVAL consteval
|
||||
#else //__cpp_consteval
|
||||
|
||||
@ -58,7 +58,7 @@ namespace rexy{
|
||||
}
|
||||
}
|
||||
template<class T>
|
||||
constexpr storage_for<T>::~storage_for(void)noexcept(std::is_nothrow_destructible<value_type>::value){
|
||||
REXY_CPP20_CONSTEXPR storage_for<T>::~storage_for(void)noexcept(std::is_nothrow_destructible<value_type>::value){
|
||||
if(m_dirty){
|
||||
destroy();
|
||||
}
|
||||
@ -185,7 +185,7 @@ namespace rexy{
|
||||
m_dirty = 1;
|
||||
}
|
||||
template<class T>
|
||||
constexpr storage_for<T>::~storage_for(void)noexcept(std::is_nothrow_destructible<value_type>::value){
|
||||
REXY_CPP20_CONSTEXPR storage_for<T>::~storage_for(void)noexcept(std::is_nothrow_destructible<value_type>::value){
|
||||
if(m_dirty){
|
||||
destroy();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user