soasis / idk Goto Github PK
View Code? Open in Web Editor NEWThe IDK (Industrial Development Kit) library!
Home Page: https://ztdidk.rtfd.io/
License: Other
The IDK (Industrial Development Kit) library!
Home Page: https://ztdidk.rtfd.io/
License: Other
Used here:
idk/include/ztd/idk/detail/windows.hpp
Line 77 in 6173bb3
No idea if Windows UWP is a platform ya'll care about, but right now that's the only target unavailable for vcpkg because of the issue title.
<functional>
is a huge header, containing (but not limited to) hash
, reference_wrapper
, function
, invoke
and much more. Most of the time all these classes are not needed at the same place at the same time, so a #include <functional>
may be something expensive, especially on headers (for example reference_wrapper.hpp
). Thus I propose to add a new header on ztd/idk/detail
named invoke.hpp
which provides an implementation of std::invoke
/std::invoke_result
/std::is_invocable
named __ztd_detail::
{__invoke
, __invoke_result
, __is_invocable
} and replace the use of the equivalent std::
classes over the library. A reference implementation of std::invoke
can be found here.
The current cmake configuration for ztd.idk
is not header-only, it produces a library from the files in the source directory.
This is a problem, because the API linkage flag that api.h
expects to see (ZTD_DLL
) isn't set by the build system, so the library is built without exporting any symbols. This makes the library unlinkable on Windows.
This is all fixable, but I need to know the intent. The docs refer to idk
as header only and it appears to work entirely in header-only mode. So should we just not compile these files? Should we create two targets, one for header only and one that compiles and links the library correctly?
Once I know what the intent is I can handle fixing up the cmake stuff.
@ThePhD ,how are you? I want to add some projects of you to vcpkg, but fail to compile idk
on android.
install-arm-neon-android-dbg-out.log
microsoft/vcpkg#34735
Error message:
/mnt/vcpkg-ci/buildtrees/ztd-idk/src/f54d488079-38e2ce903b.clean/include/ztd/idk/span.hpp:130:18: error: no member named 'operator==' in namespace 'nonstd'
using ::nonstd::operator==;
~~~~~~~~~~^
/mnt/vcpkg-ci/buildtrees/ztd-idk/src/f54d488079-38e2ce903b.clean/include/ztd/idk/span.hpp:131:18: error: no member named 'operator!=' in namespace 'nonstd'
using ::nonstd::operator!=;
~~~~~~~~~~^
/mnt/vcpkg-ci/buildtrees/ztd-idk/src/f54d488079-38e2ce903b.clean/include/ztd/idk/span.hpp:132:18: error: no member named 'operator<' in namespace 'nonstd'
using ::nonstd::operator<;
~~~~~~~~~~^
/mnt/vcpkg-ci/buildtrees/ztd-idk/src/f54d488079-38e2ce903b.clean/include/ztd/idk/span.hpp:133:18: error: no member named 'operator<=' in namespace 'nonstd'
using ::nonstd::operator<=;
~~~~~~~~~~^
/mnt/vcpkg-ci/buildtrees/ztd-idk/src/f54d488079-38e2ce903b.clean/include/ztd/idk/span.hpp:134:18: error: no member named 'operator>' in namespace 'nonstd'
using ::nonstd::operator>;
~~~~~~~~~~^
/mnt/vcpkg-ci/buildtrees/ztd-idk/src/f54d488079-38e2ce903b.clean/include/ztd/idk/span.hpp:135:18: error: no member named 'operator>=' in namespace 'nonstd'
using ::nonstd::operator>=;
~~~~~~~~~~^
In file included from /mnt/vcpkg-ci/buildtrees/ztd-idk/src/f54d488079-38e2ce903b.clean/source/ztd/idk/encoding_detection.c.cpp:35:
In file included from /mnt/vcpkg-ci/buildtrees/ztd-idk/src/f54d488079-38e2ce903b.clean/include/ztd/idk/encoding_name.hpp:39:
/mnt/vcpkg-ci/buildtrees/ztd-idk/src/f54d488079-38e2ce903b.clean/include/ztd/idk/char_traits.hpp:58:22: error: no type named 'mbstate_t' in namespace 'std'; did you mean simply 'mbstate_t'?
using state_type = ::std::mbstate_t;
^~~~~~~~~~~~~~~~
mbstate_t
/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/bits/mbstate_t.h:47:3: note: 'mbstate_t' declared here
} mbstate_t;
^
In file included from /mnt/vcpkg-ci/buildtrees/ztd-idk/src/f54d488079-38e2ce903b.clean/source/ztd/idk/encoding_detection.c.cpp:37:
/mnt/vcpkg-ci/buildtrees/ztd-idk/src/f54d488079-38e2ce903b.clean/include/ztd/idk/detail/posix.hpp:70:25: error: use of undeclared identifier 'nl_langinfo'
const char* __name = nl_langinfo(LC_CTYPE);
^
/mnt/vcpkg-ci/buildtrees/ztd-idk/src/f54d488079-38e2ce903b.clean/source/ztd/idk/encoding_detection.c.cpp:65:29: error: use of undeclared identifier 'nl_langinfo'
const char* __ctype_name = nl_langinfo(CODESET);
^
/mnt/vcpkg-ci/buildtrees/ztd-idk/src/f54d488079-38e2ce903b.clean/source/ztd/idk/encoding_detection.c.cpp:108:29: error: use of undeclared identifier 'nl_langinfo'
const char* __ctype_name = nl_langinfo(CODESET);
^
/mnt/vcpkg-ci/buildtrees/ztd-idk/src/f54d488079-38e2ce903b.clean/source/ztd/idk/encoding_detection.c.cpp:228:29: error: use of undeclared identifier 'nl_langinfo'
const char* __ctype_name = nl_langinfo(CODESET);
^
11 errors generated.
I got an error when compile with ztd.text (msvc 19.39 with c++latest) at this line
https://github.com/soasis/text/blob/fc30abbc3056a0ea69f2c6ef25221c3244bf31cf/include/ztd/text/detail/span_reconstruct.hpp#L90
Look like ::ztd::ranges::range_element_type_t is undefined when ZTD_IS_ON(ZTD_STD_LIBRARY_RANGES)
at line 882 in adl.hpp is true
idk/include/ztd/ranges/adl.hpp
Lines 882 to 929 in 4babfa5
I copy line 916 to 891 and it compiles.
Build failure from a ztd-text include:
In file included from D:/a/vea/vea/vcpkg_installed/x64-windows/include\ztd/text.hpp:56:
D:/a/vea/vea/vcpkg_installed/x64-windows/include\ztd/text/encode_view.hpp:246:24: error: no variable template matches partial specialization
inline constexpr bool enable_borrowed_range<::ztd::text::encode_view<_Encoding, _Range, _ErrorHandler,
^
D:/a/vea/vea/vcpkg_installed/x64-windows/include\ztd/text/encode_view.hpp:247:14: error: no template named 'enable_borrowed_range' in namespace 'ztd::ranges'; did you mean 'std::ranges::enable_borrowed_range'?
_State>> = ::ztd::ranges::enable_borrowed_range<_Range>;
^~~~~~~~~~~~~~~
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.31.31103\include\xutility:1973:27: note: 'std::ranges::enable_borrowed_range' declared here
inline constexpr bool enable_borrowed_range = false;
^
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.