-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c4eac7
commit b47ad45
Showing
12 changed files
with
163 additions
and
63 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "utils.hpp" | ||
|
||
namespace testml { | ||
namespace utils { | ||
|
||
bool is_all_lowercase(std::string const& s) { | ||
return std::all_of(s.begin(), s.end(), | ||
[](char c) { return std::islower(c); } | ||
); | ||
} | ||
|
||
bool is_all_uppercase(std::string const& s) { | ||
return std::all_of(s.begin(), s.end(), | ||
[](char c) { return std::isupper(c); } | ||
); | ||
} | ||
|
||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
|
||
namespace testml { | ||
namespace utils { | ||
|
||
bool is_all_lowercase(std::string const& s); | ||
bool is_all_uppercase(std::string const& s); | ||
|
||
template<typename T> | ||
struct remove_first_type | ||
{ | ||
}; | ||
|
||
template<typename T, typename... Ts> | ||
struct remove_first_type<std::tuple<T, Ts...>> | ||
{ | ||
typedef std::tuple<Ts...> type; | ||
}; | ||
|
||
template<> | ||
struct remove_first_type<std::tuple<>> | ||
{ | ||
typedef std::tuple<> type; | ||
}; | ||
|
||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "testml-bridge.hpp" | ||
|
||
TestMLBridge::TestMLBridge() { | ||
bind("add", this, &TestMLBridge::add); | ||
bind("sub", [](int a, int b) { | ||
return a - b; | ||
}); | ||
} | ||
|
||
int TestMLBridge::add(int a, int b) { | ||
return a + b; | ||
} | ||
|
Empty file.
Oops, something went wrong.