Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jll63/yomm2
Browse files Browse the repository at this point in the history
  • Loading branch information
jll63 committed Nov 28, 2024
2 parents 292190b + 95c8fd4 commit 52558d3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ install(EXPORT YOMM2Targets
NAMESPACE YOMM2::
DESTINATION lib/cmake/YOMM2
)
# Configure package config (tells using code about dependencies)
configure_package_config_file(
cmake/YOMM2Config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/YOMM2Config.cmake
INSTALL_DESTINATION lib/cmake/YOMM2
)
# Copy config files to install directory
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/YOMM2Config.cmake"
Expand Down
11 changes: 11 additions & 0 deletions cmake/YOMM2Config.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@PACKAGE_INIT@

include(CMakeFindDependencyMacro)

# Tell library users about the Boost dependency
find_dependency(Boost 1.74... REQUIRED)

# Add the targets file
include("${CMAKE_CURRENT_LIST_DIR}/YOMM2Targets.cmake")

check_required_components(YOMM2)
10 changes: 3 additions & 7 deletions include/yorel/yomm2/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ struct method<Key, R(A...), Policy> : detail::method_info {
std::uintptr_t
resolve_uni(const ArgType& arg, const MoreArgTypes&... more_args) const;

template<
std::size_t VirtualArg, typename MethodArgList, typename ArgType,
typename... MoreArgTypes>
template<typename MethodArgList, typename ArgType, typename... MoreArgTypes>
std::uintptr_t resolve_multi_first(
const ArgType& arg, const MoreArgTypes&... more_args) const;

Expand Down Expand Up @@ -457,7 +455,7 @@ method<Key, R(A...), Policy>::resolve(const ArgType&... args) const {
if constexpr (arity == 1) {
pf = resolve_uni<types<A...>, ArgType...>(args...);
} else {
pf = resolve_multi_first<0, types<A...>, ArgType...>(args...);
pf = resolve_multi_first<types<A...>, ArgType...>(args...);
}

return reinterpret_cast<function_pointer_type>(pf);
Expand Down Expand Up @@ -527,9 +525,7 @@ inline std::uintptr_t method<Key, R(A...), Policy>::resolve_uni(
}

template<typename Key, typename R, class Policy, typename... A>
template<
std::size_t VirtualArg, typename MethodArgList, typename ArgType,
typename... MoreArgTypes>
template<typename MethodArgList, typename ArgType, typename... MoreArgTypes>
inline std::uintptr_t method<Key, R(A...), Policy>::resolve_multi_first(
const ArgType& arg, const MoreArgTypes&... more_args) const {

Expand Down

0 comments on commit 52558d3

Please sign in to comment.