@@ -943,29 +943,6 @@ class coop_t : public std::enable_shared_from_this<coop_t>
943943 this ->deregister ( dereg_reason::normal );
944944 }
945945
946- /* !
947- * \brief Return the default dispatcher binder for the coop.
948- *
949- * \code
950- * env.introduce_coop(
951- * // (1) Make the default dispatcher for the coop.
952- * so_5::disp::active_obj::make_dispatcher( env ).binder(),
953- * []( so_5::coop_t & coop ) {
954- * auto binder = coop_disp_binder(); // Will get binder created at (1).
955- * ...
956- * } );
957- * \endcode
958- *
959- * \since v.5.8.1
960- */
961- [[nodiscard]]
962- disp_binder_shptr_t
963- coop_disp_binder () const
964- noexcept ( noexcept ( disp_binder_shptr_t { m_coop_disp_binder } ) )
965- {
966- return m_coop_disp_binder;
967- }
968-
969946 protected:
970947 // ! Typedef for the agent information container.
971948 using agent_array_t = std::vector< agent_ref_t >;
@@ -1315,6 +1292,33 @@ class coop_t : public std::enable_shared_from_this<coop_t>
13151292 child = child->m_next_sibling .get ();
13161293 }
13171294 }
1295+
1296+ public:
1297+ // NOTE: this method is defined after all protected stuff
1298+ // to avoid compilation error with GCC-9.
1299+ /* !
1300+ * \brief Return the default dispatcher binder for the coop.
1301+ *
1302+ * \code
1303+ * env.introduce_coop(
1304+ * // (1) Make the default dispatcher for the coop.
1305+ * so_5::disp::active_obj::make_dispatcher( env ).binder(),
1306+ * []( so_5::coop_t & coop ) {
1307+ * auto binder = coop_disp_binder(); // Will get binder created at (1).
1308+ * ...
1309+ * } );
1310+ * \endcode
1311+ *
1312+ * \since v.5.8.1
1313+ */
1314+ [[nodiscard]]
1315+ disp_binder_shptr_t
1316+ coop_disp_binder () const
1317+ noexcept ( noexcept ( disp_binder_shptr_t { this ->m_coop_disp_binder } ) )
1318+ {
1319+ return m_coop_disp_binder;
1320+ }
1321+
13181322 };
13191323
13201324//
0 commit comments