This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug driver/85493] New: decltype can use deleted constructor in template function
- From: "ihorelo at mail dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 22 Apr 2018 12:48:51 +0000
- Subject: [Bug driver/85493] New: decltype can use deleted constructor in template function
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85493
Bug ID: 85493
Summary: decltype can use deleted constructor in template
function
Product: gcc
Version: 7.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: driver
Assignee: unassigned at gcc dot gnu.org
Reporter: ihorelo at mail dot ru
Target Milestone: ---
decltype can use deleted constructor in template function
struct no_def
{
no_def() = delete;
};
template<typename T>
void test()
{
decltype(no_def()) a{}; // error in Clang and MSVC, no error in GCC
a = a; // get rid of warning
}
int main()
{
test<int>();
}
Please check
https://stackoverflow.com/questions/49965849/decltype-with-deleted-constructor-is-possible-in-template-function