diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-19 19:54:46 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-19 19:54:46 +0200 |
commit | 7691269b7b9ddf6fbed53048b9a5ae85d58fd4be (patch) | |
tree | fa9f1bc9239e87c41a01e4075051632500062bab /c/pl.h | |
parent | ff53b8efce55f5668af61f13b656fdb54dee7755 (diff) | |
download | EpisodeBrowser-7691269b7b9ddf6fbed53048b9a5ae85d58fd4be.tar.gz |
Formatting.
Diffstat (limited to 'c/pl.h')
-rw-r--r-- | c/pl.h | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -67,21 +67,21 @@ inline int PlGet(const term_t t, char** const x) { return PL_get_atom_chars(t, x inline int PlGet(const term_t t, wchar_t** const x) { size_t len; return PL_get_wchars(t, &len, x, CVT_ATOM); } /* Helper templates for Plx, Pl. */ -template <typename T> +template <class T> int PlPutv(const term_t t, T arg) { return PlPut(t, arg); } -template <typename T, typename ...R> +template <class T, class... R> int PlPutv(const term_t t, T arg, R... rest) { return PlPut(t, arg)? PlPutv(t+1, rest...): 0; } -template <typename T> +template <class T> int PlGetv(const term_t t, T arg) { return PlGet(t, arg); } -template <typename T, typename ...R> +template <class T, class... R> int PlGetv(const term_t t, T arg, R... rest) { return PlGet(t, arg)? PlGetv(t+1, rest...): 0; } -template <typename T> +template <class T> int Countv(const int i, T) { return i+1; } -template <typename T, typename ...R> +template <class T, class... R> int Countv(const int i, T, R... rest) { return Countv(i+1, rest...); } /* Call Prolog predicate, propagating Prolog exceptions. */ -template <typename ...T> +template <class... T> int Plx(const char* const szMod, const char* const szPred, T... args) { Frame f; @@ -95,7 +95,7 @@ int Plx(const char* const szMod, const char* const szPred, T... args) } /* Call Prolog predicate, ignoring Prolog exceptions. */ -template <typename ...T> +template <class... T> int Pl(const char* const szMod, const char* const szPred, T... args) { try { |