aboutsummaryrefslogtreecommitdiffstats
path: root/utility.h
diff options
context:
space:
mode:
authoripknHama <ipknhama@gmail.com>2014-04-15 05:35:04 +0900
committeripknHama <ipknhama@gmail.com>2014-04-15 05:35:04 +0900
commitdc5033203302a6b825b681ab2b07604e9c59bd5b (patch)
treed159956dcc93802185843c8ef50ab9fe81de4440 /utility.h
parentf8ee6d4dadbc8f28095346b91d0a3ed3ed495c4f (diff)
downloadcrow-dc5033203302a6b825b681ab2b07604e9c59bd5b.tar.gz
crow-dc5033203302a6b825b681ab2b07604e9c59bd5b.zip
update makefile, add more test
Diffstat (limited to 'utility.h')
-rw-r--r--utility.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/utility.h b/utility.h
index f824d61..c829b85 100644
--- a/utility.h
+++ b/utility.h
@@ -34,6 +34,9 @@ namespace flask
return begin_;
}
+ constexpr const char* begin() const { return begin_; }
+ constexpr const char* end() const { return begin_ + size_; }
+
constexpr unsigned size() const {
return size_;
}
@@ -59,11 +62,6 @@ namespace flask
is_valid(s, i+1, f);
}
- constexpr int count(const_str s, unsigned i=0)
- {
- return i == s.size() ? 0 : s[i] == '<' ? 1+count(s,i+1) : count(s,i+1);
- }
-
constexpr bool is_equ_n(const_str a, unsigned ai, const_str b, unsigned bi, unsigned n)
{
return