简体   繁体   English

将ICU VS2013解决方案移植到VS2015时发生C2248错误

[英]C2248 error while porting ICU VS2013 solution to VS2015

I am trying to port ICU 4.0 VS2013 solution to VS2015, while porting I get following error 我正在尝试将ICU 4.0 VS2013解决方案移植到VS2015,同时移植时出现以下错误

Severity Code Description Project File Line Error C2248 'icu_4_0::Format::Format': cannot access protected member declared in class 'icu_4_0::Format' i18n c:\\research\\releases\\gtlib\\gtlib_6.0\\source\\aglc\\aglc40\\source\\i18n\\unicode\\measfmt.h 72 严重性代码说明项目文件行错误C2248'icu_4_0 :: Format :: Format':无法访问在类'icu_4_0 :: Format'中声明的受保护成员i18n c:\\ research \\ releases \\ gtlib \\ gtlib_6.0 \\ source \\ aglc \\ aglc40 \\ source \\ i18n \\ unicode \\ measfmt.h 72

this is how function is defined: 这是函数定义的方式:

protected:

/**
 * Default constructor.
 * @stable ICU 3.0
 */
MeasureFormat();

and class is defined as follows 和类定义如下

class __declspec(dllexport) MeasureFormat : public Format {

I am unable to figure out what is causing the error. 我无法弄清楚是什么原因引起的错误。

Blockquote 块引用

solved this Bug base class(Format) was causing problem, base class must have copy constructor as well as assignment operator both should be public, It wasn't working when they were protected (atleast in my case). 解决了这个Bug基类(格式)引起的问题,基类必须具有复制构造函数以及赋值运算符都应该是公共的,当它们受到保护时,它是不起作用的(至少对我而言)。

C2248 error when using promise 使用Promise时出现C2248错误

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM