Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6f15687d authored by Jakub Tyszkowski's avatar Jakub Tyszkowski
Browse files

uuid: Fix visibility issue for stream operator

This fixes compiler not finding the proper stream operator in some
cases. It seems to be dependent on the order in which stream operators
for different classes are being defined in the compilation unit. Even
defining such operator for one class at the top of the file could break
compilation down bellow in the Uuid printing code that already worked
for a long time, just as if the needed symbol got somehow erased.

An example of such error for the Uuuid instance printed in groups.cc:
  groups.cc:372:21: error: invalid operands to binary expression ('basic_ostream<char, std::char_traits<char>>' and 'const bluetooth::Uuid')
    << ", Uuid: " << group.group_uuid_
    ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~

Moving the operator<<(...) to its 1st argument class namespace fixes
that.

Bug: 150670922
Tag: #feature
Test: atest --host net_test_types
Sponsor: jpawlowski@
Change-Id: I73bb3476f480bbffeb140dcd33eb6b521506446b
parent 4cd9f204
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment