[llvm-bugs] [Bug 40475] New: Incorrect interaction of decltype with operator<<
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Jan 26 01:18:44 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=40475
Bug ID: 40475
Summary: Incorrect interaction of decltype with operator<<
Product: clang
Version: unspecified
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: oliver.rosten at googlemail.com
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
I'm running clang-1000.11.45.5 on my mac. To my bafflement, the following
snippet compiles and runs, producing "Hello, world!":
struct foo
{
};
decltype(std::stringstream{} << foo{}) f{"Hello, world!"};
//f << foo{};
std::cout << f.str() << '\n';
Reinstating the commented line does at least give the expected compilation
error since no appropriate operator<< exists.
As far as I can tell, the problem seems specific to mac.
--
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/20190126/c64d0d08/attachment.html>
More information about the llvm-bugs
mailing list