Skip to content

Fix Variant #768

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

Draft
wants to merge 28 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
72311fd
Construct Variant with move-only type
sfodagain Aug 5, 2025
68c31e0
Make more similar to cpp-v2 failure test
sfodagain Aug 5, 2025
317a09b
Even more similar
sfodagain Aug 5, 2025
85d7bea
Wrap into class
sfodagain Aug 5, 2025
5951115
Add VariantWrapper
sfodagain Aug 6, 2025
c8cb6ce
Add failing test
sfodagain Aug 8, 2025
b542771
Try to reproduce with AWS_CRT_CPP_API
sfodagain Aug 11, 2025
8289f3f
Try to instantiate
sfodagain Aug 11, 2025
d6fcd78
Simplify test
sfodagain Aug 11, 2025
d13dbed
Use only Variant in tests for now
sfodagain Aug 12, 2025
9b73c66
Merge branch 'main' into fix-variant
sfodagain Aug 12, 2025
2ae5d81
Use VariantWrapper with a fix
sfodagain Aug 12, 2025
3a5bb61
Replace Variant with VariantWrapper
sfodagain Aug 12, 2025
c2c9b81
Use proper naming
sfodagain Aug 12, 2025
8995ecb
Cleaning up
sfodagain Aug 12, 2025
ee70c0e
Rearrange tests
sfodagain Aug 12, 2025
67bc43e
Revert Variant.h to ensure new test fails
sfodagain Aug 12, 2025
91f180f
Restore Variant changes
sfodagain Aug 12, 2025
ff7837c
Add copy-only test
sfodagain Aug 12, 2025
7db8322
Fix naming in tests
sfodagain Aug 12, 2025
892c0b0
Extract Conjunction into type_traits header
sfodagain Aug 12, 2025
9db24fc
Add test case for nothrow constructible
sfodagain Aug 12, 2025
0b713fb
More tests
sfodagain Aug 12, 2025
9cd1ce1
Clean test
sfodagain Aug 12, 2025
151688a
Add missing header
sfodagain Aug 12, 2025
06a9ad3
Check noexcept in VariantImpl
sfodagain Aug 12, 2025
1f69433
Try this ugly solution for non default constructible
sfodagain Aug 12, 2025
dbb5d55
Use sfinae with default ctor
sfodagain Aug 13, 2025
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
14 changes: 14 additions & 0 deletions include/aws/crt/TypeTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,19 @@ namespace Aws
struct IsSpecializationOf<Primary<Args...>, Primary> : std::true_type
{
};

/**
* Forms the logical conjunction of the type traits Args..., effectively performing a logical AND on the
* sequence of traits.
*/
template <typename... Args> struct Conjunction : std::true_type
{
};

template <typename Arg, typename... Args>
struct Conjunction<Arg, Args...> : std::conditional<Arg::value, Conjunction<Args...>, std::false_type>::type
{
};

} // namespace Crt
} // namespace Aws
Loading
Loading