over-simplified template syntax to please gcc

This commit is contained in:
cryptozoidberg 2024-02-19 00:01:32 +04:00
parent f43cd585c7
commit bb4cc18c55
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC

View file

@ -26,7 +26,7 @@ namespace bc_services
return t.type();
}
template<typename t_return_type, typename t_type>
static const t_return_type& get(const t_type& t)
static const t_return_type& get(const t_type& t, const t_return_type& dummy)
{
return boost::get<t_return_type>(t);
}
@ -41,7 +41,7 @@ namespace bc_services
return typeid(t);
}
template<typename t_return_type, typename t_type>
static const t_return_type& get(const t_type& t)
static const t_return_type& get(const t_type& t, const t_return_type& dummy)
{
return t;
}
@ -54,7 +54,7 @@ namespace bc_services
{
if (/*item.type()*/ type_selector<is_boost_variant<typename t_attachment_type_container_t::value_type>::value>::get_type(item) == typeid(currency::tx_service_attachment))
{
const currency::tx_service_attachment& tsa = type_selector<is_boost_variant<typename t_attachment_type_container_t::value_type>::value>::get<currency::tx_service_attachment>(item);
const currency::tx_service_attachment& tsa = type_selector<is_boost_variant<typename t_attachment_type_container_t::value_type>::value>::get(item, currency::tx_service_attachment());
//const currency::tx_service_attachment& tsa = boost::get<currency::tx_service_attachment>(item);
if (tsa.service_id == id && tsa.instruction == instruction)
{