Merge pull request #3552 from amosbird/patch-14

Prioritize rvalue creator for ColumnTuple
This commit is contained in:
alexey-milovidov 2018-11-10 22:57:55 +03:00 committed by GitHub
commit 93a3f1663e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,6 +31,7 @@ public:
*/ */
using Base = COWPtrHelper<IColumn, ColumnTuple>; using Base = COWPtrHelper<IColumn, ColumnTuple>;
static Ptr create(const Columns & columns); static Ptr create(const Columns & columns);
static Ptr create(Columns && arg) { return create(arg); }
template <typename Arg, typename = typename std::enable_if<std::is_rvalue_reference<Arg &&>::value>::type> template <typename Arg, typename = typename std::enable_if<std::is_rvalue_reference<Arg &&>::value>::type>
static MutablePtr create(Arg && arg) { return Base::create(std::forward<Arg>(arg)); } static MutablePtr create(Arg && arg) { return Base::create(std::forward<Arg>(arg)); }