halcheck 1.0
Loading...
Searching...
No Matches
lib/atom

Identifier types with constant time equality comparison and hashing. More...

Classes

class  halcheck::lib::symbol
 A symbol is conceptually a std::string with constant time equality comparison and hashing. More...
 
class  halcheck::lib::number
 A number is conceptually a signed integer with constant time equality comparison and hashing. More...
 
struct  std::hash< halcheck::lib::symbol >
 The std::hash specialization for halcheck::lib::symbol. More...
 
struct  std::hash< halcheck::lib::number >
 The std::hash specialization for halcheck::lib::number. More...
 

Typedefs

using halcheck::lib::atom = lib::variant<lib::symbol, lib::number>
 An atom is either a symbol or a number.
 

Functions

template<typename T , T... Data>
lib::symbol halcheck::lib::literals::operator""_s ()
 String literal constructor for lib::symbol.
 

Detailed Description

Identifier types with constant time equality comparison and hashing.

Example
using namespace halcheck;
using namespace halcheck::lib::literals;
lib::atom x = "example 1"_s;
lib::atom y = "example 2"_s;
lib::atom z = "example 1"_s;
lib::atom w = 3;
assert(x != y);
assert(x == z);
assert(x != w);
lib::variant< lib::symbol, lib::number > atom
An atom is either a symbol or a number.
Definition atom.hpp:194