libqasm
library for handling cQASM files
cqasm-v1-types.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include "cqasm-v1-types-gen.hpp"
9 
10 namespace cqasm {
11 namespace v1 {
12 
16 namespace types {
17 
22 
27 
51 Types from_spec(const std::string &spec);
52 
57 bool type_check(const Type &expected, const Type &actual);
58 
62 std::ostream &operator<<(std::ostream &os, const Type &type);
63 
67 std::ostream &operator<<(std::ostream &os, const Types &types);
68 
69 } // namespace types
70 } // namespace v1
71 } // namespace cqasm
Types from_spec(const std::string &spec)
Constructs a set of types from a shorthand string representation.
Toplevel namespace with entry points for the new API.
Header file for the various classes representing the types of values available in cQASM...
Namespace for the "new" cQASM 1.x API.
tree::One< TypeBase > Type
A cQASM type.
::tree::base::Any< T > Any
Definition: cqasm-tree.hpp:29
bool type_check(const Type &expected, const Type &actual)
Returns whether the actual type matches the constraints of the expected type.
tree::Any< TypeBase > Types
Zero or more cQASM types.
std::ostream & operator<<(std::ostream &os, const Type &type)
Stream << overload for a single type.
::tree::base::One< T > One
Definition: cqasm-tree.hpp:26