久久久久久久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.

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

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模板網!

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

相關文檔推薦

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++ 中旋轉圖像而不使用 OpenCV 函數)
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 參數)
Convert a single color with cvtColor(使用 cvtColor 轉換單一顏色)
主站蜘蛛池模板: 毛片.com| 日韩福利| av性色全交蜜桃成熟时 | 国产黄色大片在线免费观看 | 国产国产精品久久久久 | 国产精品激情 | 欧美日韩亚洲系列 | 天天综合成人网 | 羞羞视频网 | 免费成年网站 | 日本午夜在线视频 | 国产一区二区中文字幕 | 91精品国产91久久久久久最新 | 黑人性hd| 亚洲91| 日韩人体视频 | 极品粉嫩国产48尤物在线播放 | 久久精品视频一区二区 | 亚洲综合二区 | jvid精品资源在线观看 | av中文字幕在线 | 亚洲色欲色欲www | 欧美综合在线视频 | 午夜视频精品 | 欧美日韩精品一区二区天天拍 | 国产精品日日做人人爱 | 一级黄色片美国 | 国产丝袜一区二区三区免费视频 | 亚洲国产片 | 亚洲免费三区 | 久久久久久亚洲精品 | 在线免费黄色小视频 | 日本高清中文字幕 | 国产欧美日韩综合精品一区二区 | 久久精品视频在线观看 | 2021天天干夜夜爽 | 狠狠骚| 性高湖久久久久久久久aaaaa | 国产精品免费一区二区 | 精品一级 | 天天操天天射天天舔 |