 <blockquote> <p>Why doesn't C++ provide us with a constructor which takes an array as an argument?</p> </blockquote> <p>Why would it? A <code>std::set</code> is not an array, and it already has a constructor that takes iterators to initialize it, so adding another constructor for an array is unnecessary. <code>std::vector</code> IS an array and even it does not have a constructor that takes an array.</p> <blockquote> <p>Alternatively, is there anything wrong with defining the following function?</p> </blockquote> <p>Yes and no. It is unnecessary as you can just write</p> <pre><code>MyType myArray[mySize]; std::set&lt;MyType&gt; mySet(myArray, myArray + sizeof(myArray) / sizeof(array[0]); // or std::set&lt;MyType&gt; mySet(myArray, myArray + mySize); // or std::set&lt;MyType&gt; mySet(std::begin(myArray), std::end(myArray)); c++11 </code></pre> <p>It isn't really worthy of its own function.</p> <p>If you really want to write a function to help you out, I'd approach it by porting <code>std::begin</code> and <code>std::end</code> to C++03. Those would at least be more usable than a function specifically to create a <code>std::set</code>.</p> <p>It would look exactly like what Konrad posted in his answer.</p>