Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trying to declare a var using cci::cci_param<std::map<std::string, int>> #320

Open
jingliangliang1 opened this issue Nov 29, 2024 · 0 comments

Comments

@jingliangliang1
Copy link

jingliangliang1 commented Nov 29, 2024

Declare the cci_param variable, I think using the basic type, like int, string, and I want to use map just like int. But the following code reported an error, do not know what the reason, request help, thank very much.

my code:

#include <systemc>
#include <cci_configuration>
#include <iostream>
#include <map>
#include <string>

SC_MODULE(config_ip) {
        public:
        SC_CTOR(config_ip):
        m_broker(cci::cci_get_broker())
        {
            SC_THREAD(execute);
            setup_param();
        }
        void setup_param() {
            const std::string map_param_name = "sim_ip.map_param";
            cci::cci_param_handle map_param_handle = m_broker.get_param_handle(map_param_name);

            if (map_param_handle.is_valid()) {
                std::cout << "execute: [EXTERNAL] Set value of  " << map_param_name << " to 2" << std::endl;
                map_param_handle.set_cci_value(cci::cci_value(2));

                cci::cci_value new_value = map_param_handle.get_cci_value();
                if (new_value.is_map()) {
                    cci::cci_value::const_map_reference m = new_value.get_map();
                    std::cout << "map:  " << m.has_entry("key") << " key " << m.at("key").try_get("key") << std::endl;
                }
            } else {
                std::cout << "execute: Param (" << map_param_name<< ") is not found!" << std::endl;
            }
        }
        void execute() {
            const std::string map_param_name = "sim_ip.map_param";
            cci::cci_param_handle map_param_handle = m_broker.get_param_handle(map_param_name);

            if (map_param_handle.is_valid()) {
                std::cout << "execute: [EXTERNAL] Set value of  " << map_param_name << std::endl;
                map_param_handle.set_cci_value(cci::cci_value(2));

                cci::cci_value new_value = map_param_handle.get_cci_value();
                if (new_value.is_map()) {
                    cci::cci_value::const_map_reference m = new_value.get_map();
                    std::cout << "map:  " << m.has_entry("key") << " key " << m.at("key").try_get("key") << std::endl;
                }
            } else {
                std::cout << "execute: Param (" << map_param_name<< ") is not found!" << std::endl;
            }

            wait(5, sc_core::SC_NS);

            if (map_param_handle.is_valid()) {
                std::cout << "execute: [EXTERNAL] Set value of  " << map_param_name << std::endl;
                map_param_handle.set_cci_value(cci::cci_value(2));

                cci::cci_value new_value = map_param_handle.get_cci_value();
                if (new_value.is_map()) {
                    cci::cci_value::const_map_reference m = new_value.get_map();
                    std::cout << "map:  " << m.has_entry("key") << " key " << m.at("key").try_get("key") << std::endl;
                }
            } else {
                std::cout << "execute: Param (" << map_param_name<< ") is not found!" << std::endl;
            }
        }

        private:
        cci::cci_broker_handle m_broker;
};

SC_MODULE(simple_ip){
        public:
        SC_CTOR(simple_ip)
        {
            std::map<std::string, int> initial_value = {{"key1", 1}, {"key2", 2}};
            cci::cci_param_typed<std::map<std::string, int>, cci::CCI_MUTABLE_PARAM> map_param(
                    "map_param", initial_value);

            SC_THREAD(execute);
            std::cout << "map_param " << map_param.name() << std::endl;
        }
        void execute() {
            std::cout << "0 ns map_param " << map_param.name() << std::endl;
            wait(10, sc_core::SC_NS);
            map_param = {{"key1", 2}};
            std::cout << "after 10 ns map_param " << map_param.name() << std::endl;
        }

        private:
        cci::cci_param<std::map<std::string, int>> map_param;
};

int sc_main(int argc, char *argv[]) {
    cci::cci_register_broker(new cci_utils::broker("My Global Broker"));
    config_ip cfg_ip("cfg_ip");
    simple_ip sim_ip("sim_ip");

    sc_core::sc_start();

    return 0;
}

error log:

