Skip to content

Commit c5d0a4f

Browse files
committed
Relax the constraint so the static_assert is hit
1 parent e7020f5 commit c5d0a4f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

include/graphqlservice/GraphQLService.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -890,13 +890,13 @@ concept NullableSharedPtr = OnlyNoneModifiers<Other...> && ObjectBaseType<Type>;
890890

891891
// Test if this method should std::static_pointer_cast an ObjectDerivedType to
892892
// std::shared_ptr<const Object>.
893-
template <typename Type, TypeModifier Modifier, TypeModifier... Other>
894-
concept NoneObjectDerivedType = OnlyNoneModifiers<Modifier, Other...> && ObjectDerivedType<Type>;
893+
template <typename Type, TypeModifier Modifier>
894+
concept NoneObjectDerivedType = OnlyNoneModifiers<Modifier> && ObjectDerivedType<Type>;
895895

896896
// Test all other result types to see if they should call the specialized convert method without
897897
// template parameters.
898-
template <typename Type, TypeModifier Modifier, TypeModifier... Other>
899-
concept NoneScalarOrObjectType = OnlyNoneModifiers<Modifier, Other...> && !ObjectDerivedType<Type>;
898+
template <typename Type, TypeModifier Modifier>
899+
concept NoneScalarOrObjectType = OnlyNoneModifiers<Modifier> && !ObjectDerivedType<Type>;
900900

901901
// Test if this method should return a nullable std::shared_ptr<Type>
902902
template <typename Type, TypeModifier Modifier, TypeModifier... Other>
@@ -945,7 +945,7 @@ struct ModifiedResult
945945
template <TypeModifier Modifier = TypeModifier::None, TypeModifier... Other>
946946
[[nodiscard]] static inline AwaitableResolver convert(
947947
AwaitableObject<typename ResultTraits<Type>::type> result,
948-
ResolverParams params) requires NoneObjectDerivedType<Type, Modifier, Other...>
948+
ResolverParams params) requires NoneObjectDerivedType<Type, Modifier>
949949
{
950950
// Call through to the Object specialization with a static_pointer_cast for subclasses of
951951
// Object.
@@ -966,7 +966,7 @@ struct ModifiedResult
966966
template <TypeModifier Modifier = TypeModifier::None, TypeModifier... Other>
967967
[[nodiscard]] static inline AwaitableResolver convert(
968968
typename ResultTraits<Type>::future_type result,
969-
ResolverParams params) requires NoneScalarOrObjectType<Type, Modifier, Other...>
969+
ResolverParams params) requires NoneScalarOrObjectType<Type, Modifier>
970970
{
971971
static_assert(sizeof...(Other) == 0, "None modifier should always be last");
972972

0 commit comments

Comments
 (0)