Inbuilt __gcd() function is not working on Xcode macOS. I have run the following code on Xcode (macOS Catalina) it shows an error "Use of undeclared identifier '__gcd' ".
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
cout << "gcd(6, 20) = " << __gcd(6, 20) << endl;
return 0;
}
please help me out