-
-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add package ipaddress #5506
add package ipaddress #5506
Conversation
|
packages/i/ipaddress/xmake.lua
Outdated
std::cout << " " << subnet << std::endl; | ||
} | ||
|
||
constexpr auto last_subnet = net.subnets(2).back(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too large test code, please simplify it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about now?
renamed to the same name as vcpkg |
|
||
add_versions("v1.1.0", "e5084d83ebd712210882eb6dac14ed1b9b71584dede523b35c6181e0a06375f1") | ||
|
||
add_configs("noexcept", {description = "Disable handling cpp exception for", default = false, type = "boolean"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noexcept -> except
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I searched similar configs, spdlog use 'noexcept' and some others use 'exceptions'. So maybe 'exceptions' is better?
I don't get it, if it's a header-only package, options are meaningless if they don't add any define to the package |
you are right, they should be exported by |
Sorry, I thought xmake would extract these defines from cmake. I will fix it in another PR. P.S. Is there any document for these contribution FAQs? (e.g. format, option naming, options of headeronly package). I did some searching but couldn't find any. |
ipaddress
https://github.com/VladimirShaleev/ipaddress/tree/main
A library for working and manipulating IPv4/IPv6 addresses and networks in modern C++.
This cross-platfrom header-only library (for C++11 and newer) is inspired by the ipaddress API in Python, from which it derives its name. It aims to be simpler to use due to its familiar interface. However, the C++ implementation takes a different approach: it uses static polymorphism through the strategy pattern instead of dynamic polymorphism to handle differences between IP versions (IPv4 and IPv6). This design choice eliminates the overhead of dynamic calls and virtual tables. For instance, an instance of the ipv4_address class will be represented by 4 bytes.
The library leverages modern C++ features, ensuring that all IP address and network operations support constant expressions.