
On 25 May 2015 at 15:51, Peter Dimov wrote:
Niall Douglas wrote:
https://svn.boost.org/trac/boost/wiki/BestPracticeHandbook#a8.DESIGN:Strongl...
This section is called
"(Strongly) consider using constexpr semantic wrapper transport types to return states from functions"
but I see nothing constexpr in it - the result of calling ::open can never be constexpr.
Could you perhaps elaborate a bit on the "constexpr semantic" part?
I was referring to the return type of: std::expected< std::expected< std::shared_ptr<handle_type>, std::error_code>, std::exception_ptr> This should constexpr reduce into no assembler output where the compiler can see the implementation. In other words, returing an error_code is as if returning a naked error_code from the point of view of opcodes generated - std::expected "disappears". Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/