Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about raii

Read more about raii

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - raii

How to construct an array using make_unique

How can I use std::make_unique to construct a std::array? In the following code uptr2's declaration does not compile: #include <iostream> #include <array> #include <memory> int mai...
test-img

digito_evo

c++

unique-ptr

raii

stdarray

Votes: 0

Answers: 1

Latest Answer

std::make_unique< std::array<int, 1'000'000> >( { } ) does not compile because the std::make_unique function template takes an arbitrary number of arguments by forwarding reference, and y...
test-img

Brian Bi

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved