[cfe-users] Template specialization locations

2020-05-06 Thread Romulo via cfe-users
Hi there,

Is there a way to find where TemplateTypeParmDecl are (SourceRange) in a
FunctionDecl? I'm trying to find every place in the AST where a custom
template type is used.
Thanks!
___
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


[cfe-users] Compiling C++ 20 Example from 24.6.4.1 [range.istream.overview] produces errors with libstdc++ 10

2020-05-06 Thread Ray Lischner via cfe-users
I am using clang++ 10 with GCC libstdc++ 10 prerelease. I tried 
compiling the example from section 24.6.4.1 [range.istream.overview]. It 
works with g++ 10 but with clang++ 10 -std=c++20, I get 
constraint-failure errors.


program:
#include 
#include 
#include 
#include 
#include 

int main()
{
  using namespace std;
  using namespace ranges;
  auto ints = istringstream{"0 1  2   3 4"};
  ranges::copy(istream_view(ints), ostream_iterator{cout, "-"});
  // prints0-1-2-3-4-
}

$ clang++ -std=c++20 -o range_istream_overview \
range_istream_overview.cpp

Gist of the errors is that the istream_view fails the constraints for a 
range because ranges::begin() fails its constraint for the 
basic_istream_view::begin() member function:


{ __detail::__decay_copy(__t.begin()) } -> input_or_output_iterator;

Any ideas what's wrong or how to proceed?
--
Ray Lischner
___
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users