[llvm-bugs] [Bug 40238] New: fails to deduce template specialization in friend declaration
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Jan 6 10:22:46 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=40238
Bug ID: 40238
Summary: fails to deduce template specialization in friend
declaration
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: rhainin1 at binghamton.edu
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
clang fails to deduce that the friend declaration refers to ::func<int> in the
below
```
template <typename T>
void func(T);
class Cls {
friend void ::func(int);
};
```
Rejecting with:
```
error: out-of-line declaration of 'func' does not match any declaration in the
global namespace
friend void ::func(int);
^~~~
```
I believe this should be allowed by [temp.friend]/1.3:
http://eel.is/c++draft/temp.friend#1.3
see discussion here: https://stackoverflow.com/q/54055575/1013719
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190106/6f915c9d/attachment.html>
More information about the llvm-bugs
mailing list