summaryrefslogtreecommitdiff
path: root/src/test-literal.cc
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2022-02-11 16:50:54 -0800
committerGitHub <noreply@github.com>2022-02-11 16:50:54 -0800
commit30fe5551cf983eb9bd194117caa3f0f4f2bbe865 (patch)
tree03cef12603ea5010083f01263caf19ae94824d4f /src/test-literal.cc
parent09c40635207d42dd30ffaca22477fd3491dd9e7d (diff)
downloadwabt-30fe5551cf983eb9bd194117caa3f0f4f2bbe865.tar.gz
wabt-30fe5551cf983eb9bd194117caa3f0f4f2bbe865.tar.bz2
wabt-30fe5551cf983eb9bd194117caa3f0f4f2bbe865.zip
Use C++17 string_view (#1826)
Now that we have C++17 we don't need our own string_view class anymore. Depends on #1825
Diffstat (limited to 'src/test-literal.cc')
-rw-r--r--src/test-literal.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/test-literal.cc b/src/test-literal.cc
index 4a309d6e..f1ed6313 100644
--- a/src/test-literal.cc
+++ b/src/test-literal.cc
@@ -33,11 +33,12 @@ enum ParseIntTypeCombo {
Both,
};
-template <typename T, typename F>
-void AssertIntEquals(T expected,
- const char* s,
- F&& parse_int,
- ParseIntTypeCombo parse_type = Both) {
+template <typename T>
+void AssertIntEquals(
+ T expected,
+ const char* s,
+ Result (*parse_int)(const char*, const char*, T*, ParseIntType),
+ ParseIntTypeCombo parse_type = Both) {
const char* const end = s + strlen(s);
T actual;
if (parse_type == UnsignedOnly || parse_type == Both) {