Apparently there are some C++ compilers that have an issue with, for example: ``` void foo(int) {} class bar { decltype(foo)* foo; }; ``` Other compilers (such as the ones I tested with) do not. So to avoid this inconsistency in com, we're going to have to change our macro that defines these function pointers from ``` #define CUPS_SHIM_FUNC_DECL(X) decltype(X)* X; ``` to ``` #define CUPS_SHIM_FUNC_DECL(X) decltype(::X)* X; ``` so that we are explicit about `decltype`ing from the globally scoped function that exists in `cups.h` I believe that should fix the issue.
Bug 1656379 Comment 5 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Apparently there are some C++ compilers that have an issue with, for example: ``` void foo(int) {} class bar { decltype(foo)* foo; }; ``` Other compilers (such as the ones I tested with) do not. So to avoid this inconsistency in com, we're going to have to be explicit about the global scope. To fix the example, this would mean: ``` decltype(::foo)* foo; ``` To fix this code, we'll have to change the declaration macro from ``` #define CUPS_SHIM_FUNC_DECL(X) decltype(X)* X; ``` to ``` #define CUPS_SHIM_FUNC_DECL(X) decltype(::X)* X; ``` so that we are explicit about `decltype`ing from the globally scoped function that exists in `cups.h` I believe that should fix the issue.
Apparently there are some C++ compilers that have an issue with, for example: ``` void foo(int) {} class bar { decltype(foo)* foo; }; ``` Other compilers (such as the ones I tested with) do not. So to avoid this inconsistency in compilers, we're going to have to be explicit about the global scope. To fix the example, this would mean: ``` decltype(::foo)* foo; ``` To fix this code, we'll have to change the declaration macro from ``` #define CUPS_SHIM_FUNC_DECL(X) decltype(X)* X; ``` to ``` #define CUPS_SHIM_FUNC_DECL(X) decltype(::X)* X; ``` so that we are explicit about `decltype`ing from the globally scoped function that exists in `cups.h` I believe that should fix the issue.