Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a323654
explicit casts
Jan 24, 2026
79522fe
add concpets and task
Jan 24, 2026
7cf9dd9
primatives in promise
Jan 24, 2026
6346021
instanciate
Jan 24, 2026
b234f13
use coroutine fib
Jan 24, 2026
9f23439
golf
Jan 24, 2026
862bd78
split up macros
Jan 25, 2026
29b3715
use split macros
Jan 25, 2026
f2416c5
rename
Jan 25, 2026
4dd69dc
move common to fib
Jan 25, 2026
8617044
tweak clang tidy
Jan 25, 2026
51779dc
impl terminate_with
Jan 25, 2026
a5b4521
drop unused
Jan 25, 2026
35ef2e4
break out frame
Jan 25, 2026
aa1206d
utiliy types
Jan 25, 2026
4b62f7d
formatting
Jan 25, 2026
0f40490
wip
Jan 25, 2026
424b4bd
utility tests
Jan 25, 2026
8859315
task immovable
Jan 25, 2026
ae134b9
rename test
Jan 25, 2026
b97283f
drop test form bench preset
Jan 25, 2026
cf460ea
add sym transfer
Jan 25, 2026
c01caa6
add more assume
Jan 25, 2026
868df76
disable false +ve lint
Jan 25, 2026
d2371a9
movable task
Jan 25, 2026
13235c0
golf
Jan 25, 2026
a45de6a
assume
Jan 25, 2026
465513d
alloc policy structure
Jan 25, 2026
6db764e
more alloc policy
Jan 25, 2026
62bae82
inherit from policy
Jan 25, 2026
9f8975e
add dummy
Jan 25, 2026
8e013a5
initial test
Jan 25, 2026
da8aae6
constants
Jan 25, 2026
3464992
sized delete
Jan 25, 2026
dbf98fd
renames
Jan 25, 2026
aa9ba88
bump
Jan 25, 2026
ac5a5dd
use thread local
Jan 25, 2026
769a430
new assert
Jan 25, 2026
21d9a0f
fix assume
Jan 26, 2026
56f377a
protect macro
Jan 26, 2026
e255f1d
fix macro typo
Jan 26, 2026
ceef718
typo
Jan 26, 2026
09c4d22
rm bad comment
Jan 26, 2026
2e98734
add to file set
Jan 26, 2026
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
4 changes: 3 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ Language: Cpp
ColumnLimit: 110
IndentPPDirectives: BeforeHash
AlwaysBreakTemplateDeclarations: Yes
BreakAfterAttributes: Always
PackConstructorInitializers: CurrentLine
AccessModifierOffset: -1
IndentCaseLabels: true
AllowShortLambdasOnASingleLine: Empty
RequiresExpressionIndentation: OuterScope
BinPackArguments: false
# BinPackParameters: false
LambdaBodyIndentation: Signature
PenaltyReturnTypeOnItsOwnLine: 1

