missing optimization opportunity for const std::vector compared to std::array

for gcc-discussion see: 58483 – missing optimization opportunity for const std::vector compared to std::array

is there a (good) reason not to remove the new/delete combination when the result is already known?

#include <vector>
#include <numeric>
#include <array>

static int calc(const std::array<int,3> p_ints, const int& p_init)
//static int calc(const std::vector<int> p_ints, const int& p_init)
{
 return std::accumulate(p_ints.begin(), p_ints.end(), p_init);
}

int main()
{
 const int result = calc({10,20,30},100);
 return result;
}

results:

gcc.godbolt x86-64 clang trunk, with -O2

with std::array

main: # @main
mov eax, 160
ret

with std::vector

main: # @main
push   rax
mov    edi, 12
call   operator new(unsigned long)
movabs rcx, 85899345930
mov    qword ptr [rax], rcx
mov    dword ptr [rax + 8], 30
mov    rdi, rax
call   operator delete(void*)
mov    eax, 160
pop    rcx
ret

so i've rembered correct - Richard Smith already fixed that with an patch to LibC++ years ago

http://clang-developers.42468.n3.nabble.com/missing-optimization-opportunity-for-const-std-vector-compared-to-std-array-td4034587.html#none

see post ~Jun 04, 2014; 12:16am
http://clang-developers.42468.n3.nabble.com/missing-optimization-opportunity-for-const-std-vector-compared-to-std-array-tp4034587p4039822.html

this post informed about the patch
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20140602/106887.html

what happend to this optimization - was it removed or broken over time?
or is it just not possible to test the behavior on gcc.godbolt.org with the laste clang, missing flags or something?

its is fixed: forgot to use libc+++ at all

godbolt: -O2 -stdlib=libc++

is the answer

thx