Initial commit

This commit is contained in:
2026-01-23 22:15:36 +01:00
commit ca60108606
167 changed files with 5311 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
sources:
"4.8.1":
url: "https://github.com/martinus/unordered_dense/archive/v4.8.1.tar.gz"
sha256: "9f7202ec6d8353932ef865d33f5872e4b7a1356e9032da7cd09c3a0c5bb2b7de"
"4.7.0":
url: "https://github.com/martinus/unordered_dense/archive/v4.7.0.tar.gz"
sha256: "73ce8ec4784619be4d6e54f2c4cb95d4d8dbc1fbbf24b5cf1e93b157bfa1043d"
"4.6.0":
url: "https://github.com/martinus/unordered_dense/archive/v4.6.0.tar.gz"
sha256: "f8c1787cc8ce9028f02e2a09fefbb6c89d5fa3fd4c2c3475faabbb531c9b2ab0"
"4.5.0":
url: "https://github.com/martinus/unordered_dense/archive/v4.5.0.tar.gz"
sha256: "2364ce4bc4c23bd02549bbb3a7572d881684cd46057f3737fd53be53669743aa"
"4.4.0":
url: "https://github.com/martinus/unordered_dense/archive/v4.4.0.tar.gz"
sha256: "3976399793e8cb4db1409ce15610fbd9e5e406ced4745f262d393a9311efbd88"
"4.3.1":
url: "https://github.com/martinus/unordered_dense/archive/v4.3.1.tar.gz"
sha256: "ff069b0b7697a3601cd674e4a4405edc6ec1d60a5cc3e7fff18db9e24ecc8ec3"
"4.3.0":
url: "https://github.com/martinus/unordered_dense/archive/v4.3.0.tar.gz"
sha256: "c8ffaf5277dd5c29871cc6359af7823c8137158d47511dd00c8193af84906b9c"
"4.1.2":
url: "https://github.com/martinus/unordered_dense/archive/v4.1.2.tar.gz"
sha256: "300410dbcd32800f83b2113dfecbdfe8cd256caa4cfeb117d646021d6e3209ae"
"4.1.0":
url: "https://github.com/martinus/unordered_dense/archive/v4.1.0.tar.gz"
sha256: "0f594cb3b08fc657db3843139000005b6827e5c69d00f5c8d74c1239bd21746f"
"4.0.4":
url: "https://github.com/martinus/unordered_dense/archive/v4.0.4.tar.gz"
sha256: "b34a8c942963e3a647f1bbc192a6391cd56d7ae615b2ddc1601c1779b5792206"
"4.0.1":
url: "https://github.com/martinus/unordered_dense/archive/v4.0.1.tar.gz"
sha256: "6c8be4f76fed592f8c1ae07ce07eaa8749ed3a929a84a502764564dcbcc53a76"
"4.0.0":
url: "https://github.com/martinus/unordered_dense/archive/v4.0.0.tar.gz"
sha256: "c9d43bfc60ed03e9aa667bc6d3c586f7a04dfb0082333b0e50624aac71c53172"
"3.1.1":
url: "https://github.com/martinus/unordered_dense/archive/v3.1.1.tar.gz"
sha256: "634194cec08f6a41aa72ed4804719cdf8ba94f9ba8575bf7a80496a33dfbbb12"
"3.1.0":
url: "https://github.com/martinus/unordered_dense/archive/v3.1.0.tar.gz"
sha256: "adf8670bf494a84f1148687375ac568e2990167b8ced3cc1e5bacc9f6c49f272"
"3.0.2":
url: "https://github.com/martinus/unordered_dense/archive/v3.0.2.tar.gz"
sha256: "0c0b874e9682cce3c75a1152308bfbb108538aaf1e90824d7789e2b64122520b"
"2.0.1":
url: "https://github.com/martinus/unordered_dense/archive/v2.0.1.tar.gz"
sha256: "450d53bd8709f9476702a3c4975bf6e40d66059b25b125e480534228d7f5616d"
"1.4.0":
url: "https://github.com/martinus/unordered_dense/archive/v1.4.0.tar.gz"
sha256: "36b6bfe2fe2633f9d9c537b9b808b4be6b77ff51c66d370d855f477517bc3bc9"
"1.3.3":
url: "https://github.com/martinus/unordered_dense/archive/v1.3.3.tar.gz"
sha256: "621a984d7f1de156d3078ecb5e1252bcc2ebc875de6eb6b8635f6c2a0898e496"

View File

@@ -0,0 +1,72 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.files import get, copy
from conan.tools.build import check_min_cppstd
from conan.tools.scm import Version
from conan.tools.layout import basic_layout
import os
required_conan_version = ">=1.51.3"
class PackageConan(ConanFile):
name = "unordered_dense"
description = "A fast & densely stored hashmap and hashset based on robin-hood backward shift deletion"
license = "MIT"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/martinus/unordered_dense"
topics = ("unordered_map", "unordered_set", "hashmap", "hashset", "header-only")
package_type = "header-library"
settings = "os", "arch", "compiler", "build_type"
no_copy_source = True
@property
def _minimum_cpp_standard(self):
return 17
@property
def _compilers_minimum_version(self):
return {
"Visual Studio": "15.7",
"msvc": "191",
"gcc": "7",
"clang": "7",
"apple-clang": "11",
}
def layout(self):
basic_layout(self, src_folder="src")
def package_id(self):
self.info.clear()
def validate(self):
if self.settings.get_safe("compiler.cppstd"):
check_min_cppstd(self, self._minimum_cpp_standard)
minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False)
if minimum_version and Version(self.settings.get_safe("compiler.version")) < minimum_version:
raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._minimum_cpp_standard}, which your compiler does not support.")
def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
def build(self):
pass
def package(self):
copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
copy(self, pattern="*.h", dst=os.path.join(self.package_folder, "include", "ankerl"), src=os.path.join(self.source_folder, "include", "ankerl"))
def package_info(self):
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []
self.cpp_info.set_property("cmake_file_name", "unordered_dense")
self.cpp_info.set_property("cmake_target_name", "unordered_dense::unordered_dense")
# TODO: to remove in conan v2 once cmake_find_package_* generators removed
self.cpp_info.filenames["cmake_find_package"] = "unordered_dense"
self.cpp_info.filenames["cmake_find_package_multi"] = "unordered_dense"
self.cpp_info.names["cmake_find_package"] = "unordered_dense"
self.cpp_info.names["cmake_find_package_multi"] = "unordered_dense"

View File

@@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES CXX)
find_package(unordered_dense REQUIRED CONFIG)
add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE unordered_dense::unordered_dense)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)

View File

@@ -0,0 +1,26 @@
from conan import ConanFile
from conan.tools.build import can_run
from conan.tools.cmake import cmake_layout, CMake
import os
class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv"
test_type = "explicit"
def requirements(self):
self.requires(self.tested_reference_str)
def layout(self):
cmake_layout(self)
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def test(self):
if can_run(self):
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
self.run(bin_path, env="conanrun")

View File

@@ -0,0 +1,14 @@
// sited from https://github.com/martinus/unordered_dense/blob/main/example/main.cpp
#include <ankerl/unordered_dense.h>
#include <iostream>
auto main() -> int {
auto map = ankerl::unordered_dense::map<int, std::string>();
map[123] = "hello";
map[987] = "world!";
for (auto const& [key, val] : map) {
std::cout << key << " => " << val << std::endl;
}
}