static_array(std::initializer_list<type> il)
requires std::is_copy_constructible_v<type> :
arr(std::forward(il)) {}
static_array(T&& init)
, где этот init и передавать в конструктор arr.BuildableProperty<...,...,const Cursor&>
согласно определению CursorProperty.Cursor != Cursor&
, это разные типы.SetProperty(..., typename std::remove_reference<TInput>::type value)
std::
уже можно убрать через using namespace std
например). И то, только в случае, когда вам нужен именно вот такой вот указатель. А если вам нужен unique_ptr, а если вам нужен ваш собственный умный указатель, который как-то по другому память выделяет? А если вам надо не make_shared вызывать, а какой-то фабричный метод? Плюс это добавит кучу вопросов вроде, а как будет указатель на указатель? Указатель обычно идет после типа вроде int*
, почему shared вы ставите перед ним?using Base::operator=;
make_unique<>
является prvalue: https://en.cppreference.com/w/cpp/language/value_c... prvalue: a function call or an overloaded operator expression, whose return type is non-reference
Temporary objects are created ... in the following situations:
when performing member access on a class prvalue.
All temporary objects are destroyed as the last step in evaluating the full-expression
In a function call, value computations and side effects of the initialization of every parameter are indeterminately sequenced with respect to value computations and side effects of any other parameter.
Evaluations of A and B are indeterminately sequenced : they may be performed in any order but may not overlap: either A will be complete before B, or B will be complete before A. The order may be the opposite the next time the same expression is evaluated.
std::vector<int> a, b;
a = a0;
b = F(a);
for (int i = 1; i <= n; ++i) {
a = G(b);
b = F(a);
}
void F(const vector<int> &a, vector<int>& res);
void G(const vector<int> &b, vector<int>& res);
std::vector<int> a, b;
a = a0;
b = F(a);
for (int i = 1; i <= n; ++i) {
G(b, a);
F(a, b);
}
using my_template<int>;