Added a bunch of static asserts to prevent misuse of insert and update

There are quite a few more to be inserted
This commit is contained in:
rbock
2014-02-10 17:56:16 +01:00
parent e4c7b5235f
commit 54687c5e69
8 changed files with 77 additions and 51 deletions

View File

@@ -59,8 +59,8 @@ int main()
interpret(update(t), printer).flush();
interpret(update(t).set(t.gamma = false), printer).flush();
interpret(update(t).set(t.gamma = false).where(t.beta != "transparent"), printer).flush();
#warning make this fail!
interpret(update(t).set(t.beta = f.delta).where(t.beta != "transparent"), printer).flush();
#warning make this fail
interpret(update(t).set(t.beta = "opaque").where(t.beta != f.delta), printer).flush();
auto u = dynamic_update(db, t).dynamic_set(t.gamma = false).dynamic_where();
u.add_set(t.gamma = false);
interpret(u, printer).flush();