summaryrefslogtreecommitdiff
path: root/bnf/common.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'bnf/common.hpp')
-rw-r--r--bnf/common.hpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/bnf/common.hpp b/bnf/common.hpp
new file mode 100644
index 00000000..2a74a7ba
--- /dev/null
+++ b/bnf/common.hpp
@@ -0,0 +1,21 @@
+#pragma once
+
+namespace std {
+
+template <typename T>
+inline ::std::ostream& operator<<(::std::ostream& os, const ::std::vector<T>& v) {
+ if( v.size() > 0 )
+ {
+ bool is_first = true;
+ for( const auto& i : v )
+ {
+ if(!is_first)
+ os << ", ";
+ is_first = false;
+ os << i;
+ }
+ }
+ return os;
+}
+
+};