LINUX.ORG.RU

История изменений

Исправление safocl, (текущая версия) :

https://github.com/devbrain/musac/blob/aa9b7c207dd934afaac7f0f35faf88c6369dbd...

2) Constructs an array of the given dynamic size. The array elements are value-initialized. This overload participates in overload resolution only if T is an array of unknown bound. The function is equivalent to:

unique_ptr<T>(new std::remove_extent_t<T>[size]())

(https://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique)

п.с. вообще не вник, почему тут не std::vector?

апд.
[expr.new#7]

If the type-id or new-type-id denotes an array type of unknown bound ([dcl.array]), the new-initializer shall not be omitted; the allocated object is an array with n elements, where n is determined from the number of initial elements supplied in the new-initializer ([dcl.init.aggr], [dcl.init.string]).

Исправление safocl, :

https://github.com/devbrain/musac/blob/aa9b7c207dd934afaac7f0f35faf88c6369dbd...

2) Constructs an array of the given dynamic size. The array elements are value-initialized. This overload participates in overload resolution only if T is an array of unknown bound. The function is equivalent to:

unique_ptr<T>(new std::remove_extent_t<T>[size]())

(https://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique)

п.с. вообще не вник, почему тут не std::vector?

апд.
[expr.new#7]

Исправление safocl, :

https://github.com/devbrain/musac/blob/aa9b7c207dd934afaac7f0f35faf88c6369dbd...

2) Constructs an array of the given dynamic size. The array elements are value-initialized. This overload participates in overload resolution only if T is an array of unknown bound. The function is equivalent to:

unique_ptr<T>(new std::remove_extent_t<T>[size]())

(https://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique)

п.с. вообще не вник, почему тут не std::vector?

Исправление safocl, :

https://github.com/devbrain/musac/blob/aa9b7c207dd934afaac7f0f35faf88c6369dbd...

2) Constructs an array of the given dynamic size. The array elements are value-initialized. This overload participates in overload resolution only if T is an array of unknown bound. The function is equivalent to:

unique_ptr<T>(new std::remove_extent_t<T>[size]())

(https://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique)

Исходная версия safocl, :

https://github.com/devbrain/musac/blob/aa9b7c207dd934afaac7f0f35faf88c6369dbd...

2) Constructs an array of the given dynamic size. The array elements are value-initialized. This overload participates in overload resolution only if T is an array of unknown bound. The function is equivalent to:

unique_ptr<T>(new std::remove_extent_t<T>[size]())

(https://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique)