久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

范圍解析運算符被使用兩次

Scope resolution operator being used twice(范圍解析運算符被使用兩次)
本文介紹了范圍解析運算符被使用兩次的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

namespace libzerocoin {

//Commitment class
Commitment::Commitment::Commitment(const IntegerGroupParams* p,
                               const Bignum& value): params(p), contents(value) {
this->randomness = Bignum::randBignum(params->groupOrder);
this->commitmentValue = (params->g.pow_mod(this->contents, params->modulus).mul_mod(
                         params->h.pow_mod(this->randomness, params->modulus), params->modulus));
}

我剛剛在 GitHub.

我假設第二個和第三個承諾"指的是類名和構(gòu)造函數(shù),但我無法弄清楚第一個的含義.我確信它不是指命名空間,因為該名稱不同.我已經(jīng)看到在示例中兩次使用了范圍解析運算符,但那些是指嵌套的命名空間.

I assume that the second and the third "Commitment" refer to the class name and constructor, but I can't figure out the meaning of the first. I am sure that it does not refer to the namespace because that name is different. I have seen the scope resolution operator being used twice in examples, but those refer to nested namespaces.

推薦答案

在 C++ 中,類具有將其名稱注入其作用域的功能 ([class]/2):

In C++ classes have the feature of having their name injected into their scope ([class]/2):

class-name 也插入到類本身的作用域中;這被稱為 injected-class-name.出于訪問目的檢查,injected-class-name 被視為公共會員名.

The class-name is also inserted into the scope of the class itself; this is known as the injected-class-name. For purposes of access checking, the injected-class-name is treated as if it were a public member name.

您展示的代碼片段使用了它.在某些上下文中,Commitment::Commitment 命名類本身,而在其他上下文中命名為 c'tor.只有最后一個 Commitment(,您打開括號的地方,才開始 c'tor 定義.

And the code snippet you showed makes use of it. In certain contexts Commitment::Commitment names the class itself, and in others names the c'tor. Only the last Commitment(, where you open the parentheses, begins the c'tor definition.

它看起來可能更糟:

struct foo {
    foo();
};

foo::foo::foo::foo() = default;

您可以看到有效的 C++ Live.

Which you can see is valid C++ Live.

這篇關于范圍解析運算符被使用兩次的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關文檔推薦

Assertion failed (size.widthgt;0 amp;amp; size.heightgt;0)(斷言失敗(size.width0 amp;amp; size.height0))
Rotate an image in C++ without using OpenCV functions(在 C++ 中旋轉(zhuǎn)圖像而不使用 OpenCV 函數(shù))
OpenCV: process every frame(OpenCV:處理每一幀)
Why can#39;t I open avi video in openCV?(為什么我不能在 openCV 中打開 avi 視頻?)
OpenCV unable to set up SVM Parameters(OpenCV 無法設置 SVM 參數(shù))
Convert a single color with cvtColor(使用 cvtColor 轉(zhuǎn)換單一顏色)
主站蜘蛛池模板: 成人在线视频免费观看 | 国产一区二区不卡 | 国产激情第一页 | 中文字字幕在线中文乱码范文 | 成人国产综合 | 噜久寡妇噜噜久久寡妇 | 亚洲精品国产第一综合99久久 | 九九导航| 超碰最新在线 | 国产精品美女久久久久久免费 | 国产精品夜色一区二区三区 | 精品一区二区三区免费视频 | 国产黄色小视频在线观看 | 自拍偷拍中文字幕 | 手机av在线 | 黄色亚洲网站 | 色伊人| 不卡视频一区二区三区 | 亚洲一一在线 | 网站国产 | 日韩中文字幕 | 日韩一区欧美一区 | 五月综合激情在线 | 夜久久| 国产一区二区三区四区区 | 亚洲一区二区在线电影 | 日韩欧美在线观看 | a久久 | 国产精品美女久久久久久免费 | 国产亚洲成av人片在线观看桃 | 欧美色成人| 国产精品免费福利 | 色爱综合网 | 免费视频一区二区 | 久久33| 午夜男人免费视频 | 免费 视频 1级 | 成人影院午夜 | 午夜电影福利 | 久草成人 | 91中文字幕在线 |