« first day (749 days earlier)      last day (4182 days later) » 

9:00 PM
The.
 
one for each platform, and one main one :p
 
@thecoshman You suck, fix it.
 
@melak47 They're probably not meant to both be compiled
 
@Collin they are.
 
9:00 PM
I'm sure they're one per platform
oh
 
Rename the platform-independent one.
 
@Collin ..plus one main one.
 
@thecoshman: You are strange.
 
Or change names of produced objects.
 
The uber_main.
 
9:00 PM
@CatPlusPlus I suppose I could do that...kyromain.cpp? kyrostat.cpp?
 
kyrostat.cpp
 
thingy.c++
 
MainWindow.cpp lol
 
@R.MartinhoFernandes lol
 
main_.cpp
 
9:01 PM
mein.cpp
 
@StackedCrooked It's "haupt". I think.
 
dat_main.cpp
 
mijn.cpp (that would work in Dutch)
 
I wonder if I did it.
No wait, I did.
Because it works.
 
9:02 PM
@CatPlusPlus you did what?
 
The two main.cpp thingy.
 
2 mins ago, by Cat Plus Plus
@thecoshman You suck, fix it.
 
@thecoshman Okay, nevermind, MSVC sucks.
 
yeah it works fine with gcc. just msvc shitting itself because it puts all the object files in one folder or something...that's retarded
 
Objects are put into two different folders, it should work just fine.
Hint: MSVC is shit.
 
9:03 PM
@melak47 it never could. Two .cpp files with the same name in the same project = MSVC falls over
 
Cat: shifting the suckage since 1992.
 
Don't use it.
Also that should answer your inquiry about supporting MSVC
Spoiler: no.
 
@CatPlusPlus aw :(
 
Because you can't have four main.cpp?
 
9:04 PM
Because it's dumb enough to not consider the full path.
 
I'm sure it's just a matter of telling it to like, not just crap out the objects into one folder
 
Good luck.
 
why do you have so many main.cpp anyway
 
They're not in one folder.
The hierarchy is replicated in build/
 
@melak47 You can tell it that all you want. It doesn't have ears.
 
9:05 PM
@melak47 hmm yeah, should be doable with a bit of care
 
@Rapptz platform/windows/main.cpp, platform/linux/main.cpp, platform/osx/main.cpp, kyrostat/main.cpp
 
of course, it might break a number of other things
 
0
Q: Two files of the same name give linker error in Visual Studio

DeadMGI'm using Visual Studio 2010 to compile my C++ project, and the linker is barfing on two of my files which have the same name- but they're in completely different directories. How can I make the linker recognize that they are different files?

 
You can change kyrostat.recurse to crap out actual Object instances, with changed names according to the path
Or not use MSVC
 
Are you aiming at multiple platforms?
 
9:07 PM
@CatPlusPlus I'm not using SCons, no clue where to start telling it to use msvc :p
 
If you ask me,
 
@CatPlusPlus because everyone loves code that doesn't work on the most widely used compiler on the most widely used OS
 
Well, or just rename the platform-independent main
 
@CatPlusPlus yeah I did.
 
@jalf We've decided on C++11, it already didn't work.
 
9:09 PM
Right-click one of the files, Properties, C/C++, Output Files, change the Object File Name to, say, $(IntDir)\$(InputName)2 — Hans Passant Feb 19 at 17:33
 
@CatPlusPlus it might be getting to where it could work, soon, though
 
this doesn't work?
 
@melak47 In my case, I don't know how to tell it not to try to use it. I don't have MSVC installed, but it always warns me that it could not find it.
 
@Rapptz it would
 
(Also who gives a fuck, install MinGW you lazy bastards)
 
9:09 PM
it would probably already work out of the box with SCons since that will replicate the src folder structure for the /build folder, but I don't know how to make scons see& use msvc :o
@R.MartinhoFernandes I have it installed, and it still doesn't find it :)
 
That's because Microsoft is very good at making installers
 
C:\users\rmf\dev\ogonek [default tip]
$ scons toolchain=mingw
scons: Reading SConscript files ...

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\users\rmf\dev\ogonek\SConstruct", line 9, in <module>
scons: done reading SConscript files.
scons: Building targets ...
bin\test\runtest

[Testing completed. All tests passed (2359 assertions in 18 test cases)]

scons: done building targets.
C:\users\rmf\dev\ogonek [default tip]
$
 
I guess if I run that environment setup batch file for the "Visual Studio command line" thingy, the proper environment paths should be set
 
I don't know why it does that, it shouldn't.
 
But it uses GCC just fine.
 
9:12 PM
Oh wait, it's your script.
 
@CatPlusPlus ours does that, too
 
Yeah, it shouldn't.
But I give up, build systems don't work properly, deal with it.
 
lol
 
right, SCons doesn't know VC++11
adding the lines for that shuts it up, but it still uses g++/mingw :p
 
9:32 PM
Because it's supposed to use it.
 
what makes the vendor.dll so huge by the way?
 
Maybe those 5 libraries linked into that.
I don't know.
It's just ICU and Boost and TBB.
Shouldn't be very large.
 
33.7 MB
icu seems to be the biggest part of it so far
 
They are large.
Is my point.
Also debug symbols.
I got protocc.exe that's 18MB large.
It doesn't matter, really.
Also ICU is so horrible.
 
D:
stuff is weird on my laptop. it supports OpenGL 3.2.something Compatibility , and no matter how I ask for a 3.1 context it always gives me 3.2.something
 
9:40 PM
hmm
 
@melak47 Implementations are not required to give you a context that's exactly the version you want.
You're giving a minimum.
 
guess that's fine then
 
You can either get 1.1 context, 2.x one or 3/4 one, usually, I think.
2.x might not be a thing.
Because compatibility profile has the same things available.
OpenGL is a weird beast in general.
 
on my desktop (nvidia, laptop has an AMD card) it seems to give me the exact version I ask for :)
 
If CreateContext succeeds, you've got the things you asked for, that's what's important.
 
9:48 PM
what is the syntax for extern "C" function pointers?
 
Ell
hmm. Why on earth is price gong installed O.o
 
what on earth is price gong
@CatPlusPlus is 2.0 the same as OpenGL ES?
 
Xeo
guy
 
ES is more or less 2.0 without fixed function pipeline, I think.
 
9:55 PM
@David This is incorrect: You are doing an assignment. TYPE must assume in its assignment operator that one of its constructors previously has been called. You will be violating that. — Johannes Schaub - litb 4 mins ago
 
Ell
guise
 
Xeo
@JohannesSchaub-litb I think you misunderstood him there. He didn't mean obj.~TYPE(); obj = TYPE(); but just obj = TYPE(), as far as I understood it.
 
0
Q: How to declare a member extern "C" function pointer

DeadMGI'm looking to declare the type of an extern "C" function pointer. It is a member variable. The syntax in this question I cannot get to compile. template<typename Sig> struct extern_c_fp { extern "C" typedef typename std::add_pointer<Sig>::type func_ptr_type; }; I have experime...

fifty quid says it'll never get answered
 
@DeadMG No drive by linking, you know the rules ;)
 
lol
 
9:58 PM
DOWNVOTE
 
@DeadMG please behave!
 
Motherfucker.
 
sweet picture
 
user142019
sweet picture
 
posted on November 03, 2012 by Herb Sutter

Yesterday, many thousands of you were in the room or live online for my talk on The Future of C++. The talk is now available online. This has been a phenomenal year for C++, since C++11’s publication just 12 months ago. And yesterday was a great day for C++. Yesterday I had the privilege of [...]

 
user142019
10:11 PM
Feeds y u c-c-c-combo break.
 
@DeadMG So... you pay me fifty quid to answer it?
 
naw
 
user142019
extern "C" { typedef typename std::add_pointer<Sig>::type func_ptr_type; } does that work?
 
Fuck you then.
 
user142019
That was my last attempt, by the way.
 
10:13 PM
fifty squid
 
(I don't know the answer, anyway).
 
Ahahaha that answer
 
@Zoidberg'-- No.
 
What answer?
 
I tried that too
 
10:13 PM
The deleted one.
 
user142019
Meh.
 
"Oh I know, let's put a double(double) extern C pointer to that struct, it will solve everything!"
 
@CatPlusPlus Oh you're not dead? Guess I was thinking of the wrong type of execution...
 
user142019
> A linkage-specification shall occur only in namespace scope. … A C language linkage is ignored for the names of class members and the member function type of class member functions.
 
this would appear to be a fairly glaring and problematic oversight
 
user142019
10:16 PM
I think you’re screwed. Or maybe not.
 
I have 8 left.
 
user142019
5
Q: Is it possible to typedef a pointer-to-extern-"C"-function type within a template?

Daniel TrebbienI want to add a public typedef to a template for a pointer to a function-taking-one-argument that uses "C" language linkage. I tried: extern "C" { template <typename return_t_, typename arg1_t_> struct test { typedef return_t_ (*C_fun1_t)(arg1_t_); }; } And: tem...

 
@DeadMG Use a macro instead of template.
 
I'd rather ask the Committee to fix the linkage rules.
 
That extern "C" is ignored for class members should be obvious.
There are no classes in C, what does the name point to.
 
10:18 PM
a function pointer with extern "C" linkage
say
 
user142019
It is also about calling conventions.
 
In practical terms, you don't need it.
 
true
 
user142019
extern "C" typedef double (*ExtCFuncPtr)(double);
// this should work anyway
 
You only need __cdecl/__stdcall
 
10:19 PM
but those annoying fucks at isocpp pointed out that strictly, the Standard would require it for std::thunk or any similar functionality
 
I'm sure there are mythical platforms that would invalidate those assumptions.
 
yeah
 
Like for example we invented time travel and had to execute C++ code in the past
 
but unfortunately, if you submit a Standard proposal, then you have to deal with them, even if they are mythical
 
Fuck the standard.
There's no point investing effort in that crap.
 
10:21 PM
why not?
 
@Zoidberg'-- What needs C linkage is the function type, not the member.
 
C++ is broken and you can't fix it, because fixing it means doing it from scratch.
 
yeah, but that takes a lot longer than just issuing a proposal or two
 
(IOW, finish Wide you lazy dog)
 
@Zoidberg'-- " A C language linkage is ignored for the names of class members and the member function type of class member functions." - does not apply to his code. The typedef name should not have the linkage. but the type that the typedef refers to.
 
user142019
10:22 PM
Of course.
 
imho
so this is valid:
extern "C" typedef void lulz(); struct A { typedef lulz baz; }; A::baz haha;
now haha's type has C linkage
 
@StackedCrooked nice where from?
 
user142019
extern "C" {
    template<typename R, typename... Args>
    using extern_c_fp = R(*)(Args...);
}
 
no can't do that
 
user142019
It compiles, at least. I don’t know if extern_c_fp will really have C linkage.
 
Xeo
10:28 PM
@Zoidberg'-- GCC 4.7 doesn't want that. :(
 
Xeo
> error: template with C linkage
 
@Zoidberg'-- from a practical point of view, the template instantiations are differentiated by their object code level name mangling, and no such with "C"
 
Xeo
@Cheersandhth.-Alf using-aliases have no instantiations.
 
user142019
% cat foo.cpp                                                   ~/Desktop
#include <type_traits>

extern "C" {
    template<typename R, typename... Args>
    using extern_c_fp = R(*)(Args...);
}

int main() {
    using foo = extern_c_fp<void, int>;
}
% clang++ -std=c++11 -stdlib=libc++ foo.cpp                     ~/Desktop
%                                                               ~/Desktop
 
Xeo
10:29 PM
And as such no linkage.
 
user142019
No errors.
 
oh, many years since last at deviantart
:-)
 
Xeo
@Zoidberg'-- I just said that GCC 4.7 doesn't like it.
 
and some others
:-)
 
