rtbkit/rtbkit — pull request #69 by LEW21 (2013-07-26 15:36:30+00:00)
Title: Refactor the OpenRTB structures.

Wow.. That's a large pull request.

I've refactored all the OpenRTB structures to stop using Tagged*, and use std::optional<> (from C++14), defaulted<> (imitating non-static data member initializers from C++11), enum classes, std::string instead of Utf8String (as std::string in C++11's terminology is supposed to be the right class for storing UTF-8 strings), and usually std::set<> instead of compact_vector<>.

The changes make OpenRTB structures more semantically correct, give them better API, and simplify adding support for new exchanges (as describing and converting from their structures becomes much easier with sane value types instead of the Tagged mess).

Also, optional<> "knows" much better if it's set or not than Tagged* values, and forces programmer to handle unknowness correctly. So upgrading existing out-of-tree components to work with the changed structures might fix a lot of small bugs in those components - and will prevent a lot of them in components that've yet to be written.

All those changes are based on https://github.com/rtbkit/rtbkit/pull/65 and https://github.com/datacratic/soa/pull/22 so they should probably get merged first. Then I will rebase my work on the current master (and drop the Temporary:... one).

Have a nice review :D