ned14 / outcome

Provides very lightweight outcome<T> and result<T> (non-Boost edition)
https://ned14.github.io/outcome
Other
675 stars 62 forks source link

posix_code.hpp:47:22: error: functions that differ only in their return type cannot be overloaded #284

Closed yurivict closed 11 months ago

yurivict commented 11 months ago

Compilation fails:

In file included from /usr/ports/devel/outcome/work/outcome-0bedf67/test/tests/experimental-core-result-status.cpp:24:
In file included from /usr/ports/devel/outcome/work/outcome-0bedf67/test/tests/../../include/outcome/experimental/status_result.hpp:40:
In file included from /usr/ports/devel/outcome/work/outcome-0bedf67/test/tests/../../include/outcome/experimental/status-code/include/status-code/system_error2.hpp:28:
In file included from /usr/ports/devel/outcome/work/outcome-0bedf67/test/tests/../../include/outcome/experimental/status-code/include/status-code/error.hpp:29:
In file included from /usr/ports/devel/outcome/work/outcome-0bedf67/test/tests/../../include/outcome/experimental/status-code/include/status-code/system_code.hpp:29:
/usr/ports/devel/outcome/work/outcome-0bedf67/test/tests/../../include/outcome/experimental/status-code/include/status-code/posix_code.hpp:47:22: error: functions that differ only in their return type cannot be overloaded
    extern "C" char *strerror_r(int errnum, char *buf, size_t buflen);
               ~~~~~~^
/usr/include/string.h:95:6: note: previous declaration is here
int      strerror_r(int, char *, size_t);
~~~      ^
1 error generated.

revision 0bedf67 clang-15 FreeBSD 13.2