[llvm-dev] std Namespace Errors
Peter Finn via llvm-dev
llvm-dev at lists.llvm.org
Mon Aug 10 13:54:11 PDT 2015
I’ve been updating SAFECode files to work with LLVM 3.7, and I’ve run into a number of errors I can’t explain.
In LLVM_SRC/projects/safecode/runtime/BBRuntime/DebugReport.cpp, there are a host of std::ostream objects that, when given strings with the “<<“ operator, produce errors. Also, the compiler doesn’t seem to recognize std::dec for some reason. Here is a sample of the errors I’m getting:
/Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/runtime/BBRuntime/DebugReport.cpp:30:6: error: invalid operands to binary expression
('std::ostream' (aka 'basic_ostream<char>') and 'const char *')
OS << "= Fault PC Source :\t"
~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:5263:1: note: candidate template ignored: could not match
'shared_ptr<type-parameter-0-2>' against 'char const[43]'
operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:4191:1: note: candidate template ignored: could not match
'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against 'char const[43]'
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/runtime/BBRuntime/DebugReport.cpp:32:20: error: no member named 'dec' in namespace 'std'
<< ":" << std::dec << this->lineNo << "\n";
~~~~~^
/Users/peterfinn/Desktop/llvm_trunk_2/projects/safecode/runtime/BBRuntime/DebugReport.cpp:38:6: error: invalid operands to binary expression
('std::ostream' (aka 'basic_ostream<char>') and 'const char *')
OS << "= Pool Handle :\t" << this->PoolHandle << "\n";
~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:5263:1: note: candidate template ignored: could not match
'shared_ptr<type-parameter-0-2>' against 'char const[43]'
operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:4191:1: note: candidate template ignored: could not match
'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against 'char const[43]'
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
I’ve been trying to find information online, but I’ve found nothing helpful. I tried creating my own test programs, with my own std::ostream objects, but I couldn’t recreate the errors. Do you have any idea what could be causing this problem?
Thanks,
Peter Finn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150810/e38ed3bf/attachment.html>
More information about the llvm-dev
mailing list