Skip to content

Commit 52558d3

Browse files
committed
Merge branch 'master' of github.com:jll63/yomm2
2 parents 292190b + 95c8fd4 commit 52558d3

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ install(EXPORT YOMM2Targets
125125
NAMESPACE YOMM2::
126126
DESTINATION lib/cmake/YOMM2
127127
)
128+
# Configure package config (tells using code about dependencies)
129+
configure_package_config_file(
130+
cmake/YOMM2Config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/YOMM2Config.cmake
131+
INSTALL_DESTINATION lib/cmake/YOMM2
132+
)
128133
# Copy config files to install directory
129134
install(FILES
130135
"${CMAKE_CURRENT_BINARY_DIR}/YOMM2Config.cmake"

cmake/YOMM2Config.cmake.in

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@PACKAGE_INIT@
2+
3+
include(CMakeFindDependencyMacro)
4+
5+
# Tell library users about the Boost dependency
6+
find_dependency(Boost 1.74... REQUIRED)
7+
8+
# Add the targets file
9+
include("${CMAKE_CURRENT_LIST_DIR}/YOMM2Targets.cmake")
10+
11+
check_required_components(YOMM2)

include/yorel/yomm2/core.hpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ struct method<Key, R(A...), Policy> : detail::method_info {
8484
std::uintptr_t
8585
resolve_uni(const ArgType& arg, const MoreArgTypes&... more_args) const;
8686

87-
template<
88-
std::size_t VirtualArg, typename MethodArgList, typename ArgType,
89-
typename... MoreArgTypes>
87+
template<typename MethodArgList, typename ArgType, typename... MoreArgTypes>
9088
std::uintptr_t resolve_multi_first(
9189
const ArgType& arg, const MoreArgTypes&... more_args) const;
9290

@@ -457,7 +455,7 @@ method<Key, R(A...), Policy>::resolve(const ArgType&... args) const {
457455
if constexpr (arity == 1) {
458456
pf = resolve_uni<types<A...>, ArgType...>(args...);
459457
} else {
460-
pf = resolve_multi_first<0, types<A...>, ArgType...>(args...);
458+
pf = resolve_multi_first<types<A...>, ArgType...>(args...);
461459
}
462460

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

529527
template<typename Key, typename R, class Policy, typename... A>
530-
template<
531-
std::size_t VirtualArg, typename MethodArgList, typename ArgType,
532-
typename... MoreArgTypes>
528+
template<typename MethodArgList, typename ArgType, typename... MoreArgTypes>
533529
inline std::uintptr_t method<Key, R(A...), Policy>::resolve_multi_first(
534530
const ArgType& arg, const MoreArgTypes&... more_args) const {
535531

0 commit comments

Comments
 (0)