Skip to content

Compilation error : power_amp.cpp:210:40: error: no matching function for call to ‘std::__cxx11::list<std::__cxx11::basic_string<char> >::push_back(std::string* const&)’ #26

@clebig

Description

@clebig

Hi,
I'm trying to compile the master branch on a debian testing x86_64 , but it fails with the following error.

In file included from /tmp/UHD-Fairwaves/host/power_amp.cpp:1:
/tmp/UHD-Fairwaves/host/power_amp.hpp:67:21: error: field ‘name’ has incomplete type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’}
   67 |         std::string name;
      |                     ^~~~
In file included from /usr/include/c++/10/iosfwd:39,
                 from /usr/include/c++/10/memory:74,
                 from /usr/include/boost/config/no_tr1/memory.hpp:21,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:23,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /root/UHD-Fairwaves/host/power_amp.hpp:7,
                 from /root/UHD-Fairwaves/host/power_amp.cpp:1:

GCC version : 10.2.0-19
libstdc++.so.6.0.28

I could fix it with std::string const &name at name declaration in power_amp.hpp

protected:

    // Map PA types to string names
    struct pa_type_map_pair_t {
        pa_type_t type;
        std::string const &name;
    };
    static const pa_type_map_pair_t _pa_type_map[];

};

But honestly, I don't know if it's correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions