diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-10-28 17:56:30 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-11-11 17:46:11 +0200 |
commit | 1ce84922e3008cad6cf1b9056b705f2642bd3772 (patch) | |
tree | 0dde62654e56c8e94ebf0cef83181ea9ddc99faf /web/module | |
parent | 4993f11bf464c9aee0e3fd5965f4a8258cbe8b30 (diff) |
WEB pages re-styling
Diffstat (limited to 'web/module')
-rw-r--r-- | web/module | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -14,6 +14,7 @@ #include <stdexcept> // runtime_error #include <butl/path> +#include <butl/optional> namespace web { @@ -57,15 +58,18 @@ namespace web sequence_error (std::string d): std::runtime_error (std::move (d)) {} }; + template <typename T> + using optional = butl::optional<T>; + struct name_value { // These should eventually become string_view's. // std::string name; - std::string value; + optional<std::string> value; name_value () {} - name_value (std::string n, std::string v) + name_value (std::string n, optional<std::string> v) : name (std::move (n)), value (std::move (v)) {} }; |