From 25a2f5f7e09eb4680211d570b5a702101169ebd3 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Sun, 8 Dec 2013 18:54:04 -0800 Subject: [PATCH] fix(kernel/formatter): clang++ errors and warnings Signed-off-by: Leonardo de Moura --- src/kernel/formatter.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/kernel/formatter.h b/src/kernel/formatter.h index 79c548bad..746938b6e 100644 --- a/src/kernel/formatter.h +++ b/src/kernel/formatter.h @@ -38,7 +38,7 @@ public: \brief Return environment object associated with this formatter. Not every formatter has an associated environment object. */ - virtual optional get_environment() { return optional(); } + virtual optional get_environment() const { return optional(); } }; /** \brief Smart-pointer for the actual formatter object (aka \c formatter_cell). @@ -54,12 +54,13 @@ public: format operator()(environment const & env, options const & opts = options()) const { return (*m_cell)(env, opts); } optional get_environment() { return m_cell->get_environment(); } - template - friend formatter mk_formatter(FCell && fcell) { - return formatter(new FCell(std::forward(fcell))); - } + template friend formatter mk_formatter(FCell && fcell); }; +template formatter mk_formatter(FCell && fcell) { + return formatter(new FCell(std::forward(fcell))); +} + /** \brief Create a simple formatter object based on \c print function. */