user142019
@Xeo I know.
 
Xeo
10:30 PM
Btw, which Clang version do you have?
 
there was also lolwut site
 
Hmm, wait, can't find it there.
 
user142019
@Xeo this one:
 
user142019
% clang -v                                                      ~/Desktop
Apple clang version 4.0 (tags/Apple/clang-421.0.60) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix
 
thx
(network is uppity again)
 
10:31 PM
I hate when networks are "uppity"
Sooooo fake :)
 
user142019
@Xeo It’s 3.1 with some extensions like support for code signing and frameworks.
 
user142019
So I actually have 3.1, I guess.
 
@Zoidberg'-- Cool stuff. I didn't know it had progressed since 3.1
 
user142019
@sehe Apple extensions.
 
user142019
10:32 PM
> Apple clang version 4.0
 
user142019
You need those for iOS development.
 
user142019
But yeah, it compiles. I don’t know if extern "C" really affects the type, since it’s a template, and since I rarely use extern "C".
 
@Zoidberg'-- sweet picture
 
user142019
extern "C" typedef void(*bar)(int);
typedef void(*baz)(int);
static_assert(std::is_same<bar, baz>::value, "moo"); // no error — what
 
user142019
How am I supposed to test if a function pointer type has C linkage.
 
10:42 PM
@Zoidberg'-- You use objdump, nm or similar. Linkage is not a language feature, in a way
 
user142019
@sehe nm did the trick.
 
user142019
bacon!
 
user142019
Wait. Fuck.
 
@Zoidberg'-- Okay. Whom?
 
user142019
@sehe how could I possibly use that with function pointer types?
 
user142019
10:45 PM
I have a type T and I want to check if it’s extern "C" or not.
 
@Zoidberg'-- Huh? Function pointers just point somewhere. Whether or not the name was decorated is irrelevant
 
user142019
48 mins ago, by DeadMG
0
Q: How to declare a member extern "C" function pointer

DeadMGI'm looking to declare the type of an extern "C" function pointer. It is a member variable. The syntax in this question I cannot get to compile. template<typename Sig> struct extern_c_fp { extern "C" typedef typename std::add_pointer<Sig>::type func_ptr_type; }; I have experime...

 
Wokay. I don't see what should be different about extern "C" except for the name mangling. I mean, we're not talking about different calling conventions here, are we? /cc @DeadMG
 
user142019
10
A: How do declare an extern "C" function pointer

Johannes Schaub - litbYou can try including cmath instead, and using static_cast<double(*)(double)>(std::log) (cast necessary to resolve to the double overload). Otherwise, you will limit your function to extern C functions. This would work like extern "C" typedef double (*ExtCFuncPtr)(double); double foo(dou...

 
Hmmm. It does my head in. Is this some Clang specific extension/implementation detail?
 
10:51 PM
@sehe iirc the solaris cc compiler has to be told to shut up about c versus c++ calling convention (which is the same in practice, but it spits out formal warning anyway)
 
@Cheersandhth.-Alf hehe. Goes to show that I managed to stay away from C interop when doing Solaris (only a little, home projects only). Never used Solaris professionally
 
me neither
:)
 
FUN FACT: If humans stood in a single file line around the equator, most of them would drown.
 
"Default template arguments for function templates" huh i didn't even know we got that!
 
user142019
@sehe what do you think of the new regeeraccoord?
 
user142019
10:58 PM
I have crisp-flavoured crisps.
 

« first day (749 days earlier)      last day (4182 days later) »