Commit 84ac6fb
authored
Fix the visibility compilation error for GCC <= 7 (apache#312)
### Motivation
apache#296 introduced a
regression for GCC <= 7.
> lib/RetryableOperation.h:109:66: error: 'pulsar::RetryableOperation<T>::runImpl(pulsar::TimeDuration)::<lambda(pulsar::Result, const T&)> [with T = pulsar::LookupService::LookupResult]::<lambda(const boost::system::error_code&)>' declared with greater visibility than the type of its field 'pulsar::RetryableOperation<T>::runImpl(pulsar::TimeDuration)::<lambda(pulsar::Result, const T&)> [with T = pulsar::LookupService::LookupResult]::<lambda(const boost::system::error_code&)>::<this capture>' [-Werror=attributes]
It seems to be a bug for GCC <= 7 abort the visibility of the lambda
expression might not be affected by the `-fvisibility=hidden` option.
### Modifications
Add `__attribute__((visibility("hidden")))` to
`RetryableOperation::runImpl` explicitly.1 parent 2e2f90b commit 84ac6fb
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
83 | 88 | | |
84 | 89 | | |
85 | 90 | | |
| |||
0 commit comments