In clang there is this file. I'm trying to reference one of the overloaded methods:
00909 std::string getAsString(const PrintingPolicy &Policy) const;
I tried:
std::__cxx11::basic_string<char> (&p2)(const clang::PrintingPolicy&) = &clang::QualType::getAsString;
and got:
REPL:1:73: error: address of overloaded function 'getAsString' does not match required type 'std::__cxx11::basic_string<char> (const clang::PrintingPolicy &)'
std::__cxx11::basic_string<char> (&p2)(const clang::PrintingPolicy&) = &clang::QualType::getAsString
/home/a/julia/usr/bin/../include/clang/AST/Type.h:905:15: note: candidate function has different qualifiers **(expected none but found const)**
std::string getAsString(const PrintingPolicy &Policy) const;
I also tried:
std::__cxx11::basic_string<char> (&p1)(clang::PrintingPolicy&) = &clang::QualType::getAsString;
and got:
candidate function has type mismatch at 1st parameter **(expected 'clang::PrintingPolicy &' but has 'const clang::PrintingPolicy &')**
Am I doing something wrong or is the compiler broken?