aboutsummaryrefslogtreecommitdiff
path: root/web/module
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-10-28 17:56:30 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-11-11 17:46:11 +0200
commit1ce84922e3008cad6cf1b9056b705f2642bd3772 (patch)
tree0dde62654e56c8e94ebf0cef83181ea9ddc99faf /web/module
parent4993f11bf464c9aee0e3fd5965f4a8258cbe8b30 (diff)
WEB pages re-styling
Diffstat (limited to 'web/module')
-rw-r--r--web/module8
1 files changed, 6 insertions, 2 deletions
diff --git a/web/module b/web/module
index 7398d45..25c4bf2 100644
--- a/web/module
+++ b/web/module
@@ -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)) {}
};