Skip to content

Instantly share code, notes, and snippets.

@mirth
mirth / tuple_to_strings.cpp
Created April 20, 2016 21:20 — forked from mumreg/tuple_to_strings.cpp
Strings formating approach
#include <iostream>
#include <cstddef>
#include <tuple>
#include <utility>
#include <sstream>
#include <vector>
template <typename Tuple, typename F, std::size_t ...Indices>
void for_each_impl(Tuple&& tuple, F&& f, std::index_sequence<Indices...>) {
using swallow = int[];
@mirth
mirth / lexer.rb
Last active December 11, 2015 22:49 — forked from dustalov/lexer.rb
# encoding: utf-8
# Processor of Link Grammar for Russian output.
#
class LinkParser::Lexer
# This exception raises when link grammar is invalid and Lexer
# is unable to understand the output.
#
class InvalidLinkGrammar < RuntimeError
attr_reader :input