Skip to content

Commit

Permalink
Fix for compilation error with GCC-9.
Browse files Browse the repository at this point in the history
Version bump to v.5.8.1.1.
  • Loading branch information
eao197 committed Nov 7, 2023
1 parent e2882bf commit 3e140e4
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 27 deletions.
2 changes: 1 addition & 1 deletion dev/so_5/cmake/target.cmake
@@ -1,3 +1,3 @@
set(SO_5_VERSION "5.8.1")
set(SO_5_VERSION "5.8.1.1")
set(SO_5_SHARED_LIB so.${SO_5_VERSION})
set(SO_5_STATIC_LIB so_s.${SO_5_VERSION})
50 changes: 27 additions & 23 deletions dev/so_5/coop.hpp
Expand Up @@ -943,29 +943,6 @@ class coop_t : public std::enable_shared_from_this<coop_t>
this->deregister( dereg_reason::normal );
}

/*!
* \brief Return the default dispatcher binder for the coop.
*
* \code
* env.introduce_coop(
* // (1) Make the default dispatcher for the coop.
* so_5::disp::active_obj::make_dispatcher( env ).binder(),
* []( so_5::coop_t & coop ) {
* auto binder = coop_disp_binder(); // Will get binder created at (1).
* ...
* } );
* \endcode
*
* \since v.5.8.1
*/
[[nodiscard]]
disp_binder_shptr_t
coop_disp_binder() const
noexcept( noexcept( disp_binder_shptr_t{ m_coop_disp_binder } ) )
{
return m_coop_disp_binder;
}

protected:
//! Typedef for the agent information container.
using agent_array_t = std::vector< agent_ref_t >;
Expand Down Expand Up @@ -1315,6 +1292,33 @@ class coop_t : public std::enable_shared_from_this<coop_t>
child = child->m_next_sibling.get();
}
}

public:
//NOTE: this method is defined after all protected stuff
//to avoid compilation error with GCC-9.
/*!
* \brief Return the default dispatcher binder for the coop.
*
* \code
* env.introduce_coop(
* // (1) Make the default dispatcher for the coop.
* so_5::disp::active_obj::make_dispatcher( env ).binder(),
* []( so_5::coop_t & coop ) {
* auto binder = coop_disp_binder(); // Will get binder created at (1).
* ...
* } );
* \endcode
*
* \since v.5.8.1
*/
[[nodiscard]]
disp_binder_shptr_t
coop_disp_binder() const
noexcept( noexcept( disp_binder_shptr_t{ this->m_coop_disp_binder } ) )
{
return m_coop_disp_binder;
}

};

//
Expand Down
4 changes: 2 additions & 2 deletions dev/so_5/version.hpp
Expand Up @@ -12,7 +12,7 @@

#pragma once

// The current version is 5.8.1
// The current version is 5.8.1.1
//
/*!
* A number next to generation number in SObjectizer's version.
Expand Down Expand Up @@ -43,7 +43,7 @@
* or API fixes are added to SObjectizer but SObjectizer API is compatible on
* source-code level.
*/
#define SO_5_VERSION_PATCH 0ull
#define SO_5_VERSION_PATCH 1ull

/*!
* Helper macro for make single number representation of SObjectizer's version.
Expand Down
2 changes: 1 addition & 1 deletion dev/so_5/version.rb
@@ -1,4 +1,4 @@
module So5
VERSION = "5.8.1"
VERSION = "5.8.1.1"
end

0 comments on commit 3e140e4

Please sign in to comment.