You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried replacing any_unique_t with any_object_t in any_scheduler to take advantage of the small object optimization, but seem to be hitting some sort of recursion in instantiating the template. any_object instantiates a class invalid_obj which ultimately checks whether each CPO can be invoked. any_scheduler includes the _copy_as CPO which expects any_scheduler to be defined, but finds that any_scheduler is an incomplete type.
any_unique does not have the same invalid_obj class as any_object does.
I tried replacing
any_unique_t
withany_object_t
inany_scheduler
to take advantage of the small object optimization, but seem to be hitting some sort of recursion in instantiating the template.any_object
instantiates a classinvalid_obj
which ultimately checks whether each CPO can be invoked.any_scheduler
includes the_copy_as
CPO which expectsany_scheduler
to be defined, but finds thatany_scheduler
is an incomplete type.any_unique
does not have the sameinvalid_obj
class asany_object
does.In https://github.com/facebookexperimental/libunifex/compare/main...ccotter:libunifex:soo-any_scheduler?expand=1, clang and GCC-11 or above compile if I comment out the
static_assert(can_be_type_erased_v<invalid_obj>)
. When thestatic_assert
is added back, these compilers fail with the incomplete type error. GCC-10 fails to compile even with thestatic_assert
commented out.This godbolt link is also a replication of the error.
cc @lewissbaker
The text was updated successfully, but these errors were encountered: