[libcxx-commits] [PATCH] D58025: [libcxx] MSVC fails to compile `operator valarray<template>`
Danila Kutenin via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Feb 10 22:07:12 PST 2019
danlark created this revision.
danlark added a reviewer: mclow.lists.
Herald added a reviewer: EricWF.
Herald added a subscriber: ldionne.
MSVC fails to compile template `operator valarray` because (i believe) the type is not seen in template argument of the operator.
Minimal example:
https://gcc.godbolt.org/z/sPpQFL
I believe it is a compiler bug but workaround is not that complex so I hope it can be merged anyway
Repository:
rCXX libc++
https://reviews.llvm.org/D58025
Files:
include/valarray
Index: include/valarray
===================================================================
--- include/valarray
+++ include/valarray
@@ -2730,7 +2730,7 @@
};
template<class _ValExpr>
-__val_expr<_ValExpr>::operator valarray<__val_expr::result_type>() const
+__val_expr<_ValExpr>::operator valarray<typename __val_expr<_ValExpr>::result_type>() const
{
valarray<result_type> __r;
size_t __n = __expr_.size();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58025.186186.patch
Type: text/x-patch
Size: 424 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190211/28847b5d/attachment.bin>
More information about the libcxx-commits
mailing list