g++ -std=c++14 your_file.cpp 更新编译器 如果你的编译器版本较旧,可能需要更新到支持 C++14 的版本。 手动实现 make_unique 如果由于某些原因无法启用 C++14,你可以手动实现一个简单的 make_unique: 代码语言:txt 复制 #include <memory> template<typename T, typename... Args> std::unique_ptr<T> make...
ogrinfo_lib.cpp autotest/cpp test_ogr_swq.cpp frmts arg argdataset.cpp basisu_ktx2 basisudataset.cpp ktx2dataset.cpp blx blxdataset.cpp ceos2 sar_ceosdataset.cpp daas daasdataset.cpp envisat envisatdataset.cpp ers ersdataset.cpp exr exrdataset.cpp fits fitsdataset.cpp grib...
2 changes: 1 addition & 1 deletion 2 test/kinetics/kineticsFromScratch.cpp Original file line numberDiff line numberDiff line change @@ -599,7 +599,7 @@ class KineticsAddSpecies : public testing::Test KineticsAddSpecies() : pp_ref(newThermo("../data/kineticsfromscratch.yaml")) { p....
一旦我有两个Bool变量,我就执行Karatsuba Multiplication.vs低版本转高版本,std::getline报错,如下 提示 error C2027: 使用了未定义类型“std::basic_istream<char,std::char_traits> 找了istream转string的其他方法,折腾了很久才发现缺少 #include <sstream> 加上就好了 ...
not_null<>: Allows to construct from a non-null user-defined ref-counted type 44 changes: 37 additions & 7 deletions 44 include/gsl/gsl-lite.hpp Original file line numberDiff line numberDiff line change @@ -1273,6 +1273,9 @@ template< class T, class... Args > gsl_NODISCARD std:...
return std::unique_ptr<Transaction_Owner_ReadOnly>(new Transaction_Owner_ReadOnly(std::ref(m_connection))); return std::make_unique<Transaction_Owner_ReadOnly>(std::ref(m_connection)); }2 changes: 1 addition & 1 deletion 2 src/backend/apidb/readonly_pgsql_selection.cpp Original file li...
clang-tools-extra/clangd/support/ThreadsafeFS.cpp Original file line numberDiff line numberDiff line change @@ -41,7 +41,7 @@ class VolatileFileSystem : public llvm::vfs::ProxyFileSystem { llvm::StringRef FileName = llvm::sys::path::filename(Path); if (FileName.starts_with("preamble...
OutputDesc *createOutputSection(StringRef name, StringRef location); OutputDesc *getOrCreateOutputSection(StringRef name);3 changes: 2 additions & 1 deletion 3 lld/ELF/SyntheticSections.cpp Original file line numberDiff line numberDiff line change @@ -4679,7 +4679,8 @@ template <class ELF...
void PdfFieldChildrenCollectionBase::RemoveField(const PdfReference& ref) { initFields(); auto found = m_fieldMap->find(ref); if (found == m_fieldMap->end()) auto found = m_fieldMap.find(ref); if (found == m_fieldMap.end())...
not_null<>: Allows to construct from a non-null user-defined ref-counted type 44 changes: 37 additions & 7 deletions 44 include/gsl/gsl-lite.hpp Original file line numberDiff line numberDiff line change @@ -1273,6 +1273,9 @@ template< class T, class... Args > gsl_NODISCARD std:...