pgc++ 16.10 cannot compile std::make_shared call

I have: pgc++ 16.10-0 64-bit target on Apple OS/X -tp haswell

With the code below, I see
% pgc++ -std=c++11 -c p.cpp
“p.cpp”, line 9: error: no instance of overloaded function “std::make_shared”
matches the argument list
argument types are: (size_t)
std::shared_ptr<std::vector > q = std::make_shared<std::vector >(size());

Additionally, if you explicitly cast n to size_t in the “p =” statement, you get the same error. The problem goes away if passing a size_t variable, i.e. “p =” and “r =” below.

The problem is not seen with
pgc++ 16.10-0 64-bit target on x86-64 Linux -tp haswell


#include
#include
#include

size_t size();
void x() {
std::size_t n=2;
std::shared_ptr<std::vector > p = std::make_shared<std::vector >(n);
std::shared_ptr<std::vector > q = std::make_shared<std::vector >(size());
std::shared_ptr<std::vector > r = std::make_shared<std::vector >((n=size()));
std::vector* s = new std::vector(size());
}

We have replicated your behavior, and we have assigned the problem
TPR 23318.

thanks,
dave

We have replicated this behavior and we have assigned the problem
TPR 23318.

dave

The problem you reported should now work in the current 18.1 release
and future releases, including the 18.4 Community Edition.

dave