Dynamic API almost done. Reading is complete.

Still need to flesh out the writing part of the API. init functions
are making it very messy at the moment.
This commit is contained in:
Jason Paryani
2013-06-28 01:04:01 -07:00
parent 40a16470cf
commit 08ad9e571f
4 changed files with 343 additions and 15 deletions

11
fixMaybe.h Normal file
View File

@@ -0,0 +1,11 @@
#include "kj/common.h"
#include <stdexcept>
template<typename T>
T fixMaybe(::kj::Maybe<T> val) {
KJ_IF_MAYBE(new_val, val) {
return *new_val;
} else {
throw std::invalid_argument("member was null");
}
}