Hello , is there a way i can make this function supported by Gcc, everytime i need it i hve to provide it's definition , and some times i get alot of errors
ohh thank you @mutexe but i have my gcc suport c++ 11- Gnu gcc 4.9.2 by default so that might not be the issue , the problem is i can't use std::make_unique if i need it i'll have to define a function n thet is quite problematic .
||=== Build: Debug in eostro (compiler: GNU GCC Compiler) ===|
C:\Users\Orion\Desktop\p.l\eostro\tester.cpp|17|error: 'make_unique' is not a member of 'std'|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
if i need it i'll provide this def and use it as an alternative, and that's what i want to avoid
Note : the function is supported on my vs 13, the problem is that sometimes it fails to build my projects for some unknown reasons and am forced to use gcc.
ooh GOD! then maybe i should sort out my problem with vs - does anyone know what to do with this bug - i have tried a million solutions and none worked
but sometimes vs will works just fine.
Unable to start program 'c:\Users\Orion\documents\visual studio 2013 \Projects\BD_ST\Debug\BD_ST.exe'.
system can't find the file specified.
or what other compiler do you recommend , i thought GNU gcc 4.9.2 should support that.
ooh thank you @JLBorges i did add that header but in my current project so it works so well when i use it like this:
1 2 3 4 5 6 7
#include "my_util.h"
int main()
{
std::unique_ptr<int> ptr=util::make_unique<int>(10);
std::cout<<*ptr<<std::endl;
}
10
Is it possible to make the util header part of the my IDE so that when i need to use it i'll not need to hunt around for the project containing the header? that will be a cool solution.