Depends on the distribution of C++ ability. Suppose C++ weasels are a mix of normal weasels and geniuses, that geniuses have far higher ability than normal weasels, and that across both groups blue weasels are on average better by a constant considerably smaller than that difference. Your test could leave you with mostly genius red weasels and a mix of normal and genius blue weasels such that the average ability of red weasels who pass is higher.
Alternatively if far fewer red weasels learn C++ and the red weasels who do are selected for aptitude the average aptitude of red weasels who learn C++ could be higher than that of blue weasels.
Depends on the distribution of C++ ability. Suppose C++ weasels are a mix of normal weasels and geniuses, that geniuses have far higher ability than normal weasels, and that across both groups blue weasels are on average better by a constant considerably smaller than that difference. Your test could leave you with mostly genius red weasels and a mix of normal and genius blue weasels such that the average ability of red weasels who pass is higher.
Alternatively if far fewer red weasels learn C++ and the red weasels who do are selected for aptitude the average aptitude of red weasels who learn C++ could be higher than that of blue weasels.