Windows compilation fixes#254
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors and improves the handling of C++23 flat containers (
std::flat_mapandstd::flat_set) support in LuaBridge. The changes split the previous combined detection macro into separate macros for flat maps and flat sets, update documentation and tests accordingly, and make several minor code quality improvements. The most important changes are summarized below.C++23 Flat Container Feature Detection and Support
Split the previous
LUABRIDGE_HAS_CXX23_FLAT_CONTAINERSmacro into two independent feature macros:LUABRIDGE_HAS_CXX23_FLAT_MAPandLUABRIDGE_HAS_CXX23_FLAT_SET, with separate detection logic and disable macros. This allows finer-grained control and avoids enabling flat set support when only flat map is available, and vice versa. (Distribution/LuaBridge/LuaBridge.h,Source/LuaBridge/detail/Config.h,Source/LuaBridge/FlatMap.h,Source/LuaBridge/FlatSet.h,Tests/Source/FlatMapTests.cpp,Tests/Source/FlatSetTests.cpp, [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]Updated all relevant documentation (
README.md,Manual.md) to reflect the new macros and document their usage and requirements separately for flat maps and flat sets. ([[1]](https://github.com/kunitoki/LuaBridge3/pull/254/files#diff-30285cd92fd0939f0eb62dda195f7e2e011c5faf976e86ee95fb2deca76f58e7L96-R98),[[2]](https://github.com/kunitoki/LuaBridge3/pull/254/files#diff-30285cd92fd0939f0eb62dda195f7e2e011c5faf976e86ee95fb2deca76f58e7L1466-R1468),[[3]](https://github.com/kunitoki/LuaBridge3/pull/254/files#diff-30285cd92fd0939f0eb62dda195f7e2e011c5faf976e86ee95fb2deca76f58e7L2533-R2562), [4]Code Quality and Safety Improvements
Added
[[maybe_unused]]attributes to unused parameters to suppress compiler warnings and clarify intent in exception-related helper functions. (Distribution/LuaBridge/LuaBridge.h,Source/LuaBridge/detail/Coroutine.h,Source/LuaBridge/detail/Expected.h, [1] [2] [3] [4]Updated SFINAE logic in
functor_traits_implto exclude move-only functions from certain template specializations, improving correctness. (Distribution/LuaBridge/LuaBridge.h,Source/LuaBridge/detail/FuncTraits.h, [1] [2]Minor Fixes and Cleanups
Removed a call to
detail::unreachable()after alua_errorcall, which is unreachable code. (Distribution/LuaBridge/LuaBridge.h,Source/LuaBridge/detail/LuaHelpers.h, [1] [2]Updated CMake configuration to set the correct compile option for C++23 and later with MSVC. (
CMakeLists.txt, CMakeLists.txtR14-R18)Adjusted test code to use more descriptive types and match the new macro names. (
Tests/Source/FlatMapTests.cpp, Tests/Source/FlatMapTests.cppL171-R185)These changes improve feature detection, documentation clarity, and code quality for C++23 flat container support in LuaBridge.