60cStr (std::string
const& rendered)
62 return rendered.c_str();
92 constexpr operator CStr()
const {
return str_; }
93 constexpr const char*
c()
const {
return str_; }
98 return not
str_ or 0 == std::strlen(
str_);
102 constexpr size_t length()
const;
132 Symbol (std::string&& definition);
152 explicit operator bool()
const {
return not
empty(); }
164 return a == b ? 0 : std::strncmp (a?a:
"", b?b:
"", len);
175 constexpr inline bool
181 constexpr inline size_t
184 return std::strlen(
c());
207 constexpr inline bool operator== (
Literal s1, std::string
const& s2) {
return s1.operator== (s2.c_str()); }
208 constexpr inline bool operator== (
Symbol s1, std::string
const& s2) {
return s1.operator== (s2.c_str()); }
constexpr bool operator==(CStr cString) const
equality on Literal and Symbol values is defined based on the content, not the address.
constexpr Literal(Literal const &) noexcept=default
constexpr const char * c() const
constexpr Literal & operator=(Literal const &) noexcept=default
constexpr size_t length() const
constexpr Literal() noexcept
empty string by default
constexpr bool empty() const
Token or Atom with distinct identity.
Symbol(Literal const &base, std::string const &ext)
Symbol & operator=(Symbol const &)=default
Symbol(std::string const &str)
Symbol(Literal const &base, CStr ext)
Symbol(Symbol &&)=default
Symbol(Symbol const &)=default
Helper to use a single extension point for specialised hash functions.
constexpr int strNcmp(CStr a, CStr b, size_t len)
Implementation namespace for support and library code.
bool operator==(PtrDerefIter< I1 > const &il, PtrDerefIter< I2 > const &ir)
Supporting equality comparisons...
std::string operator+(std::string str, Literal const &sym)
string concatenation
const size_t STRING_MAX_RELEVANT
safety guard: maximum number of chars to process.
size_t HashVal
a STL compatible hash value
HashVal hash_value(QueryText const &entry)
support using queries in hashtables.
CStr cStr(std::string const &rendered)
convenience shortcut: forced conversion to c-String via string.