Avoid namespace conflicts #4

Merged
ewild merged 1 commits from argilo/gr-osmosdr:freesrp-namespaces into master 2023-10-29 15:15:59 +00:00
Contributor

When libfreesrp is present, gr-osmosdr fails to build due to the following error:

/home/argilo/prefix_310/src/gr-osmosdr/lib/freesrp/freesrp_sink_c.cc:88:9: error: reference to ‘sample’ is ambiguous
   88 |         sample s;
      |         ^~~~~~

This happens because C++17 added std::sample, which conflicts with FreeSRP::sample.

To fix this and avoid future conflicts, I removed using namespace std; and using namespace FreeSRP;.

When libfreesrp is present, gr-osmosdr fails to build due to the following error: ``` /home/argilo/prefix_310/src/gr-osmosdr/lib/freesrp/freesrp_sink_c.cc:88:9: error: reference to ‘sample’ is ambiguous 88 | sample s; | ^~~~~~ ``` This happens because C++17 added `std::sample`, which conflicts with `FreeSRP::sample`. To fix this and avoid future conflicts, I removed `using namespace std;` and `using namespace FreeSRP;`.
argilo added 1 commit 2023-10-01 23:04:34 +00:00
0d15519fd5 Avoid namespace conflicts
This fixes building with C++17, where std::sample conflicts with
FreeSRP::sample.
ewild was assigned by laforge 2023-10-04 12:38:27 +00:00
steve-m was assigned by laforge 2023-10-04 12:38:38 +00:00
horizon was assigned by laforge 2023-10-04 12:38:45 +00:00
ewild merged commit 674863d9cb into master 2023-10-29 15:15:59 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sdr/gr-osmosdr#4
No description provided.