Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ jobs:
xcode-version: '${{matrix.settings.compiler.version}}'

- name: Set up Python
uses: actions/setup-python@v5.3.0
uses: actions/setup-python@v5.4.0
with:
python-version: '3.11'
python-version: '3.13'

- name: Install Python requirements
run: |
Expand All @@ -241,6 +241,7 @@ jobs:
shell: bash
run: |
conan profile detect --force

sed -i.backup '/^\[settings\]$/,/^\[/ s/^build_type=.*/build_type=${{ matrix.configuration }}/' .conan2/profiles/default
sed -i.backup '/^\[settings\]$/,/^\[/ s/^compiler.cppstd=.*/compiler.cppstd=${{ matrix.settings.compiler.std }}/' .conan2/profiles/default
if [[ "${{ matrix.settings.compiler.type }}" == "GCC" || "${{ matrix.settings.compiler.type }}" == "CLANG" ]]; then
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
COMPILER_TYPE: gcc
COMPILER_VERSION: 12
COMPILER_VERSION: 14

STDLIB: libstdc++11

Expand Down Expand Up @@ -96,9 +96,9 @@ jobs:
sudo apt-get install libdatetime-perl

- name: Set up Python
uses: actions/setup-python@v5.3.0
uses: actions/setup-python@v5.4.0
with:
python-version: '3.11'
python-version: '3.13'

- name: Install Python requirements
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ jobs:
platform: x64

- name: Set up Python
uses: actions/setup-python@v5.3.0
uses: actions/setup-python@v5.4.0
with:
python-version: '3.11'
python-version: '3.13'

- name: Install Python requirements
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/setup-python@v5.4.0
with:
python-version: '3.13'
- uses: pre-commit/action@v3.0.0
164 changes: 63 additions & 101 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@
{
"name": "ninja",
"hidden": true,
"generator": "Ninja",
"generator": "Ninja Multi-Config",
"cacheVariables": {
"CMAKE_MAKE_PROGRAM": "${sourceDir}/.venv/bin/ninja",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
},
{
"name": "default",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_INSTALL_PREFIX": "${sourceDir}/install/${presetName}"
"CMAKE_INSTALL_PREFIX": "${sourceDir}/install/${presetName}",
"CMAKE_INTERPROCEDURAL_OPTIMIZATION" : "ON",
"CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG" : "OFF"
},
"inherits": [
"ninja"
Expand All @@ -33,8 +36,7 @@
},
"inherits": [
"default"
],
"hidden": true
]
},
{
"name": "clang16",
Expand All @@ -44,8 +46,7 @@
},
"inherits": [
"default"
],
"hidden": true
]
},
{
"name": "clang17",
Expand All @@ -55,8 +56,27 @@
},
"inherits": [
"default"
],
"hidden": true
]
},
{
"name": "clang18",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang-18",
"CMAKE_CXX_COMPILER": "clang++-18"
},
"inherits": [
"default"
]
},
{
"name": "clang19",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang-19",
"CMAKE_CXX_COMPILER": "clang++-19"
},
"inherits": [
"default"
]
},
{
"name": "gcc12",
Expand All @@ -66,8 +86,7 @@
},
"inherits": [
"default"
],
"hidden": true
]
},
{
"name": "gcc13",
Expand All @@ -77,11 +96,20 @@
},
"inherits": [
"default"
],
"hidden": true
]
},
{
"name": "mscv",
"name": "gcc14",
"cacheVariables": {
"CMAKE_C_COMPILER": "gcc-14",
"CMAKE_CXX_COMPILER": "g++-14"
},
"inherits": [
"default"
]
},
{
"name": "msvc",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
Expand All @@ -93,100 +121,34 @@
},
"inherits": [
"default"
],
"hidden": true
]
},
{
"name": "debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
},
"hidden": true
},
{
"name": "release",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": true
},
"hidden": true
},
{
"name": "rwdi",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": true
"name": "apple-clang",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"hidden": true
},
{
"name": "msr",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "MinSizeRel",
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": true
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++"
},
"hidden": true
},

{ "name": "msvc-x64-debug", "displayName": "MSVC x64 Debug", "description": "mscv for x64 (Debug)", "inherits": [ "mscv", "debug" ] },
{ "name": "msvc-x64-release", "displayName": "MSVC x64 Release", "description": "mscv for x64 (Release)", "inherits": [ "mscv", "release" ] },
{ "name": "msvc-x64-rwdi", "displayName": "MSVC x64 RelWithDebInfo", "description": "mscv for x64 (RelWithDebInfo)", "inherits": [ "mscv", "rwdi" ] },
{ "name": "msvc-x64-msr", "displayName": "MSVC x64 MinSizeRel", "description": "mscv for x64 (MinSizeRel)", "inherits": [ "mscv", "msr" ] },

{ "name": "gcc12-x64-debug", "displayName": "gcc-12 x64 Debug", "description": "gcc12 for x64 (Debug)", "inherits": [ "gcc12", "debug" ] },
{ "name": "gcc12-x64-release", "displayName": "gcc-12 x64 Release", "description": "gcc12 for x64 (Release)", "inherits": [ "gcc12", "release" ] },
{ "name": "gcc12-x64-rwdi", "displayName": "gcc-12 x64 RelWithDebInfo", "description": "gcc12 for x64 (RelWithDebInfo)", "inherits": [ "gcc12", "rwdi" ] },
{ "name": "gcc12-x64-msr", "displayName": "gcc-12 x64 MinSizeRel", "description": "gcc12 for x64 (MinSizeRel)", "inherits": [ "gcc12", "msr" ] },

{ "name": "gcc13-x64-debug", "displayName": "gcc-13 x64 Debug", "description": "gcc13 for x64 (Debug)", "inherits": [ "gcc13", "debug" ] },
{ "name": "gcc13-x64-release", "displayName": "gcc-13 x64 Release", "description": "gcc13 for x64 (Release)", "inherits": [ "gcc13", "release" ] },
{ "name": "gcc13-x64-rwdi", "displayName": "gcc-13 x64 RelWithDebInfo", "description": "gcc13 for x64 (RelWithDebInfo)", "inherits": [ "gcc13", "rwdi" ] },
{ "name": "gcc13-x64-msr", "displayName": "gcc-13 x64 MinSizeRel", "description": "gcc13 for x64 (MinSizeRel)", "inherits": [ "gcc13", "msr" ] },

{ "name": "clang15-x64-debug", "displayName": "clang-15 x64 Debug", "description": "clang15 for x64 (Debug)", "inherits": [ "clang15", "debug" ] },
{ "name": "clang15-x64-release", "displayName": "clang-15 x64 Release", "description": "clang15 for x64 (Release)", "inherits": [ "clang15", "release" ] },
{ "name": "clang15-x64-rwdi", "displayName": "clang-15 x64 RelWithDebInfo", "description": "clang15 for x64 (RelWithDebInfo)", "inherits": [ "clang15", "rwdi" ] },
{ "name": "clang15-x64-msr", "displayName": "clang-15 x64 MinSizeRel", "description": "clang15 for x64 (MinSizeRel)", "inherits": [ "clang15", "msr" ] },

{ "name": "clang16-x64-debug", "displayName": "clang-16 x64 Debug", "description": "clang16 for x64 (Debug)", "inherits": [ "clang16", "debug" ] },
{ "name": "clang16-x64-release", "displayName": "clang-16 x64 Release", "description": "clang16 for x64 (Release)", "inherits": [ "clang16", "release" ] },
{ "name": "clang16-x64-rwdi", "displayName": "clang-16 x64 RelWithDebInfo", "description": "clang16 for x64 (RelWithDebInfo)", "inherits": [ "clang16", "rwdi" ] },
{ "name": "clang16-x64-msr", "displayName": "clang-16 x64 MinSizeRel", "description": "clang16 for x64 (MinSizeRel)", "inherits": [ "clang16", "msr" ] },

