Uploaded image for project: 'Kaa'
  1. Kaa
  2. KAA-563

GCC 4.7.3 cannot compile C++ SDK

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 0.7.0
    • Fix Version/s: 0.7.1
    • Component/s: Endpoint: C++
    • Labels:
      None

      Description

      It seems like the Kaa C++ SDK use some C++11 features GCC v.4.7.3 doesn't support.

      /home/dyosick/projects/github_kaa/kaa/client/client-multi/client-cpp/impl/notification/NotificationManager.cpp: In member function 'virtual void kaa::NotificationManager::addNotificationListener(const string&, kaa::INotificationListener&)':
      /home/dyosick/projects/github_kaa/kaa/client/client-multi/client-cpp/impl/notification/NotificationManager.cpp:153:113: error: no matching function for call to 'std::unordered_map<std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> >::insert(std::pair<std::basic_string<char>, std::shared_ptr<kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >)'
      /home/dyosick/projects/github_kaa/kaa/client/client-multi/client-cpp/impl/notification/NotificationManager.cpp:153:113: note: candidates are:
      In file included from /usr/include/c++/4.7/unordered_map:46:0,
      from /home/dyosick/projects/github_kaa/kaa/client/client-multi/client-cpp/kaa/notification/NotificationManager.hpp:26,
      from /home/dyosick/projects/github_kaa/kaa/client/client-multi/client-cpp/impl/notification/NotificationManager.cpp:19:
      /usr/include/c++/4.7/bits/hashtable.h:545:7: note: std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>::_Insert_Return_Type std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>::insert(const value_type&) [with _Key = std::basic_string<char>; _Value = std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> >; _Allocator = std::allocator<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >; _ExtractKey = std::_Select1st<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >; _Equal = std::equal_to<std::basic_string<char> >; _H1 = std::hash<std::basic_string<char> >; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; bool __cache_hash_code = true; bool __constant_iterators = false; bool __unique_keys = true; std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>::_Insert_Return_Type = std::pair<std::__detail::_Node_iterator<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> >, false, true>, bool>; std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>::value_type = std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> >]
      /usr/include/c++/4.7/bits/hashtable.h:545:7: note: no known conversion for argument 1 from 'std::pair<std::basic_string<char>, std::shared_ptr<kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >' to 'const value_type&

      {aka const std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> >&}

      '
      /usr/include/c++/4.7/bits/hashtable.h:549:7: note: std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>::iterator std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>::insert(std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>::const_iterator, const value_type&) [with _Key = std::basic_string<char>; _Value = std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> >; _Allocator = std::allocator<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >; _ExtractKey = std::_Select1st<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >; _Equal = std::equal_to<std::basic_string<char> >; _H1 = std::hash<std::basic_string<char> >; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; bool __cache_hash_code = true; bool __constant_iterators = false; bool __unique_keys = true; std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>::iterator = std::__detail::_Node_iterator<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> >, false, true>; std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>::const_iterator = std::__detail::_Node_const_iterator<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> >, false, true>; std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>::value_type = std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> >]
      /usr/include/c++/4.7/bits/hashtable.h:549:7: note: candidate expects 2 arguments, 1 provided
      /usr/include/c++/4.7/bits/hashtable.h:557:2: note: template<class _Pair, class> std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>::_Insert_Return_Type std::_Hashtable::insert(_Pair&&) [with _Pair = _Pair; <template-parameter-2-2> = <template-parameter-1-2>; _Key = std::basic_string<char>; _Value = std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> >; _Allocator = std::allocator<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >; _ExtractKey = std::_Select1st<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >; _Equal = std::equal_to<std::basic_string<char> >; _H1 = std::hash<std::basic_string<char> >; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; bool __cache_hash_code = true; bool __constant_iterators = false; bool __unique_keys = true]
      /usr/include/c++/4.7/bits/hashtable.h:557:2: note: template argument deduction/substitution failed:
      /usr/include/c++/4.7/bits/hashtable.h:552:32: error: no type named 'type' in 'struct std::enable_if<false, void>'
      /usr/include/c++/4.7/bits/hashtable.h:566:2: note: template<class _Pair, class> std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>::iterator std::_Hashtable::insert(std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>::const_iterator, _Pair&&) [with _Pair = _Pair; <template-parameter-2-2> = <template-parameter-1-2>; _Key = std::basic_string<char>; _Value = std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> >; _Allocator = std::allocator<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >; _ExtractKey = std::_Select1st<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >; _Equal = std::equal_to<std::basic_string<char> >; _H1 = std::hash<std::basic_string<char> >; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; bool __cache_hash_code = true; bool __constant_iterators = false; bool __unique_keys = true]
      /usr/include/c++/4.7/bits/hashtable.h:566:2: note: template argument deduction/substitution failed:
      /home/dyosick/projects/github_kaa/kaa/client/client-multi/client-cpp/impl/notification/NotificationManager.cpp:153:113: note: cannot convert 'std::make_pair(T1&&, _T2&&) [with _T1 = const std::basic_string<char>&; _T2 = std::shared_ptr<kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> >; typename std::__decay_and_strip<_T2>::__type = std::shared_ptr<kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> >; typename std::__decay_and_strip<_Tp>::__type = std::basic_string<char>]((* & std::make_shared(_Args&& ...) [with _Tp = kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*>; _Args = {}]()))' (type 'std::pair<std::basic_string<char>, std::shared_ptr<kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >') to type 'std::_Hashtable<std::basic_string<char>, std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> >, std::allocator<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >, std::_Select1st<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >, std::equal_to<std::basic_string<char> >, std::hash<std::basic_string<char> >, std::detail::_Mod_range_hashing, std::detail::_Default_ranged_hash, std::_detail::_Prime_rehash_policy, true, false, true>::const_iterator

      {aka std::__detail::_Node_const_iterator<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> >, false, true>}

      '
      In file included from /usr/include/c++/4.7/unordered_map:46:0,
      from /home/dyosick/projects/github_kaa/kaa/client/client-multi/client-cpp/kaa/notification/NotificationManager.hpp:26,
      from /home/dyosick/projects/github_kaa/kaa/client/client-multi/client-cpp/impl/notification/NotificationManager.cpp:19:
      /usr/include/c++/4.7/bits/hashtable.h:571:2: note: template<class _InputIterator> void std::_Hashtable::insert(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Key = std::basic_string<char>; _Value = std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> >; _Allocator = std::allocator<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >; _ExtractKey = std::_Select1st<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >; _Equal = std::equal_to<std::basic_string<char> >; _H1 = std::hash<std::basic_string<char> >; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; bool __cache_hash_code = true; bool __constant_iterators = false; bool __unique_keys = true]
      /usr/include/c++/4.7/bits/hashtable.h:571:2: note: template argument deduction/substitution failed:
      /home/dyosick/projects/github_kaa/kaa/client/client-multi/client-cpp/impl/notification/NotificationManager.cpp:153:113: note: candidate expects 2 arguments, 1 provided
      In file included from /usr/include/c++/4.7/unordered_map:46:0,
      from /home/dyosick/projects/github_kaa/kaa/client/client-multi/client-cpp/kaa/notification/NotificationManager.hpp:26,
      from /home/dyosick/projects/github_kaa/kaa/client/client-multi/client-cpp/impl/notification/NotificationManager.cpp:19:
      /usr/include/c++/4.7/bits/hashtable.h:574:7: note: void std::_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __cache_hash_code, __constant_iterators, __unique_keys>::insert(std::initializer_list<_Value>) [with _Key = std::basic_string<char>; _Value = std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> >; _Allocator = std::allocator<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >; _ExtractKey = std::_Select1st<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >; _Equal = std::equal_to<std::basic_string<char> >; _H1 = std::hash<std::basic_string<char> >; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; bool __cache_hash_code = true; bool __constant_iterators = false; bool __unique_keys = true]
      /usr/include/c++/4.7/bits/hashtable.h:574:7: note: no known conversion for argument 1 from 'std::pair<std::basic_string<char>, std::shared_ptr<kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >' to 'std::initializer_list<std::pair<const std::basic_string<char>, kaa::KaaObservable<void(const std::basic_string<char>&, const kaa_notification::BasicNotification&), kaa::INotificationListener*> > >'
      /home/dyosick/projects/github_kaa/kaa/client/client-multi/client-cpp/impl/notification/NotificationManager.cpp:153:113: error: unable to deduce 'auto' from '<expression error>'
      make[2]: *** [CMakeFiles/kaacpp_o.dir/impl/notification/NotificationManager.cpp.o] Error 1
      make[2]: *** Waiting for unfinished jobs....
      make[1]: *** [CMakeFiles/kaacpp_o.dir/all] Error 2
      make: *** [all] Error 2

        Attachments

          Activity

            People

            Assignee:
            dyosick Denis Kimcherenko
            Reporter:
            dyosick Denis Kimcherenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration