Skip to content

Commit 803ebf7

Browse files
vendethielingydotnet
authored andcommitted
small adjustements
1 parent 5681683 commit 803ebf7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/cpp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ext/nlohmann/json.hpp:
1111
curl -s https://raw.githubusercontent.com/nlohmann/json/develop/single_include/nlohmann/json.hpp > $@
1212

1313
clean::
14-
rm -fr ext
14+
rm -fr ext/nlohmann/json.hpp
1515

1616
#------------------------------------------------------------------------------
1717
include ../../.makefile/runtime.mk

src/cpp/lib/testml/bridge.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ namespace testml {
8888
std::unordered_map<std::string, std::unique_ptr<details::FnHolder>> _fns;
8989

9090
public:
91+
// PMF version, takes the object to call the function on
9192
template<typename BridgeT, typename Fn>
9293
auto bind(std::string const& name, BridgeT* obj, Fn fn)
9394
-> typename std::enable_if<std::is_member_function_pointer<Fn>::value, void>::type {
@@ -97,6 +98,7 @@ namespace testml {
9798
_fns[name] = std::make_unique<HolderType>(obj, std::move(fn));
9899
}
99100

101+
// any other candidate
100102
template<typename Fn>
101103
auto bind(std::string const& name, Fn fn)
102104
-> typename std::enable_if<!std::is_member_function_pointer<Fn>::value, void>::type {

0 commit comments

Comments
 (0)