Scale Resolution Operator 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));
}

I just came across this function definition on GitHub .

I assume that the second and third “Obligations” refer to the name and constructor of the class, but I cannot understand the meaning of the first. I am sure this does not apply to the namespace because this name is different. I saw that the scope resolution operator is used twice in the examples, but they refer to nested namespaces.

+6
source share
1 answer

In C ++ classes, there is a function for entering their name in their scope ( [class] / 2 ):

; . , , .

, , . Commitment::Commitment , - c'tor. Commitment(, , c'tor.

:

struct foo {
    foo();
};

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

, ++ Live.

+5

All Articles