@@ -569,6 +569,10 @@ struct manipulator
569569template <actions_collectable TCollect, family_checkable TFamily, element_manipulatable TManipulate>
570570class adaptor : private TCollect , private TFamily , private TManipulate {
571571 public:
572+ /* * The type of callback used for collecting adaptation actions. */
573+ using callback_type
574+ = std::conditional_t <has_element_callback_collect<TCollect>, element_callback, batched_element_callback>;
575+
572576 /* * Constructor for basic_adaptation class.
573577 * \param [in] forest The target forest to be adapted.
574578 * \param [in] forest_from The source forest to adapt from.
@@ -577,7 +581,7 @@ class adaptor: private TCollect, private TFamily, private TManipulate {
577581 *
578582 * \note The constructor increments reference counts for non-null forest handles, and the destructor will release them.
579583 */
580- adaptor (t8_forest_t forest, t8_forest_t forest_from, element_callback callback_in, bool profiling_in = false )
584+ adaptor (t8_forest_t forest, t8_forest_t forest_from, callback_type callback_in, bool profiling_in = false )
581585 : callback (callback_in), forest (forest), forest_from (forest_from), profiling (profiling_in)
582586 {
583587 T8_ASSERT (forest != nullptr );
@@ -655,9 +659,6 @@ class adaptor: private TCollect, private TFamily, private TManipulate {
655659 profile_adaptation_end ();
656660 }
657661 }
658- /* * The type of callback used for collecting adaptation actions. */
659- using callback_type
660- = std::conditional_t <has_element_callback_collect<TCollect>, element_callback, batched_element_callback>;
661662
662663 callback_type callback; /* *< The callback function to determine adaptation actions. */
663664 private:
0 commit comments