Martchus / cpp-utilities

Common C++ classes and routines used by my applications such as argument parser, IO and conversion utilities
GNU General Public License v2.0
52 stars 18 forks source link

error: implicit instantiation of undefined template 'std::array<double, 4>' #29

Closed yurivict closed 9 months ago

yurivict commented 9 months ago

std::array is used in chrono/timespan.cpp but there is no corresponding include:

wrkdirs/usr/ports/devel/cpp-utilities/work/cpp-utilities-5.24.3/chrono/timespan.cpp:74:18: error: implicit instantiation of undefined template 'std::array<double, 4>'
    auto parts = std::array<double, 4>(); 
                 ^                                             
/usr/include/c++/v1/__tuple:219:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                               ^
1 error generated.

Version: 5.24.3 clang-16 FreeBSD 13.2

Martchus commented 9 months ago

I actually tested this with libc++ but only on GNU/Linux. Strange that it behaves differently with your version. I added the include. I suppose for easy fixes like that you could also just create a PR (instead of an issue).