本文整理汇总了C++中ManagedStatic::c_str方法的典型用法代码示例。如果您正苦于以下问题:C++ ManagedStatic::c_str方法的具体用法?C++ ManagedStatic::c_str怎么用?C++ ManagedStatic::c_str使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ManagedStatic
的用法示例。
在下文中一共展示了ManagedStatic::c_str方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getLibSupportInfoOutputFilename
// GetLibSupportInfoOutputFile - Return a file stream to print our output on...
std::ostream *
llvm::GetLibSupportInfoOutputFile() {
std::string &LibSupportInfoOutputFilename = getLibSupportInfoOutputFilename();
if (LibSupportInfoOutputFilename.empty())
return cerr.stream();
if (LibSupportInfoOutputFilename == "-")
return cout.stream();
std::ostream *Result = new std::ofstream(LibSupportInfoOutputFilename.c_str(),
std::ios::app);
if (!Result->good()) {
cerr << "Error opening info-output-file '"
<< LibSupportInfoOutputFilename << " for appending!\n";
delete Result;
return cerr.stream();
}
return Result;
}
示例2: getLibSupportInfoOutputFilename
// GetLibSupportInfoOutputFile - Return a file stream to print our output on...
raw_ostream *
llvm::GetLibSupportInfoOutputFile() {
std::string &LibSupportInfoOutputFilename = getLibSupportInfoOutputFilename();
if (LibSupportInfoOutputFilename.empty())
return &errs();
if (LibSupportInfoOutputFilename == "-")
return &outs();
std::string Error;
raw_ostream *Result = new raw_fd_ostream(LibSupportInfoOutputFilename.c_str(),
Error, raw_fd_ostream::F_Append);
if (Error.empty())
return Result;
errs() << "Error opening info-output-file '"
<< LibSupportInfoOutputFilename << " for appending!\n";
delete Result;
return &errs();
}