{ "name": "clang17-x64-debug", "displayName": "clang-17 x64 Debug", "description": "clang17 for x64 (Debug)", "inherits": [ "clang17", "debug" ] },
{ "name": "clang17-x64-release", "displayName": "clang-17 x64 Release", "description": "clang17 for x64 (Release)", "inherits": [ "clang17", "release" ] },
{ "name": "clang17-x64-rwdi", "displayName": "clang-17 x64 RelWithDebInfo", "description": "clang17 for x64 (RelWithDebInfo)", "inherits": [ "clang17", "rwdi" ] },
{ "name": "clang17-x64-msr", "displayName": "clang-17 x64 MinSizeRel", "description": "clang17 for x64 (MinSizeRel)", "inherits": [ "clang17", "msr" ] }
"inherits": [
"default"
]
}
],
"buildPresets": [
{ "name": "msvc-x64-debug", "displayName": "MSVC x64 Debug", "configurePreset": "msvc-x64-debug" },
{ "name": "msvc-x64-release", "displayName": "MSVC x64 Release", "configurePreset": "msvc-x64-release" },
{ "name": "msvc-x64-rwdi", "displayName": "MSVC x64 RelWithDebInfo", "configurePreset": "msvc-x64-rwdi" },
{ "name": "msvc-x64-msr", "displayName": "MSVC x64 MinSizeRel", "configurePreset": "msvc-x64-msr" },

{ "name": "gcc12-x64-debug", "displayName": "gcc-12 x64 Debug", "configurePreset": "gcc12-x64-debug" },
{ "name": "gcc12-x64-release", "displayName": "gcc-12 x64 Release", "configurePreset": "gcc12-x64-release" },
{ "name": "gcc12-x64-rwdi", "displayName": "gcc-12 x64 RelWithDebInfo", "configurePreset": "gcc12-x64-rwdi" },
{ "name": "gcc12-x64-msr", "displayName": "gcc-12 x64 MinSizeRel", "configurePreset": "gcc12-x64-msr" },

{ "name": "gcc13-x64-debug", "displayName": "gcc-13 x64 Debug", "configurePreset": "gcc13-x64-debug" },
{ "name": "gcc13-x64-release", "displayName": "gcc-13 x64 Release", "configurePreset": "gcc13-x64-release" },
{ "name": "gcc13-x64-rwdi", "displayName": "gcc-13 x64 RelWithDebInfo", "configurePreset": "gcc13-x64-rwdi" },
{ "name": "gcc13-x64-msr", "displayName": "gcc-13 x64 MinSizeRel", "configurePreset": "gcc13-x64-msr" },

{ "name": "clang15-x64-debug", "displayName": "clang-15 x64 Debug", "configurePreset": "clang15-x64-debug" },
{ "name": "clang15-x64-release", "displayName": "clang-15 x64 Release", "configurePreset": "clang15-x64-release" },
{ "name": "clang15-x64-rwdi", "displayName": "clang-15 x64 RelWithDebInfo", "configurePreset": "clang15-x64-rwdi" },
{ "name": "clang15-x64-msr", "displayName": "clang-15 x64 MinSizeRel", "configurePreset": "clang15-x64-msr" },

{ "name": "clang16-x64-debug", "displayName": "clang-16 x64 Debug", "configurePreset": "clang16-x64-debug" },
{ "name": "clang16-x64-release", "displayName": "clang-16 x64 Release", "configurePreset": "clang16-x64-release" },
{ "name": "clang16-x64-rwdi", "displayName": "clang-16 x64 RelWithDebInfo", "configurePreset": "clang16-x64-rwdi" },
{ "name": "clang16-x64-msr", "displayName": "clang-16 x64 MinSizeRel", "configurePreset": "clang16-x64-msr" },

{ "name": "clang17-x64-debug", "displayName": "clang-17 x64 Debug", "configurePreset": "clang17-x64-debug" },
{ "name": "clang17-x64-release", "displayName": "clang-17 x64 Release", "configurePreset": "clang17-x64-release" },
{ "name": "clang17-x64-rwdi", "displayName": "clang-17 x64 RelWithDebInfo", "configurePreset": "clang17-x64-rwdi" },
{ "name": "clang17-x64-msr", "displayName": "clang-17 x64 MinSizeRel", "configurePreset": "clang17-x64-msr" }
{ "name": "apple-clang", "displayName": "apple-clang", "configurePreset": "apple-clang" },
{ "name": "clang15", "displayName": "clang-15", "configurePreset": "clang15" },
{ "name": "clang16", "displayName": "clang-16", "configurePreset": "clang16" },
{ "name": "clang17", "displayName": "clang-17", "configurePreset": "clang17" },
{ "name": "clang18", "displayName": "clang-18", "configurePreset": "clang18" },
{ "name": "clang19", "displayName": "clang-19", "configurePreset": "clang19" },
{ "name": "gcc12", "displayName": "gcc-12", "configurePreset": "gcc12" },
{ "name": "gcc13", "displayName": "gcc-13", "configurePreset": "gcc13" },
{ "name": "gcc14", "displayName": "gcc-14", "configurePreset": "gcc14" },
{ "name": "msvc", "displayName": "MSVC", "configurePreset": "msvc" }
]
}
22 changes: 11 additions & 11 deletions cmake/requirements/documentation_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
breathe==4.34.0
exhale==0.3.6
myst-parser==0.18.1
Sphinx==4.5.0
sphinx-rtd-theme==1.1.1
sphinxcontrib-applehelp==1.0.4
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.1
breathe==4.35.0
exhale==0.3.7
myst-parser==4.0.1
Sphinx==8.1.3
sphinx-rtd-theme==3.0.2
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-moderncmakedomain==3.27.0
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
sphinxcontrib-moderncmakedomain==3.29.0
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ struct ReaderArchetype

/// Read any arithmetic type from the serialisation.
template <typename T> requires std::is_arithmetic_v<T>
T read();
consteval T read();

/// Read a string from the serialisation.
template <typename T> requires std::is_same_v<T, std::string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <compare>
#include <functional>
#include <initializer_list>
#include <type_traits>

namespace morpheus::containers::concepts::archetypes
{
Expand Down Expand Up @@ -77,17 +78,20 @@ struct Associative : AllocatorAware, detail::Multi<multi>, detail::Mapped<mapped
struct node_type{};

using InsertReturnType = std::conditional_t<multi, iterator, std::pair<iterator, bool>>;
using InsertNodeHandleReturnType = std::invoke_result_t<decltype([]
{
if constexpr (requires { requires requires {typename detail::Multi<multi>::insert_return_type; }; })
{
return typename detail::Multi<multi>::insert_return_type{};
}
else
{
return typename AllocatorAware::iterator{};
}
})>;

template <typename, typename = void>
struct GetInsertReturnType {
using type = typename AllocatorAware::iterator; // Default if not available
};

template <typename T>
struct GetInsertReturnType<T, std::void_t<typename T::insert_return_type>> {
using type = typename T::insert_return_type; // Use if available
};

// Alias to extract type easily
using InsertNodeHandleReturnType = typename GetInsertReturnType<detail::Multi<multi>>::type;

using BoundReturnType = std::conditional_t<multi, iterator, std::pair<iterator, iterator>>;
using BoundConstReturnType = std::conditional_t<multi, const_iterator, std::pair<const_iterator, const_iterator>>;

Expand Down
Loading