main.cpp: In constructor ‘simple_ip::simple_ip(sc_core::sc_module_name)’:
main.cpp:72:9: error: no matching function for call to ‘cci::cci_param_typed<std::map<std::__cxx11::basic_string<char>, int>, cci::CCI_MUTABLE_PARAM>::cci_param_typed()’
   72 |         {
      |         ^
In file included from systemc-cci/include/cci_configuration:38,
                 from main.cpp:2:
systemc-cci/include/cci/cfg/cci_param_typed.h:889:3: note: candidate: ‘cci::cci_param_typed<T, TM>::cci_param_typed(const std::string&, const cci::cci_value&, cci::cci_broker_handle, const std::string&, cci::cci_name_type, const cci::cci_originator&) [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_mutable_type TM = cci::CCI_MUTABLE_PARAM; std::string = std::__cxx11::basic_string<char>]’
  889 |   cci_param_typed<T, TM>::cci_param_typed signature                            \
      |   ^~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h:944:1: note: in expansion of macro ‘CCI_PARAM_CONSTRUCTOR_CCI_VALUE_IMPL’
  944 | CCI_PARAM_CONSTRUCTOR_CCI_VALUE_IMPL((const std::string& name,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h:889:3: note:   candidate expects 6 arguments, 0 provided
  889 |   cci_param_typed<T, TM>::cci_param_typed signature                            \
      |   ^~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h:944:1: note: in expansion of macro ‘CCI_PARAM_CONSTRUCTOR_CCI_VALUE_IMPL’
  944 | CCI_PARAM_CONSTRUCTOR_CCI_VALUE_IMPL((const std::string& name,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h:905:1: note: candidate: ‘cci::cci_param_typed<T, TM>::cci_param_typed(const std::string&, const value_type&, cci::cci_broker_handle, const std::string&, cci::cci_name_type, const cci::cci_originator&) [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_mutable_type TM = cci::CCI_MUTABLE_PARAM; std::string = std::__cxx11::basic_string<char>; value_type = std::map<std::__cxx11::basic_string<char>, int>]’
  905 | cci_param_typed<T, TM>::cci_param_typed signature                              \
      | ^~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h:934:1: note: in expansion of macro ‘CCI_PARAM_CONSTRUCTOR_IMPL’
  934 | CCI_PARAM_CONSTRUCTOR_IMPL((const std::string& name,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h:905:1: note:   candidate expects 6 arguments, 0 provided
  905 | cci_param_typed<T, TM>::cci_param_typed signature                              \
      | ^~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h:934:1: note: in expansion of macro ‘CCI_PARAM_CONSTRUCTOR_IMPL’
  934 | CCI_PARAM_CONSTRUCTOR_IMPL((const std::string& name,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h:889:3: note: candidate: ‘cci::cci_param_typed<T, TM>::cci_param_typed(const std::string&, const cci::cci_value&, const std::string&, cci::cci_name_type, const cci::cci_originator&) [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_mutable_type TM = cci::CCI_MUTABLE_PARAM; std::string = std::__cxx11::basic_string<char>]’
  889 |   cci_param_typed<T, TM>::cci_param_typed signature                            \
      |   ^~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h:925:1: note: in expansion of macro ‘CCI_PARAM_CONSTRUCTOR_CCI_VALUE_IMPL’
  925 | CCI_PARAM_CONSTRUCTOR_CCI_VALUE_IMPL((const std::string& name,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h:889:3: note:   candidate expects 5 arguments, 0 provided
  889 |   cci_param_typed<T, TM>::cci_param_typed signature                            \
      |   ^~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h:925:1: note: in expansion of macro ‘CCI_PARAM_CONSTRUCTOR_CCI_VALUE_IMPL’
  925 | CCI_PARAM_CONSTRUCTOR_CCI_VALUE_IMPL((const std::string& name,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h:905:1: note: candidate: ‘cci::cci_param_typed<T, TM>::cci_param_typed(const std::string&, const value_type&, const std::string&, cci::cci_name_type, const cci::cci_originator&) [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_mutable_type TM = cci::CCI_MUTABLE_PARAM; std::string = std::__cxx11::basic_string<char>; value_type = std::map<std::__cxx11::basic_string<char>, int>]’
  905 | cci_param_typed<T, TM>::cci_param_typed signature                              \
      | ^~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h:916:1: note: in expansion of macro ‘CCI_PARAM_CONSTRUCTOR_IMPL’
  916 | CCI_PARAM_CONSTRUCTOR_IMPL((const std::string& name,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h:905:1: note:   candidate expects 5 arguments, 0 provided
  905 | cci_param_typed<T, TM>::cci_param_typed signature                              \
      | ^~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h:916:1: note: in expansion of macro ‘CCI_PARAM_CONSTRUCTOR_IMPL’
  916 | CCI_PARAM_CONSTRUCTOR_IMPL((const std::string& name,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h: In instantiation of ‘void cci::cci_param_typed<T, TM>::set_cci_value(const cci::cci_value&, const void*, const cci::cci_originator&) [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_mutable_type TM = cci::CCI_MUTABLE_PARAM]’:
systemc-cci/include/cci/cfg/cci_param_typed.h:756:6:   required from here
systemc-cci/include/cci/cfg/cci_param_typed.h:760:39: error: no matching function for call to ‘cci::cci_value::get<cci::cci_param_typed<std::map<std::__cxx11::basic_string<char>, int>, cci::CCI_MUTABLE_PARAM>::value_type>() const’
  760 |     value_type v = val.get<value_type>();
      |                    ~~~~~~~~~~~~~~~~~~~^~
In file included from systemc-cci/include/cci_configuration:28:
systemc-cci/include/cci/core/cci_value.h:198:38: note: candidate: ‘template<class T> typename cci::cci_impl::value_converter_enable_if<T, T>::type cci::cci_value_cref::get() const’
  198 |   CCI_VALUE_REQUIRES_CONVERTER_(T,T) get() const;
      |                                      ^~~
systemc-cci/include/cci/core/cci_value.h:198:38: note:   template argument deduction/substitution failed:
systemc-cci/include/cci/core/cci_value.h: In substitution of ‘template<class T> typename cci::cci_impl::value_converter_enable_if<T, T>::type cci::cci_value_cref::get() const [with T = std::map<std::__cxx11::basic_string<char>, int>]’:
systemc-cci/include/cci/cfg/cci_param_typed.h:760:39:   required from ‘void cci::cci_param_typed<T, TM>::set_cci_value(const cci::cci_value&, const void*, const cci::cci_originator&) [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_mutable_type TM = cci::CCI_MUTABLE_PARAM]’
systemc-cci/include/cci/cfg/cci_param_typed.h:756:6:   required from here
systemc-cci/include/cci/core/cci_value.h:241:36: error: no type named ‘type’ in ‘struct cci::cci_impl::value_converter_enable_if<std::map<std::__cxx11::basic_string<char>, int>, std::map<std::__cxx11::basic_string<char>, int> >’
  241 | CCI_VALUE_REQUIRES_CONVERTER_(T,T) cci_value_cref::get() const
      |                                    ^~~~~~~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h: In instantiation of ‘cci::cci_value cci::cci_param_typed<T, TM>::get_cci_value(const cci::cci_originator&) const [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_mutable_type TM = cci::CCI_MUTABLE_PARAM]’:
systemc-cci/include/cci/cfg/cci_param_typed.h:786:1:   required from here
systemc-cci/include/cci/cfg/cci_param_typed.h:788:12: error: no matching function for call to ‘cci::cci_value::cci_value(const std::map<std::__cxx11::basic_string<char>, int>&)’
  788 |     return cci_value( get_value(originator) );
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1161:3: note: candidate: ‘template<class T> cci::cci_value::cci_value(const T&, typename cci::cci_impl::value_converter_enable_if<T, void>::type*)’
 1161 |   cci_value( T const & src
      |   ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1161:3: note:   template argument deduction/substitution failed:
systemc-cci/include/cci/core/cci_value.h: In substitution of ‘template<class T> cci::cci_value::cci_value(const T&, typename cci::cci_impl::value_converter_enable_if<T, void>::type*) [with T = std::map<std::__cxx11::basic_string<char>, int>]’:
systemc-cci/include/cci/cfg/cci_param_typed.h:788:12:   required from ‘cci::cci_value cci::cci_param_typed<T, TM>::get_cci_value(const cci::cci_originator&) const [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_mutable_type TM = cci::CCI_MUTABLE_PARAM]’
systemc-cci/include/cci/cfg/cci_param_typed.h:786:1:   required from here
systemc-cci/include/cci/core/cci_value.h:1272:1: error: no type named ‘type’ in ‘struct cci::cci_impl::value_converter_enable_if<std::map<std::__cxx11::basic_string<char>, int>, void>’
 1272 | cci_value::cci_value( T const & v
      | ^~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h: In instantiation of ‘cci::cci_value cci::cci_param_typed<T, TM>::get_cci_value(const cci::cci_originator&) const [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_mutable_type TM = cci::CCI_MUTABLE_PARAM]’:
systemc-cci/include/cci/cfg/cci_param_typed.h:786:1:   required from here
systemc-cci/include/cci/core/cci_value.h:1291:1: note: candidate: ‘cci::cci_value::cci_value(const_reference)’
 1291 | cci_value::cci_value( const_reference that )
      | ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1291:39: note:   no known conversion for argument 1 from ‘const std::map<std::__cxx11::basic_string<char>, int>’ to ‘cci::cci_value::const_reference’ {aka ‘cci::cci_value_cref’}
 1291 | cci_value::cci_value( const_reference that )
      |                       ~~~~~~~~~~~~~~~~^~~~
systemc-cci/include/cci/core/cci_value.h:1284:1: note: candidate: ‘cci::cci_value::cci_value(const this_type&)’
 1284 | cci_value::cci_value( this_type const & that )
      | ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1284:41: note:   no known conversion for argument 1 from ‘const std::map<std::__cxx11::basic_string<char>, int>’ to ‘const cci::cci_value::this_type&’ {aka ‘const cci::cci_value&’}
 1284 | cci_value::cci_value( this_type const & that )
      |                       ~~~~~~~~~~~~~~~~~~^~~~
systemc-cci/include/cci/core/cci_value.h:1155:3: note: candidate: ‘cci::cci_value::cci_value()’
 1155 |   cci_value()
      |   ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1155:3: note:   candidate expects 0 arguments, 1 provided
systemc-cci/include/cci/cfg/cci_param_typed.h: In instantiation of ‘cci::cci_value cci::cci_param_typed<T, TM>::get_default_cci_value() const [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_mutable_type TM = cci::CCI_MUTABLE_PARAM]’:
systemc-cci/include/cci/cfg/cci_param_typed.h:792:11:   required from here
systemc-cci/include/cci/cfg/cci_param_typed.h:793:12: error: no matching function for call to ‘cci::cci_value::cci_value(const cci::cci_param_typed<std::map<std::__cxx11::basic_string<char>, int>, cci::CCI_MUTABLE_PARAM>::value_type&)’
  793 |     return cci_value(m_default_value);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1161:3: note: candidate: ‘template<class T> cci::cci_value::cci_value(const T&, typename cci::cci_impl::value_converter_enable_if<T, void>::type*)’
 1161 |   cci_value( T const & src
      |   ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1161:3: note:   template argument deduction/substitution failed:
systemc-cci/include/cci/core/cci_value.h: In substitution of ‘template<class T> cci::cci_value::cci_value(const T&, typename cci::cci_impl::value_converter_enable_if<T, void>::type*) [with T = std::map<std::__cxx11::basic_string<char>, int>]’:
systemc-cci/include/cci/cfg/cci_param_typed.h:793:12:   required from ‘cci::cci_value cci::cci_param_typed<T, TM>::get_default_cci_value() const [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_mutable_type TM = cci::CCI_MUTABLE_PARAM]’
systemc-cci/include/cci/cfg/cci_param_typed.h:792:11:   required from here
systemc-cci/include/cci/core/cci_value.h:1272:1: error: no type named ‘type’ in ‘struct cci::cci_impl::value_converter_enable_if<std::map<std::__cxx11::basic_string<char>, int>, void>’
 1272 | cci_value::cci_value( T const & v
      | ^~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_typed.h: In instantiation of ‘cci::cci_value cci::cci_param_typed<T, TM>::get_default_cci_value() const [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_mutable_type TM = cci::CCI_MUTABLE_PARAM]’:
systemc-cci/include/cci/cfg/cci_param_typed.h:792:11:   required from here
systemc-cci/include/cci/core/cci_value.h:1291:1: note: candidate: ‘cci::cci_value::cci_value(const_reference)’
 1291 | cci_value::cci_value( const_reference that )
      | ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1291:39: note:   no known conversion for argument 1 from ‘const cci::cci_param_typed<std::map<std::__cxx11::basic_string<char>, int>, cci::CCI_MUTABLE_PARAM>::value_type’ {aka ‘const std::map<std::__cxx11::basic_string<char>, int>’} to ‘cci::cci_value::const_reference’ {aka ‘cci::cci_value_cref’}
 1291 | cci_value::cci_value( const_reference that )
      |                       ~~~~~~~~~~~~~~~~^~~~
systemc-cci/include/cci/core/cci_value.h:1284:1: note: candidate: ‘cci::cci_value::cci_value(const this_type&)’
 1284 | cci_value::cci_value( this_type const & that )
      | ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1284:41: note:   no known conversion for argument 1 from ‘const cci::cci_param_typed<std::map<std::__cxx11::basic_string<char>, int>, cci::CCI_MUTABLE_PARAM>::value_type’ {aka ‘const std::map<std::__cxx11::basic_string<char>, int>’} to ‘const cci::cci_value::this_type&’ {aka ‘const cci::cci_value&’}
 1284 | cci_value::cci_value( this_type const & that )
      |                       ~~~~~~~~~~~~~~~~~~^~~~
systemc-cci/include/cci/core/cci_value.h:1155:3: note: candidate: ‘cci::cci_value::cci_value()’
 1155 |   cci_value()
      |   ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1155:3: note:   candidate expects 0 arguments, 1 provided
systemc-cci/include/cci/cfg/cci_param_typed.h: In instantiation of ‘bool cci::cci_param_typed<T, TM>::is_preset_value() const [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_mutable_type TM = cci::CCI_MUTABLE_PARAM]’:
systemc-cci/include/cci/cfg/cci_param_typed.h:803:6:   required from here
systemc-cci/include/cci/cfg/cci_param_typed.h:809:30: error: no matching function for call to ‘cci::cci_value::try_get<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > >(std::map<std::__cxx11::basic_string<char>, int>&)’
  809 |     if (init_value.try_get<T>(i)) {
      |         ~~~~~~~~~~~~~~~~~~~~~^~~
systemc-cci/include/cci/core/cci_value.h:234:1: note: candidate: ‘template<class T> typename cci::cci_impl::value_converter_enable_if<T, bool>::type cci::cci_value_cref::try_get(T&) const’
  234 | cci_value_cref::try_get( T& dst ) const
      | ^~~~~~~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:234:1: note:   template argument deduction/substitution failed:
systemc-cci/include/cci/core/cci_value.h: In substitution of ‘template<class T> typename cci::cci_impl::value_converter_enable_if<T, bool>::type cci::cci_value_cref::try_get(T&) const [with T = std::map<std::__cxx11::basic_string<char>, int>]’:
systemc-cci/include/cci/cfg/cci_param_typed.h:809:30:   required from ‘bool cci::cci_param_typed<T, TM>::is_preset_value() const [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_mutable_type TM = cci::CCI_MUTABLE_PARAM]’
systemc-cci/include/cci/cfg/cci_param_typed.h:803:6:   required from here
systemc-cci/include/cci/core/cci_value.h:234:1: error: no type named ‘type’ in ‘struct cci::cci_impl::value_converter_enable_if<std::map<std::__cxx11::basic_string<char>, int>, bool>’
systemc-cci/include/cci/cfg/cci_param_typed.h: In instantiation of ‘void cci::cci_param_typed<T, TM>::preset_cci_value(const cci::cci_value&, const cci::cci_originator&) [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_mutable_type TM = cci::CCI_MUTABLE_PARAM]’:
systemc-cci/include/cci/cfg/cci_param_typed.h:765:6:   required from here
systemc-cci/include/cci/cfg/cci_param_typed.h:769:47: error: no matching function for call to ‘cci::cci_value::get<cci::cci_param_typed<std::map<std::__cxx11::basic_string<char>, int>, cci::CCI_MUTABLE_PARAM>::value_type>() const’
  769 |     value_type new_value = val.get<value_type>();
      |                            ~~~~~~~~~~~~~~~~~~~^~
systemc-cci/include/cci/core/cci_value.h:198:38: note: candidate: ‘template<class T> typename cci::cci_impl::value_converter_enable_if<T, T>::type cci::cci_value_cref::get() const’
  198 |   CCI_VALUE_REQUIRES_CONVERTER_(T,T) get() const;
      |                                      ^~~
systemc-cci/include/cci/core/cci_value.h:198:38: note:   template argument deduction/substitution failed:
systemc-cci/include/cci/core/cci_value.h: In substitution of ‘template<class T> typename cci::cci_impl::value_converter_enable_if<T, T>::type cci::cci_value_cref::get() const [with T = std::map<std::__cxx11::basic_string<char>, int>]’:
systemc-cci/include/cci/cfg/cci_param_typed.h:769:47:   required from ‘void cci::cci_param_typed<T, TM>::preset_cci_value(const cci::cci_value&, const cci::cci_originator&) [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_mutable_type TM = cci::CCI_MUTABLE_PARAM]’
systemc-cci/include/cci/cfg/cci_param_typed.h:765:6:   required from here
systemc-cci/include/cci/core/cci_value.h:241:36: error: no type named ‘type’ in ‘struct cci::cci_impl::value_converter_enable_if<std::map<std::__cxx11::basic_string<char>, int>, std::map<std::__cxx11::basic_string<char>, int> >’
  241 | CCI_VALUE_REQUIRES_CONVERTER_(T,T) cci_value_cref::get() const
      |                                    ^~~~~~~~~~~~~~
In file included from systemc-cci/include/cci/cfg/cci_param_untyped_handle.h:27,
                 from systemc-cci/include/cci/cfg/cci_param_typed_handle.h:24,
                 from systemc-cci/include/cci/cfg/cci_broker_handle.h:27,
                 from systemc-cci/include/cci_configuration:35:
systemc-cci/include/cci/cfg/cci_param_callbacks.h: In instantiation of ‘cci::cci_param_write_event<T>::generic_wrap::generic_wrap(const cci::cci_param_write_event<T>::type&) [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_write_event<T>::type = cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >]’:
systemc-cci/include/cci/core/cci_callback_impl.h:214:45:   required from ‘cci::cci_impl::callback_generic_adapt<Traits, true>::result_type cci::cci_impl::callback_generic_adapt<Traits, true>::invoke(argument_type) const [with Traits = cci::cci_callback_traits<const cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >&, void>; result_type = void; argument_type = const cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >&]’
systemc-cci/include/cci/core/cci_callback_impl.h:211:23:   required from here
systemc-cci/include/cci/cfg/cci_param_callbacks.h:285:7: error: no matching function for call to ‘cci::cci_value::cci_value(const cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >::value_type&)’
  285 |     : old_value( payload.old_value )
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1161:3: note: candidate: ‘template<class T> cci::cci_value::cci_value(const T&, typename cci::cci_impl::value_converter_enable_if<T, void>::type*)’
 1161 |   cci_value( T const & src
      |   ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1161:3: note:   template argument deduction/substitution failed:
systemc-cci/include/cci/core/cci_value.h: In substitution of ‘template<class T> cci::cci_value::cci_value(const T&, typename cci::cci_impl::value_converter_enable_if<T, void>::type*) [with T = std::map<std::__cxx11::basic_string<char>, int>]’:
systemc-cci/include/cci/cfg/cci_param_callbacks.h:285:7:   required from ‘cci::cci_param_write_event<T>::generic_wrap::generic_wrap(const cci::cci_param_write_event<T>::type&) [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_write_event<T>::type = cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >]’
systemc-cci/include/cci/core/cci_callback_impl.h:214:45:   required from ‘cci::cci_impl::callback_generic_adapt<Traits, true>::result_type cci::cci_impl::callback_generic_adapt<Traits, true>::invoke(argument_type) const [with Traits = cci::cci_callback_traits<const cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >&, void>; result_type = void; argument_type = const cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >&]’
systemc-cci/include/cci/core/cci_callback_impl.h:211:23:   required from here
systemc-cci/include/cci/core/cci_value.h:1272:1: error: no type named ‘type’ in ‘struct cci::cci_impl::value_converter_enable_if<std::map<std::__cxx11::basic_string<char>, int>, void>’
 1272 | cci_value::cci_value( T const & v
      | ^~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_callbacks.h: In instantiation of ‘cci::cci_param_write_event<T>::generic_wrap::generic_wrap(const cci::cci_param_write_event<T>::type&) [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_write_event<T>::type = cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >]’:
systemc-cci/include/cci/core/cci_callback_impl.h:214:45:   required from ‘cci::cci_impl::callback_generic_adapt<Traits, true>::result_type cci::cci_impl::callback_generic_adapt<Traits, true>::invoke(argument_type) const [with Traits = cci::cci_callback_traits<const cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >&, void>; result_type = void; argument_type = const cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >&]’
systemc-cci/include/cci/core/cci_callback_impl.h:211:23:   required from here
systemc-cci/include/cci/core/cci_value.h:1291:1: note: candidate: ‘cci::cci_value::cci_value(const_reference)’
 1291 | cci_value::cci_value( const_reference that )
      | ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1291:39: note:   no known conversion for argument 1 from ‘const cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >::value_type’ {aka ‘const std::map<std::__cxx11::basic_string<char>, int>’} to ‘cci::cci_value::const_reference’ {aka ‘cci::cci_value_cref’}
 1291 | cci_value::cci_value( const_reference that )
      |                       ~~~~~~~~~~~~~~~~^~~~
systemc-cci/include/cci/core/cci_value.h:1284:1: note: candidate: ‘cci::cci_value::cci_value(const this_type&)’
 1284 | cci_value::cci_value( this_type const & that )
      | ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1284:41: note:   no known conversion for argument 1 from ‘const cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >::value_type’ {aka ‘const std::map<std::__cxx11::basic_string<char>, int>’} to ‘const cci::cci_value::this_type&’ {aka ‘const cci::cci_value&’}
 1284 | cci_value::cci_value( this_type const & that )
      |                       ~~~~~~~~~~~~~~~~~~^~~~
systemc-cci/include/cci/core/cci_value.h:1155:3: note: candidate: ‘cci::cci_value::cci_value()’
 1155 |   cci_value()
      |   ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1155:3: note:   candidate expects 0 arguments, 1 provided
systemc-cci/include/cci/cfg/cci_param_callbacks.h:286:7: error: no matching function for call to ‘cci::cci_value::cci_value(const cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >::value_type&)’
  286 |     , new_value( payload.new_value )
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1161:3: note: candidate: ‘template<class T> cci::cci_value::cci_value(const T&, typename cci::cci_impl::value_converter_enable_if<T, void>::type*)’
 1161 |   cci_value( T const & src
      |   ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1161:3: note:   template argument deduction/substitution failed:
systemc-cci/include/cci/core/cci_value.h: In substitution of ‘template<class T> cci::cci_value::cci_value(const T&, typename cci::cci_impl::value_converter_enable_if<T, void>::type*) [with T = std::map<std::__cxx11::basic_string<char>, int>]’:
systemc-cci/include/cci/cfg/cci_param_callbacks.h:286:7:   required from ‘cci::cci_param_write_event<T>::generic_wrap::generic_wrap(const cci::cci_param_write_event<T>::type&) [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_write_event<T>::type = cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >]’
systemc-cci/include/cci/core/cci_callback_impl.h:214:45:   required from ‘cci::cci_impl::callback_generic_adapt<Traits, true>::result_type cci::cci_impl::callback_generic_adapt<Traits, true>::invoke(argument_type) const [with Traits = cci::cci_callback_traits<const cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >&, void>; result_type = void; argument_type = const cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >&]’
systemc-cci/include/cci/core/cci_callback_impl.h:211:23:   required from here
systemc-cci/include/cci/core/cci_value.h:1272:1: error: no type named ‘type’ in ‘struct cci::cci_impl::value_converter_enable_if<std::map<std::__cxx11::basic_string<char>, int>, void>’
 1272 | cci_value::cci_value( T const & v
      | ^~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_callbacks.h: In instantiation of ‘cci::cci_param_write_event<T>::generic_wrap::generic_wrap(const cci::cci_param_write_event<T>::type&) [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_write_event<T>::type = cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >]’:
systemc-cci/include/cci/core/cci_callback_impl.h:214:45:   required from ‘cci::cci_impl::callback_generic_adapt<Traits, true>::result_type cci::cci_impl::callback_generic_adapt<Traits, true>::invoke(argument_type) const [with Traits = cci::cci_callback_traits<const cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >&, void>; result_type = void; argument_type = const cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >&]’
systemc-cci/include/cci/core/cci_callback_impl.h:211:23:   required from here
systemc-cci/include/cci/core/cci_value.h:1291:1: note: candidate: ‘cci::cci_value::cci_value(const_reference)’
 1291 | cci_value::cci_value( const_reference that )
      | ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1291:39: note:   no known conversion for argument 1 from ‘const cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >::value_type’ {aka ‘const std::map<std::__cxx11::basic_string<char>, int>’} to ‘cci::cci_value::const_reference’ {aka ‘cci::cci_value_cref’}
 1291 | cci_value::cci_value( const_reference that )
      |                       ~~~~~~~~~~~~~~~~^~~~
systemc-cci/include/cci/core/cci_value.h:1284:1: note: candidate: ‘cci::cci_value::cci_value(const this_type&)’
 1284 | cci_value::cci_value( this_type const & that )
      | ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1284:41: note:   no known conversion for argument 1 from ‘const cci::cci_param_write_event<std::map<std::__cxx11::basic_string<char>, int> >::value_type’ {aka ‘const std::map<std::__cxx11::basic_string<char>, int>’} to ‘const cci::cci_value::this_type&’ {aka ‘const cci::cci_value&’}
 1284 | cci_value::cci_value( this_type const & that )
      |                       ~~~~~~~~~~~~~~~~~~^~~~
systemc-cci/include/cci/core/cci_value.h:1155:3: note: candidate: ‘cci::cci_value::cci_value()’
 1155 |   cci_value()
      |   ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1155:3: note:   candidate expects 0 arguments, 1 provided
systemc-cci/include/cci/cfg/cci_param_callbacks.h: In instantiation of ‘cci::cci_param_read_event<T>::generic_wrap::generic_wrap(const cci::cci_param_read_event<T>::type&) [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_read_event<T>::type = cci::cci_param_read_event<std::map<std::__cxx11::basic_string<char>, int> >]’:
systemc-cci/include/cci/core/cci_callback_impl.h:214:45:   required from ‘cci::cci_impl::callback_generic_adapt<Traits, true>::result_type cci::cci_impl::callback_generic_adapt<Traits, true>::invoke(argument_type) const [with Traits = cci::cci_callback_traits<const cci::cci_param_read_event<std::map<std::__cxx11::basic_string<char>, int> >&, void>; result_type = void; argument_type = const cci::cci_param_read_event<std::map<std::__cxx11::basic_string<char>, int> >&]’
systemc-cci/include/cci/core/cci_callback_impl.h:211:23:   required from here
systemc-cci/include/cci/cfg/cci_param_callbacks.h:313:11: error: no matching function for call to ‘cci::cci_value::cci_value(const cci::cci_param_read_event<std::map<std::__cxx11::basic_string<char>, int> >::value_type&)’
  313 |         : value( payload.value )
      |           ^~~~~~~~~~~~~~~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1161:3: note: candidate: ‘template<class T> cci::cci_value::cci_value(const T&, typename cci::cci_impl::value_converter_enable_if<T, void>::type*)’
 1161 |   cci_value( T const & src
      |   ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1161:3: note:   template argument deduction/substitution failed:
systemc-cci/include/cci/core/cci_value.h: In substitution of ‘template<class T> cci::cci_value::cci_value(const T&, typename cci::cci_impl::value_converter_enable_if<T, void>::type*) [with T = std::map<std::__cxx11::basic_string<char>, int>]’:
systemc-cci/include/cci/cfg/cci_param_callbacks.h:313:11:   required from ‘cci::cci_param_read_event<T>::generic_wrap::generic_wrap(const cci::cci_param_read_event<T>::type&) [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_read_event<T>::type = cci::cci_param_read_event<std::map<std::__cxx11::basic_string<char>, int> >]’
systemc-cci/include/cci/core/cci_callback_impl.h:214:45:   required from ‘cci::cci_impl::callback_generic_adapt<Traits, true>::result_type cci::cci_impl::callback_generic_adapt<Traits, true>::invoke(argument_type) const [with Traits = cci::cci_callback_traits<const cci::cci_param_read_event<std::map<std::__cxx11::basic_string<char>, int> >&, void>; result_type = void; argument_type = const cci::cci_param_read_event<std::map<std::__cxx11::basic_string<char>, int> >&]’
systemc-cci/include/cci/core/cci_callback_impl.h:211:23:   required from here
systemc-cci/include/cci/core/cci_value.h:1272:1: error: no type named ‘type’ in ‘struct cci::cci_impl::value_converter_enable_if<std::map<std::__cxx11::basic_string<char>, int>, void>’
 1272 | cci_value::cci_value( T const & v
      | ^~~~~~~~~
systemc-cci/include/cci/cfg/cci_param_callbacks.h: In instantiation of ‘cci::cci_param_read_event<T>::generic_wrap::generic_wrap(const cci::cci_param_read_event<T>::type&) [with T = std::map<std::__cxx11::basic_string<char>, int>; cci::cci_param_read_event<T>::type = cci::cci_param_read_event<std::map<std::__cxx11::basic_string<char>, int> >]’:
systemc-cci/include/cci/core/cci_callback_impl.h:214:45:   required from ‘cci::cci_impl::callback_generic_adapt<Traits, true>::result_type cci::cci_impl::callback_generic_adapt<Traits, true>::invoke(argument_type) const [with Traits = cci::cci_callback_traits<const cci::cci_param_read_event<std::map<std::__cxx11::basic_string<char>, int> >&, void>; result_type = void; argument_type = const cci::cci_param_read_event<std::map<std::__cxx11::basic_string<char>, int> >&]’
systemc-cci/include/cci/core/cci_callback_impl.h:211:23:   required from here
systemc-cci/include/cci/core/cci_value.h:1291:1: note: candidate: ‘cci::cci_value::cci_value(const_reference)’
 1291 | cci_value::cci_value( const_reference that )
      | ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1291:39: note:   no known conversion for argument 1 from ‘const cci::cci_param_read_event<std::map<std::__cxx11::basic_string<char>, int> >::value_type’ {aka ‘const std::map<std::__cxx11::basic_string<char>, int>’} to ‘cci::cci_value::const_reference’ {aka ‘cci::cci_value_cref’}
 1291 | cci_value::cci_value( const_reference that )
      |                       ~~~~~~~~~~~~~~~~^~~~
systemc-cci/include/cci/core/cci_value.h:1284:1: note: candidate: ‘cci::cci_value::cci_value(const this_type&)’
 1284 | cci_value::cci_value( this_type const & that )
      | ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1284:41: note:   no known conversion for argument 1 from ‘const cci::cci_param_read_event<std::map<std::__cxx11::basic_string<char>, int> >::value_type’ {aka ‘const std::map<std::__cxx11::basic_string<char>, int>’} to ‘const cci::cci_value::this_type&’ {aka ‘const cci::cci_value&’}
 1284 | cci_value::cci_value( this_type const & that )
      |                       ~~~~~~~~~~~~~~~~~~^~~~
systemc-cci/include/cci/core/cci_value.h:1155:3: note: candidate: ‘cci::cci_value::cci_value()’
 1155 |   cci_value()
      |   ^~~~~~~~~
systemc-cci/include/cci/core/cci_value.h:1155:3: note:   candidate expects 0 arguments, 1 provided
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant