From cdcbcd5adf8b987baaf602450d129afcf4d8fdf7 Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Sat, 4 Jul 2015 10:04:45 +0200 Subject: Implement value_initializer --- include/tag_compound.h | 2 +- include/value_initializer.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/tag_compound.h b/include/tag_compound.h index 3c68fc1b12..ea0df236c9 100644 --- a/include/tag_compound.h +++ b/include/tag_compound.h @@ -43,7 +43,7 @@ public: ///Constructs an empty compound tag_compound() {} - tag_compound(std::initializer_list> init); + tag_compound(std::initializer_list> init); /** * @brief Accesses a tag by key with bounds checking diff --git a/include/value_initializer.h b/include/value_initializer.h index 86fdd2d1e1..7ae2cb13f4 100644 --- a/include/value_initializer.h +++ b/include/value_initializer.h @@ -47,10 +47,11 @@ public: value_initializer(std::string&& str); value_initializer(const char* str); - operator value&&(); + value& get() const; private: - value val; + mutable value value_; //FIXME: std::initializer_list objects are constant. + //This solution will probably fail }; } -- cgit 0.0.5-2-1-g0f52