#i will always swear by clang
1 messages · Page 1 of 1 (latest)
#include <bits/stdc++.h>
using namespace std;
where
clang comes w sqrt
clang prioritizes its version of sqrt
gcc also comes with sqrt
gcc does not prioritize its version of sqrt
I use clang im js hating
dragons are the best
i use clang bc its default on mac 👍
but I also have brew gcc just in case
Explain what
meanwhile w gcc i have to download half a gigabyte of files for each target
its ridiculous
Not that it matters with make files but i dont use make files for small stuff
Less letters equals u get ur result faster
So i mean its not any different then a faster complier
By the time it takes for u to type out clang
This is weird in a couple ways
Why is there a function called sqrt that just increments the number
I also had this problem as well
And fixed it by having a new key next to my keyboard
That is just c
How often are you really typing clang and gcc
Works for nvcc as well
Just use cmake and an ide
^
No its not
Clang is not real
Gcc is
A real word
In another language prob
you can pretend it's a fast polynomial approximation or smth 🤷♀️
It’s an ODR violation so UB
why should it be when I'm not including cmath or anything or using namespace std
according to the c++ standard, this should not happen
i believe that clang is just violating the standard a little here which is kinda ok bc why would you do that anyway
cmath in all the major compilers has the functions in the global namespace as well as in namespace std iirc
It’s non standard but isn’t in violation of the standard
Maybe iostream includes some of those functions too idk
But either way if ur code could break by including another standard header file it’s probably not very good code
ah ic I was thinking of python legb lol
Can’t catch a break 😔