foo() { return std:" /> foo() { return std:" /> foo() { return std:"/>

extern "C" function returning std::array

55 Views Asked by At

The following code compiles with gcc but does not compile with MSVC (Godbolt link)

#include <array>

extern "C" std::array<float,3> foo()
{
    return std::array<float,3>{1,2,3};
}

Is one of the compilers is right and the other is wrong, or, is it implementation-defined ?

0

There are 0 best solutions below