Macros:
- LF_TRY=if
- LF_CATCH_ALL=else
- LF_HOF(x)={x;}
- LF_HOF(x,y)={x,y;}
- LF_HOF(x,y,z)={x,y,z;}
Expand Down
284 changes: 143 additions & 141 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -10,148 +10,150 @@ Checks: "*,\
-llvm-header-guard,\
-llvm-include-order,\
-llvmlibc-*,\
-modernize-use-nodiscard,\
-readability-identifier-length,\
-misc-non-private-member-variables-in-classes"
WarningsAsErrors: ''
WarningsAsErrors: ""
CheckOptions:
- key: readability-function-cognitive-complexity.IgnoreMacros
value: 'true'
- key: 'bugprone-argument-comment.StrictMode'
value: 'true'
# Prefer using enum classes with 2 values for parameters instead of bools
- key: 'bugprone-argument-comment.CommentBoolLiterals'
value: 'true'
- key: 'bugprone-misplaced-widening-cast.CheckImplicitCasts'
value: 'true'
- key: 'bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression'
value: 'true'
- key: 'bugprone-suspicious-string-compare.WarnOnLogicalNotComparison'
value: 'true'
- key: 'readability-simplify-boolean-expr.ChainedConditionalReturn'
value: 'true'
- key: 'readability-simplify-boolean-expr.ChainedConditionalAssignment'
value: 'true'
- key: 'readability-uniqueptr-delete-release.PreferResetCall'
value: 'true'
- key: 'cppcoreguidelines-init-variables.MathHeader'
value: '<cmath>'
- key: 'cppcoreguidelines-narrowing-conversions.PedanticMode'
value: 'true'
- key: 'readability-else-after-return.WarnOnUnfixable'
value: 'true'
- key: 'readability-else-after-return.WarnOnConditionVariables'
value: 'true'
- key: 'readability-inconsistent-declaration-parameter-name.Strict'
value: 'true'
- key: 'readability-qualified-auto.AddConstToQualified'
value: 'true'
- key: 'readability-redundant-access-specifiers.CheckFirstDeclaration'
value: 'true'
# These seem to be the most common identifier styles
- key: 'readability-identifier-naming.AbstractClassCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ClassCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ClassConstantCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ClassMemberCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ClassMethodCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstantCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstantMemberCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstantParameterCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstantPointerParameterCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstexprFunctionCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstexprMethodCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ConstexprVariableCase'
value: 'lower_case'
- key: 'readability-identifier-naming.EnumCase'
value: 'lower_case'
- key: 'readability-identifier-naming.EnumConstantCase'
value: 'lower_case'
- key: 'readability-identifier-naming.FunctionCase'
value: 'lower_case'
- key: 'readability-identifier-naming.GlobalConstantCase'
value: 'lower_case'
- key: 'readability-identifier-naming.GlobalConstantPointerCase'
value: 'lower_case'
- key: 'readability-identifier-naming.GlobalFunctionCase'
value: 'lower_case'
- key: 'readability-identifier-naming.GlobalPointerCase'
value: 'lower_case'
- key: 'readability-identifier-naming.GlobalVariableCase'
value: 'lower_case'
- key: 'readability-identifier-naming.InlineNamespaceCase'
value: 'lower_case'
- key: 'readability-identifier-naming.LocalConstantCase'
value: 'lower_case'
- key: 'readability-identifier-naming.LocalConstantPointerCase'
value: 'lower_case'
- key: 'readability-identifier-naming.LocalPointerCase'
value: 'lower_case'
- key: 'readability-identifier-naming.LocalVariableCase'
value: 'lower_case'
- key: 'readability-identifier-naming.MacroDefinitionCase'
value: 'UPPER_CASE'
- key: 'readability-identifier-naming.MemberCase'
value: 'lower_case'
- key: 'readability-identifier-naming.MethodCase'
value: 'lower_case'
- key: 'readability-identifier-naming.NamespaceCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ParameterCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ParameterPackCase'
value: 'lower_case'
- key: 'readability-identifier-naming.PointerParameterCase'
value: 'lower_case'
- key: 'readability-identifier-naming.PrivateMemberCase'
value: 'lower_case'
- key: 'readability-identifier-naming.PrivateMemberPrefix'
value: 'm_'
- key: 'readability-identifier-naming.PrivateMethodCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ProtectedMemberCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ProtectedMemberPrefix'
value: 'm_'
- key: 'readability-identifier-naming.ProtectedMethodCase'
value: 'lower_case'
- key: 'readability-identifier-naming.PublicMemberCase'
value: 'lower_case'
- key: 'readability-identifier-naming.PublicMethodCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ScopedEnumConstantCase'
value: 'lower_case'
- key: 'readability-identifier-naming.StaticConstantCase'
value: 'lower_case'
- key: 'readability-identifier-naming.StaticVariableCase'
value: 'lower_case'
- key: 'readability-identifier-naming.StructCase'
value: 'lower_case'
- key: 'readability-identifier-naming.TemplateParameterCase'
value: 'CamelCase'
- key: 'readability-identifier-naming.TemplateTemplateParameterCase'
value: 'CamelCase'
- key: 'readability-identifier-naming.TypeAliasCase'
value: 'lower_case'
- key: 'readability-identifier-naming.TypedefCase'
value: 'lower_case'
- key: 'readability-identifier-naming.TypeTemplateParameterCase'
value: 'CamelCase'
- key: 'readability-identifier-naming.UnionCase'
value: 'lower_case'
- key: 'readability-identifier-naming.ValueTemplateParameterCase'
value: 'CamelCase'
- key: 'readability-identifier-naming.VariableCase'
value: 'lower_case'
- key: 'readability-identifier-naming.VirtualMethodCase'
value: 'lower_case'
value: "true"
- key: "cppcoreguidelines-avoid-do-while.IgnoreMacros"
value: "true"
- key: "bugprone-argument-comment.StrictMode"
value: "true"
# Prefer using enum classes with 2 values for parameters instead of bools
- key: "bugprone-argument-comment.CommentBoolLiterals"
value: "true"
- key: "bugprone-misplaced-widening-cast.CheckImplicitCasts"
value: "true"
- key: "bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression"
value: "true"
- key: "bugprone-suspicious-string-compare.WarnOnLogicalNotComparison"
value: "true"
- key: "readability-simplify-boolean-expr.ChainedConditionalReturn"
value: "true"
- key: "readability-simplify-boolean-expr.ChainedConditionalAssignment"
value: "true"
- key: "readability-uniqueptr-delete-release.PreferResetCall"
value: "true"
- key: "cppcoreguidelines-init-variables.MathHeader"
value: "<cmath>"
- key: "cppcoreguidelines-narrowing-conversions.PedanticMode"
value: "true"
- key: "readability-else-after-return.WarnOnUnfixable"
value: "true"
- key: "readability-else-after-return.WarnOnConditionVariables"
value: "true"
- key: "readability-inconsistent-declaration-parameter-name.Strict"
value: "true"
- key: "readability-qualified-auto.AddConstToQualified"
value: "true"
- key: "readability-redundant-access-specifiers.CheckFirstDeclaration"
value: "true"
# These seem to be the most common identifier styles
- key: "readability-identifier-naming.AbstractClassCase"
value: "lower_case"
- key: "readability-identifier-naming.ClassCase"
value: "lower_case"
- key: "readability-identifier-naming.ClassConstantCase"
value: "lower_case"
- key: "readability-identifier-naming.ClassMemberCase"
value: "lower_case"
- key: "readability-identifier-naming.ClassMethodCase"
value: "lower_case"
- key: "readability-identifier-naming.ConstantCase"
value: "lower_case"
- key: "readability-identifier-naming.ConstantMemberCase"
value: "lower_case"
- key: "readability-identifier-naming.ConstantParameterCase"
value: "lower_case"
- key: "readability-identifier-naming.ConstantPointerParameterCase"
value: "lower_case"
- key: "readability-identifier-naming.ConstexprFunctionCase"
value: "lower_case"
- key: "readability-identifier-naming.ConstexprMethodCase"
value: "lower_case"
- key: "readability-identifier-naming.ConstexprVariableCase"
value: "lower_case"
- key: "readability-identifier-naming.EnumCase"
value: "lower_case"
- key: "readability-identifier-naming.EnumConstantCase"
value: "lower_case"
- key: "readability-identifier-naming.FunctionCase"
value: "lower_case"
- key: "readability-identifier-naming.GlobalConstantCase"
value: "lower_case"
- key: "readability-identifier-naming.GlobalConstantPointerCase"
value: "lower_case"
- key: "readability-identifier-naming.GlobalFunctionCase"
value: "lower_case"
- key: "readability-identifier-naming.GlobalPointerCase"
value: "lower_case"
- key: "readability-identifier-naming.GlobalVariableCase"
value: "lower_case"
- key: "readability-identifier-naming.InlineNamespaceCase"
value: "lower_case"
- key: "readability-identifier-naming.LocalConstantCase"
value: "lower_case"
- key: "readability-identifier-naming.LocalConstantPointerCase"
value: "lower_case"
- key: "readability-identifier-naming.LocalPointerCase"
value: "lower_case"
- key: "readability-identifier-naming.LocalVariableCase"
value: "lower_case"
- key: "readability-identifier-naming.MacroDefinitionCase"
value: "UPPER_CASE"
- key: "readability-identifier-naming.MemberCase"
value: "lower_case"
- key: "readability-identifier-naming.MethodCase"
value: "lower_case"
- key: "readability-identifier-naming.NamespaceCase"
value: "lower_case"
- key: "readability-identifier-naming.ParameterCase"
value: "lower_case"
- key: "readability-identifier-naming.ParameterPackCase"
value: "lower_case"
- key: "readability-identifier-naming.PointerParameterCase"
value: "lower_case"
- key: "readability-identifier-naming.PrivateMemberCase"
value: "lower_case"
- key: "readability-identifier-naming.PrivateMemberPrefix"
value: "m_"
- key: "readability-identifier-naming.PrivateMethodCase"
value: "lower_case"
- key: "readability-identifier-naming.ProtectedMemberCase"
value: "lower_case"
- key: "readability-identifier-naming.ProtectedMemberPrefix"
value: "m_"
- key: "readability-identifier-naming.ProtectedMethodCase"
value: "lower_case"
- key: "readability-identifier-naming.PublicMemberCase"
value: "lower_case"
- key: "readability-identifier-naming.PublicMethodCase"
value: "lower_case"
- key: "readability-identifier-naming.ScopedEnumConstantCase"
value: "lower_case"
- key: "readability-identifier-naming.StaticConstantCase"
value: "lower_case"
- key: "readability-identifier-naming.StaticVariableCase"
value: "lower_case"
- key: "readability-identifier-naming.StructCase"
value: "lower_case"
- key: "readability-identifier-naming.TemplateParameterCase"
value: "CamelCase"
- key: "readability-identifier-naming.TemplateTemplateParameterCase"
value: "CamelCase"
- key: "readability-identifier-naming.TypeAliasCase"
value: "lower_case"
- key: "readability-identifier-naming.TypedefCase"
value: "lower_case"
- key: "readability-identifier-naming.TypeTemplateParameterCase"
value: "CamelCase"
- key: "readability-identifier-naming.UnionCase"
value: "lower_case"
- key: "readability-identifier-naming.ValueTemplateParameterCase"
value: "CamelCase"
- key: "readability-identifier-naming.VariableCase"
value: "lower_case"
- key: "readability-identifier-naming.VirtualMethodCase"
value: "lower_case"
...
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ target_sources(libfork_libfork
PUBLIC
FILE_SET HEADERS FILES
include/libfork/version.hpp
include/libfork/macros.hpp
include/libfork/__impl/compiler.hpp
include/libfork/__impl/exception.hpp
include/libfork/__impl/utils.hpp
include/libfork/__impl/assume.hpp
BASE_DIRS
include
)
Expand All @@ -54,8 +57,12 @@ target_sources(libfork_libfork
FILE_SET CXX_MODULES FILES
src/core/core.cxx
src/core/promise.cxx
src/core/concepts.cxx
src/core/utility.cxx
src/core/frame.cxx
src/core/constants.cxx
PRIVATE
# src/libfork.cpp
src/exception.cpp
)

# ======================
Expand Down
14 changes: 0 additions & 14 deletions CMakeUserPresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@
"execution": {
"stopOnFailure": true
}
},
{
"name": "bench",
"configurePreset": "bench",
"output": {
"outputOnFailure": true
},
"execution": {
"stopOnFailure": true
}
}
],
"workflowPresets": [
Expand Down Expand Up @@ -76,10 +66,6 @@
{
"type": "build",
"name": "bench"
},
{
"type": "test",
"name": "bench"
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ target_sources(libfork_benchmark

# ---- Libfork ----

# target_sources(libfork_benchmark
# PRIVATE
# src/libfork_benchmark/fib/fib.cpp
# )
target_sources(libfork_benchmark
PRIVATE
src/libfork_benchmark/fib/lf_parts.cpp
)

target_link_libraries(libfork_benchmark
PRIVATE
Expand Down
2 changes: 1 addition & 1 deletion benchmark/src/libfork_benchmark/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <format>
#include <stdexcept>

#include "libfork/macros.hpp"
#include "libfork/__impl/exception.hpp"

struct incorrect_result : public std::runtime_error {
using std::runtime_error::runtime_error;
Expand Down
Loading
Loading