fix(kernel/formatter): clang++ errors and warnings

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-12-08 18:54:04 -08:00
parent 445d4f6793
commit 25a2f5f7e0

View file

@ -38,7 +38,7 @@ public:
\brief Return environment object associated with this formatter. \brief Return environment object associated with this formatter.
Not every formatter has an associated environment object. Not every formatter has an associated environment object.
*/ */
virtual optional<environment> get_environment() { return optional<environment>(); } virtual optional<environment> get_environment() const { return optional<environment>(); }
}; };
/** /**
\brief Smart-pointer for the actual formatter object (aka \c formatter_cell). \brief Smart-pointer for the actual formatter object (aka \c formatter_cell).
@ -54,11 +54,12 @@ public:
format operator()(environment const & env, options const & opts = options()) const { return (*m_cell)(env, opts); } format operator()(environment const & env, options const & opts = options()) const { return (*m_cell)(env, opts); }
optional<environment> get_environment() { return m_cell->get_environment(); } optional<environment> get_environment() { return m_cell->get_environment(); }
template<typename FCell> template<typename FCell> friend formatter mk_formatter(FCell && fcell);
friend formatter mk_formatter(FCell && fcell) { };
template<typename FCell> formatter mk_formatter(FCell && fcell) {
return formatter(new FCell(std::forward<FCell>(fcell))); return formatter(new FCell(std::forward<FCell>(fcell)));
} }
};
/** /**
\brief Create a simple formatter object based on \c print function. \brief Create a simple formatter object based on \c print function.