[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Support emplace with multiple arguments

From: Askar Safin
Subject: Support emplace with multiple arguments
Date: Sat, 08 Dec 2018 22:56:19 +0300

Hi. It seems that you wanted your "build" function of "variant.hh" to be named 
idiomatically, and so created new "emplace" function. Well, okey, but if you 
really want to be idiomatic, please, make it support multiple arguments. I. e. 
it should look so:

    template <typename T, typename... U>
    emplace (U&&... u)
      return *new (yyas_<T> ()) T (std::forward <U>(u), ...);

Of course, this will cover empty argument list case, too, so, if this 
definition is enabled, then you don't need "emplace ()".

Askar Safin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]