float is constructible from double, C++23's std::float13_t is not

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was playing around with gcc-trunk's support for C++23's std::float13_t
and I found out that, while float is constructible from double, as far as I
can tell std::float13_t is not.
In other words, the following code compiles OK:

#include <stdfloat>
#include <vector>
int main() {
    std::vector<double> x(5);
    std::vector<float> y(std::begin(x), std::end(x));
}

whereas the following does not:

#include <stdfloat>
#include <vector>
int main() {
    std::vector<double> x(5);
    std::vector<std::float16_t> y(std::begin(x), std::end(x));
}

See this snippet <https://godbolt.org/z/zq7KdhY44>.
Am I missing something or is it supposed to be like that?

Thanks,
Filippo Bistaffa



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux