Q:

use comma operator to initialize the base class

I am spoiling the comma operator in the constructor, so that I can preprocess the parameters and use the processed parameter for initialization.
Say I have the following base and derived classes:
class Base
{
    protected:
        int i;
        int j;
    public:
        Base(int a):i(a),j(a){}
        Base(int a, int b):i(a),j(b){}
};

class Derived:public Base
{
    private:
        int d;
        void inc(int & a) {a++;}
        void inc(int & a, int & b) {a++; b++;}
    public:
        Derived(int a, int b, int c); 
};

I know I can use comma operator to process a parameter and use it to initialize the base part as follows:
Derived::Derived(int a, int b, int c):Base((inc(a),a)),d(c){}

Now what about if I want to pre-process two parameters and use them to initialize the base? I did the following:
Derived::Derived(int a, int b, int c):Base((inc(a,b),(a,b))),d(c){}

But this is not what I want, because the single-parameter base constructor will still be used (since (a,b) is also a comma operator that returns b). Is there anyway to achieve what I want if comma operator is not possible?

A:

Although this can constitute as a mere opinion, I would recommend against writing such expressions; you are putting an extra burden on the maintainer to figure out what exactly is being executed before the actual function is called; even figuring out the number of arguments the function takes will require some effort, because commas would normally be used in that context only to separate arguments.
For a single argument, I would do it like this:
class Derived : Base {
    static int computeSomething(int a) { return a+1; }

    Derived(int a) :
        Base(computeSomething(a)), ...
    { ... }
};

Note I'm returning a new value. It could even take and return by reference if the type of a is too expensive to copy.
For multiple arguments, all needed to be updated at once, I would change the base to receive the entire pack of arguments with a named entity, or maybe a std::tuple, and do it like the single-argument version.

