From 3d10fd9f1878e8409d3f4ff1d98a894d2b987cf3 Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Thu, 26 Apr 2012 13:25:38 +0900 Subject: [PATCH] fix io implicit conversion Expression to string --- sprout/io.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sprout/io.hpp b/sprout/io.hpp index 9325aa97..41f31e6f 100644 --- a/sprout/io.hpp +++ b/sprout/io.hpp @@ -397,6 +397,10 @@ namespace sprout { } } // namespace flags + template + inline SPROUT_CONSTEXPR sprout::basic_string + output(Expression const& expr); + // // nil_expression // @@ -495,6 +499,14 @@ namespace sprout { SPROUT_CONSTEXPR sprout::io::format_settings const& settings() const { return left().settings(); } + template + SPROUT_CONSTEXPR sprout::basic_string output() const { + return sprout::io::output(*this); + } + template + SPROUT_CONSTEXPR operator sprout::basic_string() const { + return sprout::io::output(*this); + } }; //