草庐IT

reset_warning_registry

全部标签

c++ - std::unique_ptr::reset 检查托管指针是否为空?

我一直在阅读有关C++11智能指针的内容,以便在我的源代码中使用它们,我一直在阅读的文档是cppreference.com上的文档;在阅读std::unique_ptr时,在resetfunction上有一个文档对我来说似乎不正确(强调我的):Replacesthemanagedobject.Givencurrent_ptr,thepointerthatwasmanagedby*this,performsthefollowingactions,inthisorder:Savesacopyofthecurrentpointerold_ptr=current_ptr.Overwritest

Vue ui创建项目报错:Failed to get response from https://registry.npmjs.org/vue-cli-version-marker

Vueui创建项目报错报错:Failedtogetresponsefromhttps://registry.npmjs.org/vue-cli-version-marker找到C:\Users\Administrator(或用户名)目录下的.vuerc文件,修改其配置为{"useTaobaoRegistry":true,"packageManager":"npm"}亲测有效!

c++ - 使用 'g++' 结果为 "warning: will never be executed"

我继承了一个C++项目。我在RHELbuild5.5与GCC4.1.2通过makefile。该项目很大(数百个文件),总的来说代码还不错。然而,在编译过程中,我经常收到一个GCC警告,上面写着(prefix"/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2"):/bits/allocator.h:Inconstructor‘std::allocator::allocator()[with_Tp=char]’:/bits/allocator.h:97:warning:willneverbeexecuted

c++ - 为什么编译器在我定义了 _CRT_SECURE_NO_WARNINGS 之后仍然警告我不安全的 strtok?

我正在使用适用于Windows桌面的VisualStudioExpress2012。我总是出错ErrorC4996:'strtok':Thisfunctionorvariablemaybeunsafe.Considerusingstrtok_sinstead.Todisabledeprecation,use_CRT_SECURE_NO_WARNINGS.Seeonlinehelpfordetails.当我尝试构建以下内容时:#include"stdafx.h"#define_CRT_SECURE_NO_WARNINGS#include#includeusingnamespacestd;

c++ - GCC 选项 : warning on non-void functions without a return statement

如果存在具有非空返回值但在其定义中不包含return语句的函数,是否有生成错误/警告的GCC/g++选项?例如:intadd(inta,intb){a+b;} 最佳答案 -Wreturn-type.它由-Wall(您应该始终与-Werror-Wextra一起运行)启用。 关于c++-GCC选项:warningonnon-voidfunctionswithoutareturnstatement,我们在StackOverflow上找到一个类似的问题: https:

c++ - g++ 表示 : warning: statement has no effect for shift bits operators

我正在实现alkhwarizmi算法。没错,但我的g++编译器不喜欢移位运算符:>>和当我编译它时,我得到这个输出:>g++-Wall-std=c++0x-o"Al-khwarizmialgorithm.o""Al-khwarizmialgorithm.cpp"(indirectory:/home/akronix/workspace/Algorithms)>Al-khwarizmialgorithm.cpp:Infunction‘intalkhwarizmi(int,int)’:Al-khwarizmialgorithm.cpp:31:9:warning:statementhasnoe

【Docker】Docker Registry(镜像仓库)

文章目录一、什么是DockerRegistry二、镜像仓库分类三、镜像仓库工作机制四、常用的镜像仓库五、常用命令镜像仓库命令镜像命令(部分)容器命令(部分)六、docker镜像仓库实战综合实战一:搭建一个nginx服务综合实战二:Dockerhub上创建自己私有仓库综合实战三:阿里云创建自己的私有仓库一、什么是DockerRegistry镜像仓库(DockerRegistry)负责存储、管理和分发镜像,并且提供了登录认证能力,建立了仓库的索引。镜像仓库管理多个Repository,Repository通过命名来区分。每个Repository包含一个或多个镜像,镜像通过镜像名称和标签(Tag)来

c++ - 对齐 : warning C4316 in all classes that have aligned members

今天我遇到了很多麻烦,因为我跟踪了一个非常隐蔽的腐败漏洞。我想如果我真的注意警告就不会那么难找到它,但由于找不到有关为什么弹出此特定警告的相关信息,我让它滑动了,这是一个错误。所以这是VisualStudio2013给我的有罪警告:warningC4316:objectallocatedontheheapmaynotbealigned16它是在通过const引用将align(16)临时传递给构造函数时生成的,如以下代码所示:classVector{};__declspec(align(16))classVectorA{};classShape{public:Shape(constVec

c++ - #warning 和 #error 作为宏

有没有办法让宏在编译时强制发出警告和错误?我目前有这样的东西:#ifdefined(__clang__)#definePRAGMA(x)_Pragma(#x)#elifdefined(__GNUC__)#definePRAGMA(x)_Pragma(#x)#elifdefined(_MSC_VER)#definePRAGMA(x)__pragma(x)#endif#defineSTRINGISIZE(str)#str#defineSTR(str)STRINGISIZE(str)#defineLINESTR(__LINE__)#defineFILE__FILE__#defineFILE_

【macOS-OpenCV报错】ld: warning:ignoring file found architecture ‘x86_64‘, required architecture ‘arm64

如果之前用的mac是英特尔intel芯片的,然后换了macM1或M2芯片的。在使用OpenCV时会报错ld:warning:ignoringfile'/usr/local/Cellar/opencv/4.7.0_7/lib/libopencv_gapi.4.7.0.dylib':foundarchitecture'x86_64',requiredarchitecture'arm64'ld:warning:ignoringfile'/usr/local/Cellar/opencv/4.7.0_7/lib/libopencv_bgsegm.4.7.0.dylib':foundarchitectur