This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <stdexcept> | |
template <class T> | |
struct Maybe { | |
Maybe( const T& val ) : val_(val), valid_(true) { } | |
Maybe() : valid_(false) { } | |
const T& get() const { | |
if (valid_) return val_; | |
throw std::logic_error("lol type systems"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% @author David Reid <[email protected]> | |
%% @copyright 2011 Mochi Media, Inc. | |
%% @doc Stub MochiWeb HTTP Request module implementation for testing. | |
-module(stub_mochiweb_request). | |
-record(stub_mochiweb_request, {options, headers, response_pid}). | |
%% Constructors and static method exports |