+ 3
What programming language versions does Sololearn's compiler support?
I would like to know whether SoloLearn's compiler is the latest in the world.
8 Answers
+ 4
Save and share that code in your thread Description for inspection. As I understand it, forward declaration is available even in C, I doubt if forward declaration is C++14 or C++17 feature.
+ 3
Sololearn's C++ compiler uses GCC 10.1.0 which already supports alot of C++20 features.
#include <iostream>
template<typename T>
void f( T a, T b ) requires std::is_floating_point_v<T>
{
std::cout << a + b;
}
int main()
{
f( 2.3, 2.1 );
}
For example works fine.
+ 3
Ipang
I think OP asked for both I just answered OP's question in the title since you already touched the other question.
+ 2
Dennis
Is the OP asking about forward declaration or compiler version? if if it was the latter, then Idk why forward declaration was even brought up here
#nevermind
+ 2
Got it Dennis đ
+ 2
Ipang I am asking for SoloLearn's Compiler version as only C++14 or 17 allow forward function declaration, so if I try that in SL's Compiler, and it didn't work, I can deduce that SL's compiler it outdated or my code is wrong.
+ 2
{The Piqued Learner} I would bet on the latter because, as Ipang mentioned, forward function declaration is supported in all versions of C++.
0
Dennis WAIT WAT?