« first day (143 days earlier)      last day (4796 days later) » 
00:00 - 19:0019:00 - 00:00

12:04 AM
ZOMG I about busted an artery until I found out that WM_GETFONT/SETFONT aren't handled by default.

I simply couldn't understand why my window refused to save off my font.

Thanks for the documentation MSDN
 
 
1 hour later…
1:20 AM
Does anyone know how the vs environment for x64 differs from x86_x64? I've seen stackoverflow.com/questions/3508173/…, but that doesn't seem to have an answer for my problem.
 
 
4 hours later…
4:52 AM
Appearing and Disappearing consts in C++ (Scott Meyers) drdobbs.com/cpp/229300511
 
 
4 hours later…
8:59 AM
I'm breaking the silence
good day all
@sbi what's new today?
 
aghh
breakfast ! coffe!
 
sbi
@Tony It's Tuesday. 'nuff said.
 
@sbi true that
 
9:20 AM
0
Q: what does this function declaration mean in c++

wvwvwvvirtual const char* what() const throw() { } AFAIK function what will return a constant pointer to a mutable char.the rest i am not sure. could nybody help?

never seen the const throw at end of func?
 
class A
{
public:
A(int){}

};

int main()
{
A *p= new A{1};
}

Why does this give error on Clang++ ?
 
@PrasoonSaurav isn't that the wrong type of brackets for ctor A{1}
?
 
@Tone: It is the initializer_list syntax from C++0x.
 
@Tony No. Try passing -std=c++0x to your compiler. Initializer list : www2.research.att.com/~bs/C++0xFAQ.html#init-list
 
@PrasoonSaurav,@wilx ah, ok. Had never seen it before!
 
9:30 AM
Compiles fine on ideone (g+++ 4.5.1)
 
@PrasoonSaurav I don't think that is yet supported in clang++ (clang.llvm.org/cxx_status.html). Clang is a fairly new compiler, I don't think that even all c++03 is available yet
 
@DavidRodríguezdribeas Even I thought the same. Didn't check on the website though. Thanks for the information. :)
 
@Tony it's a C++98 exception specification. since it's an empty spec it says that the function can't throw any exception. exception specifications have been deprecated or removed in C++0x.
 
nothrow, as a CV qualifier could have been nice feature...
stuct Foo {
  bar();
  bar() nothrow;
};
Foo f;
f.bar(); // calls the throwing version of bar.
nothrow Foo g;
g.bar(); // calls the non throwing version of bar
 
@ChrisBecke :) that one in particular is the only one deemed to have any use (no throw guarantee, where guarantee is that the programmer "guarantees" not that the compiler will do), the no-throw annotation will be available as noexcept in c++0x
note that it does not make sense to say that an object does not throw, it is interesting to annotate that a function called on an object does not throw, but objects cannot possibly throw
more than a tool for deduction --which it is not-- it is a way of telling the compiler how much effort it needs to make to handle exceptions
 
9:46 AM
With reference to "nothrow Foo g;" ?
 
if a function can throw (or a nested call can throw) the compiler needs to add hidden code that will handle stack unwinding when the exception is present (this is usually handled by having a function that destroys all objects in reverse order of creation, and updating a instruction pointer into the destructor of the last constructed object
@ChrisBecke No, noexcept (as throw() ) before are not properties of the objects, but the functions/member functions called on them, and it is not used for overload resolution
 
humm playing/watching sc2 makes me wanna stim myself
or at least my brain
 
Note that the overload resolution for throw/not throw is handled differently
 
hence my qualification "as a CV qualifier COULD have been a nice feature..."
 
for example with new (nothrow_t) X;
I insist in that I don't think that it makes sense to have it as a cv qualifier
I don't think it adds any value at all
 
9:50 AM
Well it could have been used for overload resolution.
whether or not that is a desirable feature is a different argument :P
 
I don't think that exceptions should be something that should be implicitly resolved, and you can write similar code without much hassle:
void bar::foo(); // throw version
void bar::foo( nothrow_t ); // no throw version

bar b;
b.foo( nothrow_t() );
 
But I have always thought that userdefined CV qualifiers to assist with, well, userdefined overload resolution, would be useful.
 
I find that C++ is confusing enough as it is, without needing to add extra hidden mechanisms that will change behavior in ways that are not seen in the code.
 
I thought it was generally not advised to use try/throw/catch code blocks? That you should instead handle this situations so that their no need for exceptions
 
cvdefine unsafe;
void Foo(char* stringbuffer, unsafe char* unsanitizedbuffer){
    stringbuffer = unsanitizedbuffer; // error.
}
 
9:54 AM
@thecoshman currently it is used to document that a function cannot throw and can be used to provide the strong exception guarantee
for example, providing a swap member function that guarantees that it will not throw, makes it trivial to write an exception safe assignment operator:

test& test::operator=( test copy ) {
swap( copy );
return *this;
}
 
There, a potential cv qualifier that could help programmers define the boundary between unsanitized input, and sanitized data that can be passed to SQL directly :P
 
@DavidRodríguezdribeas thx for ur replay on Sunday, yes it was copy/paste from vi. I checked it with valgrind and it says 80 bytes lost. (codepad.org/VGCpDChc)
 
@Nils You see why the memory is being lost there :)
 
@DavidRodríguezdribeas void asdf( double*& a) would pass a reference to a pointer.. right? But how can I do this by only using pointers?
@DavidRodríguezdribeas Now it should be correct, at least that's what valgrind tells me. codepad.org/nnlM1COT
 
sbi
10:09 AM
The chat is acting up again. My connection is shaky. A few of us Germans had this last week. How about you, @Konrad, @Johannes, @FredO? Can you access the chat?
 
10:26 AM
@Nils Sorry I was getting coffee :) The right C way of doing it is as you already found: not creating a copy, but modifying (*a) directly
 
:)
 
sbi
10:53 AM
0
Q: Having trouble to connect to the chat

sbiFor two days last week, I had trouble accessing the chat. The site either wouldn't load, or wouldn't load fully, or render awfully, or I couldn't post messages... I only had trouble when doing so from work while it was fine from home, it was worse in the mornings (GMT+1) and better in the evening...

 
11:16 AM
Very interesting observations here
 
@Reno No that’s complete bullshit. The FQA is an angry, incoherent rant without real value … it’s regularly bashed on Stack Overflow.
 
@Reno very interesting pile of ****. There are some things that are true, and a lot of biased misinformation
 
Ah I see . something things are true that i can relate to
no wonder
 
@sbi No troubles at the moment?
 
@sbi talk to MarcGravell in meta
 
11:20 AM
@sbi @KonradRudolph what ISP are you guys with?
 
just trying to rule out the obvious...
 
@balpha 1&1
 
@Reno If you want to discuss a particular issue, just bring it up. With some luck no knife will be thrown at you, but I would duck just in case
There are many things that seem weird at first but for which the other alternatives are much worse
 
@DavidRodríguezdribeas no dude, I was studying for an interview so I stumbled across this.
I have nothing against C++ other than its long build time
 
11:24 AM
Seriously, the language, as all other languages have issues, and they have been solved differently in different cases, but all those are design decisions, and you have to trade some things for others
C++ is complex and hard, and some things are/have been mistakes, and others should be praised more than they are, but everything is up to discussion, and I think there is much to learn from discussing why things are as they are.
The best professor I had did not tell you how things are --that, you can read from books-- but what decisions had to be taken to get there, why other approaches were discarded and why, what was lost in the process
 
Yeah discussing about C++ is so meta :) . I never do it, unless like now I have an interview to face =T
 
You can learn a lot from discussing different languages and their solutions :)
 
The worst part of C++ is the include system, IMHO, the rest is not nearly as annoying.
 
@PiotrLegnica Oh, I don’t know. Template syntax and ambiguities, as well as the most vexing parse are also strong contenders
But true, the include system is broken badly
 
The complexity of the parser, I think, is one of the biggest issues. But that comes together with backwards compatibility with C and the decision to have declarations/use looking similar.
That and the fact that you can declare in many contexts:
void foo() {
type t( std::string() ); // declare function t returning type and taking a funtion that returns string and has no arguments as single argument
}
 
11:34 AM
Template syntax is not that bad. Template-related diagnostics in both GCC (especially GCC) and MSVC, however...
 
yeah that is horrific
 
But that is not necessarily an issue with the language in as much as the tools
Debugging STL algorithms used to be horrible, but some debuggers understand the STL and provide sensible information (size and contents of the container, rather than the internal structures that the container has: pointers and such)
The real issue there is that it is really hard to parse
 
MSVC's debugger is quite good.
 
11:47 AM
@PiotrLegnica and concepts were meant to aid there, but they did not reach an agreement, so it fell off of c++0x and will be redealt with in a next revision of the standard (I think that in a Technical Review, not sure now)
 
sbi
12:11 PM
@balpha I've just added a comment to the question: http is via Vodafone/Arcor.
 
k, thanks
 
12:57 PM
void pointer: hello*
template: hello<T>
 
@DavidRodríguezdribeas I was bored
 
1:22 PM
@Tony Not enough templates. Metaprogramming is when you have templates that generate templates that generate templates that generate types.
 
sbi
@PiotrLegnica No, that would be meta meta meta-programming.
 
@sbi: No, metaprogramming has to be at least templates generating templates that generate types
std::vector<T> is not metaprogramming
well, technically it is, but I don't feel that it really qualifies as TMP
 
sbi
1:37 PM
@DeadMG No. Programming is you writing a program. Meta-programming is you writing a program that writes a program. The number of template layers have nothing to do with it.
 
technically, yes, but I wouldn't call using the preprocessor metaprogramming
 
sbi
And, yes, taking this strictly, writing any template would be meta-programming, because you just write the code from which the compiler generates the instantiated function/type.
@DeadMG Yet there's a preprocessor meta-programming library, and I find it aptly named.
 
yes, because they're writing macros about macros
 
I should've included ';)' there. :P
 
sbi
@DeadMG Anyway, this is considered a meta-program, yet there's no template generating a template (or I don't know what you're talking about):
template< unsigned int N>
struct factorial {
  static const unsigned int result = N * factorial<N-1>::result;
};
template<>
struct factorial<0> {
  static const unsigned int result = 1;
};
 
1:42 PM
I'll give you that one
 
sbi
@PiotrLegnica So? Do you really think you including a smiley would prevent the regulars of this chat room from creating a convoluted discussion about an innocent and irrelevant comment? (What do you think the chat is for?)
@DeadMG Thanks, but it's already mine. I've been using it for years. :)
 
lol
so I don't suppose anyone here knows ASP.NET?
 
sbi
@DeadMG Ensuing silence as everybody hastily lowers their faces, trying to concentrate on a speck of dust on their shoes...
 
lol
I can't seem to make the designer work properly
it only seems to want to move my stuff vertically or stack them horizontally
won't allow any whitespace on the side
 
sbi
@DeadMG Maybe the asp.net designer only speaks a non-whitespace-alert language?
 
1:48 PM
lol
oh ha ha maybe I'm just a noob at this
now all I need to do is figure out how to make it resolution-dependent
 
sbi
@DeadMG That does sound wrong, you know. Usually you want things to be resolution-independent.
 
oh no wait, that doesn't really solve the problem
 
sbi
@Dead, BTW, I hold back for soo long with this comment until I finally broke down yesterday and just wrote it, hoping that the tension would be gone after I got this out to you. However, when you logged ín a while ago, I still wanted to write this, only I already had, so I realized I had spoiled the one chance I had to do this and now have to restrain myself for the rest of eternity...
I'm afraid it's as my father always used to say (trying to translate this from German here, so bear with me if it's badly worded): Fulfillments never satisfy.
 
I don't get it
 
sbi
It's the craving you're craving for.
 
1:54 PM
no, I don't get why that comment is such a source of tension
it's not like, "OMG @Dead, I've got pictures of you being a violent axe-murderer"
 
sbi
@DeadMG Ah. Well, even in the C++ chat room not everybody is as obsessed about words as I am, then. (Others might obsess about ax-murder instead...)
 
lol
 
sbi
I find it hilariously funny.
 
VICTORY
I discovered the center-alignment button
 
sbi
@DeadMG Cong-rats!
 
1:59 PM
Viet-cong?
 
sbi
@DeadMG Are those the nastiest?
 
they're the North Vietnamese Communist army
or were
I don't really know
 
sbi
@DeadMG I know. I was just trying to drive the pun a bit further...
Anyway, what I meant to say about that play on words: When we were in Seattle in the 90ies, visiting the sister of an American friend we knew from Berlin, she told us that they had German visitors before, and those had totally freaked out over some mediocre pun they came up with, which she and her boyfriend didn't find very funny at all. We were looking at them expectantly, so she told us that they named the Space Needle "Space Noodle". At which point we totally freaked out...
So they decided that must be a German thing.
 
wtf, I don't get it
 
@sbi, I'm not German.
 
sbi
2:04 PM
@AProgrammer Yeah, fine with me. Did I imply otherwise?
@DeadMG See, that's what I was saying. You natives just don't get it. :)
 
lol
 
@sbi, If it is a German thing, I shouldn't get it.
 
ok
I definitely think that ASP.NET is way better than PHP
but the designer sucks
or maybe it would be better if I actually knew CSS
 
As a English person I feel compelled to fuel the stereotype that Germans do not get humour
 
sbi
@AProgrammer Interesting. Are you a native? (And, anyway, unless you wrote your comment immediately after you finished crawling back from under the table, where the spasms of uncontrollable laughter sent you, you wouldn't qualify.)
@thecoshman Pray tell me what's humorous in this statement, because I didn't get it. (Please tell me you didn't crash into my current humor feast here with a bleak and totally humor-less statements that my race is unable to get humor. Please tell me there's more to this than what I got. Please. I really don't want to look down my nose on you.)
 
2:14 PM
@sbi Nothing much. It''s a strange stereotypical view of Germans we have in England, because the few Germans I have known have be rather funny. I also understand that whilst we English seem be fixated with 'getting one up' on Germany, Germans have beef with another country and couldn't care less about England
 
@sbi, I'm obviously not a native speaker of English (and I'm a non speaker of German; I used to speak Dutch, but I lack practice, last time I tried, it was a strange mix of English vocabulary used with a Dutch grammar).
550 tests to check...
that's what I get for trying to make my program more usable...
 
sbi
@AProgrammer Lemme recap: 1) You used to speak Dutch, but don't anymore. 2) You're not a native English speaker. 3) You don't speak German.
Well, that one has me puzzled. #3 certainly means you aren't Dutch :), so I have no idea what you native tongue would be...
@thecoshman You didn't get the humor in my reply.
 
@sbi Ironically, no I don't :P
 
@AProgrammer: I don't get it. The country to hate from England is France
 
@sbi, Which country has no goverment for the best part of the last year because some disagrements between the Duch speaking part and another one?
 
sbi
2:21 PM
@AProgrammer I'm with you. I just merged a private branch that I had been working on for a couple of days into the trunk, and am now disabling all the tests that fail, so I can fix them later. How is sloppy that?
 
@deadMG yer, and Germany, and USA, and a little bit of Spain and Australia... basically ever country
 
lol
 
sbi
@AProgrammer Ah, so you're a sibling to @Tony then?
 
@thecoshman: USA is becoming more popular to hate on, but I've not seen anything specific to Germany, Spain or Australia
 
sbi
@thecoshman Well, ironically, my reply implied just that. :) (How's that for meta?)
 
2:23 PM
Spain is because they are view as the sponge of erope, and something to do with fishing in our waters, no to sure. Australia... well just because they started it first I think
Any hoops, I am of to get eggs. I wasn't going to, but have caved and want pancakes :D
 
sbi
@thecoshman Wait wait wait! Australia started fishing in your waters first??
 
@thecoshman They started... beating you in cricket and rugby?
 
@sbi no, those are two unconnected sentences themed about why England hates the respective contrys
 
hahaha
 
@AProgrammer yer basically :P
 
2:24 PM
Australia has been beating us in cricket and rugby for 50 years
we started beating them
 
shh now, let me go! I want pancakes, which means I have to go shopping for eggs!
 
@sbi Sloppy enough that I can't try it...
 
2:46 PM
@AProgrammer welcome to the country with Govt
the country where we have more political parties then people in each party.... or so it seems anyway
so what would be the point of Template Meta-Programming
I am the void pointer that wants to meet the template metaprogramming....
 
@AProgrammer Belgium, right
 
sbi
@Tony TMP is about executing algorithms at compile-time (rather than at run-time). The advantages of this are 1) if there's a bug in the algorithm, it won't compile, so the bug won't reach the customer, 2) there's less to do at run-time, so the code runs faster. The disadvantages are that 1) it might take forever to compile (gcc used to lousy, don't know whether that still applies), and 2) TMP is an accidental discovery, not a conscious creation, so the syntax is horrible.
I got into TMP when I was working on a project with several MLoC and a seven digit number of installations throughout the world. When you are a small shop, with less than a dozen developer working on such a project, you cannot afford bugs that affect 1% of your customers, because the support costs would simply kill you within days. So the more bugs the compiler found the better. If it didn't compiler, it wouldn't blow up into a customer's face.
 
Also, TMP allows to do computations on types, something not possible without it.
 
sbi
3:02 PM
@AProgrammer Of course, different paradigms allow different strategies to solve problems, and type computation is one paradigm for which you would need a form of meta-programming. However, that doesn't mean that you can do something with TMP that you cannot achieve by other means in C++. It just means that TMP might provide a much better way to do what you would do differently otherwise.
 
@sbi thanks for the explanation... however someone care to show me a simple example of such template metaprogramming?
 
sbi
@Tony The example I showed earlier is somewhat like the "Hello, world!" of TMP:
1 hour ago, by sbi
template< unsigned int N>
struct factorial {
  static const unsigned int result = N * factorial<N-1>::result;
};
template<>
struct factorial<0> {
  static const unsigned int result = 1;
};
 
If you look into the internals of the STL there are probably a couple of things there wrt. optimizations. Some of them are not implemented as TMP, but could
 
sbi
It computes a number's factorial at compile-time. Quite impressing when you see it for the first time, but utterly useless in practice. But "Hello, world!" programs rarely ever are useful.
 
@sbi so is it a practice to use structs in TMP instead of classes or what is the reason for that?
 
3:05 PM
For example, many implementations of the STL will use memmove internally instead of iteration if the appropriate parameters are handed into the std::copy algorithm
Like in:
int src[10], dst[10];
std::copy( src, src+10, dst );
 
sbi
@Tony Actually, factorial is a meta function: it has a name, you pass a parameter in, and it returns a result: factorial<42>::result.
TMP is pure Functional Programming. You can't change any variables, you can only compute new ones. So iteration won't work, you have to recurse. That's why recursive lists (as in LISP) are so useful for TMP.
 
STL implementations tend to have code that ensures (at compile time) that the two iterator types refer to contiguous blocks of memory, and that the type itself is bitwise copyable and translate that template into: memmove( dst, src, 10*sizeof *src);
 
so the struct is of no importance here?
 
sbi
@DavidRodríguezdribeas Yeah, ISTR that Scott Meyers used this as an example for TMP in Effective C++ (3rd edition). He's spreading the explanation of the need and the means to do this over several pages, hardly leaving anything left to wonder about....
@Tony No. It's just a syntactical crutch we use to limb along in a language that wasn't designed for this.
 
Am I only seeing part of the power of TMP when I consider it to only be for have complicated values calculated at compile time? Such as factorial
 
sbi
3:10 PM
You could use a class just as well, but then you'd have to type public, so people usually use struct instead.
 
@sbi I see.... more sugar then :)
 
sbi
@thecoshman One important application (maybe the earliest one, invented by Todd Veldhuizen) is expression templates, that build an AST from an expression and defer evaluation until after the thing is optimized.
 
but for me to use that in my code would be silly right? TMP is more useful for library writers or have I got it wrong?
 
sbi
The logging library I keep pointing out (templog.org) uses expression templates (and other techniques) extensively in order to defer the evaluation of logging statements until the decision was made whether a specific log message is to be logged at all.
 
@thecoshman Yes. Back to David and sbi examples: part of the power is in being able to manipulate types (check properties of them, manipulate them) and you may represent quite a lot of things as types (for instance, expressions, and thus expression templates).
 
sbi
3:14 PM
@Tony Once I had started I found more and more applications for it, always on my quest of searching means to turn run-time errors into compile-time errors.
Many things you only think of after you've seen they are possible. For example, when I read how Alexandrescu created a type that derived from all the types in a compile-time list of types, I merely glazed over it. But years later I actually created such a beast, because for some strange piece of code writing derived_from<your_base, my_base, _their_base> captured the intent of the code perfectly. Hadn't I known that this is possible, I'd never thought of this.
room topic changed to Lounge<C++>: Where void pointers meet their end by means of template metaprogramming
Mote in my eye.
Anyway, I outta here now. Got to pick up the kids. I might drop in again later tonight. See ya!
 
have fun
 
@DeadMG hello
do you also do TMP?
 
3:36 PM
TMP is not something that you do on a daily basis, just one tool that can be used for some particular purpose
 
for_each(base as Base in You.BaseList)
{
base.owner = Us;
}
 
@Tony Yes. This is something you do in libraries in order to ease their usage (simpler and less error prone syntax, better performance, lessening the cost of customisation)
 
I get it
 
4:33 PM
breaking the silence
 
@Tony butter fingers
 
@thecoshman what?
 
Well, I'm glad I didn't miss pancakes in the end
 
@thecoshman you make me feel like something sweet now
 
@Tony you broke the silence, I call you butter fingers like some one who is clumsy and likely to drop stuff
 
4:35 PM
and I don't have access to it right noz
 
@Tony o_0
 
:p
 
what is the story with the pancakes?
 
@DavidRodríguezdribeas Appart from them being win?
It's just a tradition, at least in England, where on this day each year, we have pancakes. Traditionally I think it's to clear out the cupboards, but seeming as milk and eggs come all year round, it seem silly to blow your flour stash like 6 months before harvest. Might have some sort of religious backing as well... shrove Tuesday?
 
Uhm.. here in Ireland today is Pancake Tuesday (or something like that) and I am curious as to why
 
4:45 PM
Shrove Tuesday is a term used in English-speaking countries, especially the United Kingdom, Canada, Australia, New Zealand, Philippines, and parts of the United States for the day preceding Ash Wednesday, the first day of the season of fasting and prayer called Lent. The word shrove is the past participle of the English verb to shrive, which means to obtain absolution for one's sins by way of confession and doing penance. During the week before Lent, sometimes called Shrovetide in English, Christians were expected to go to confession in preparation for the penitential season of turning ...
sums it up nicely
ooh, your Irish! I moving over in May with girlfriend who is Irsih. Moving to Athlone :D
 
thanks for the link :)
Well, I am not Irish, I just happen to live in Ireland at the time :) (Dublin)
 
So I want a function which I can call w/o an object of the concerning class, therefore I declare it static. Can I also do this with inline functions? (I guess so..)
../GPULagrangian/lnInclude/GPUHelperI.H:8: error: cannot declare member function ‘static void Foam::GPUHelper::flatternVector(Foam::vector, Foam::scalar**)’ to have static linkage
 
static has different meanings in different contexts, a static member function has the static keyword only in the declaration inside the class definition
 
@Nils, yes.
struct S {
    static inline int f() { return 42; }
};
 
@Nils If you try to add the static to the function definition (that happens to be at namespace scope) it will use the --only in this translation unit == static linkage-- meaning, which is incompatible with a static member function
 
4:57 PM
omg pancake day :D
 
struct test {
static void foo();
};
void test::foo() { // no static here
}
 
@Reno indeed om nom nom!
 
todays is womens day too o_O
 
Or
        struct S {
           static int f();
        };

        inline int S::f() { return 42; }
 
Make me a sammich pancake woman
 
4:59 PM
humm
 
@Reno not in my house! no really, no women in my house
 
@thecoshman, no, by the time you get a woman in, it is no longer your house :P
 
So in my case I have a function declaration which includes the static keyword, but then when I actually define the function I have to omit the static keyword.. uhhh
What about inline, do I need this in the declaration and defintion?
 
@Nils right, as in the second context the static keyword is interpreted as "static linkage", not "static member"
 
thx
 
5:03 PM
I don't recall the whole thing with inline (I believe that if a function is declared inline then you don't need to add the keyword to the definition) but I always add it to the definition, just try :)
struct test {
void foo() {} // this is inline by default
void bar();
};
inline void test::bar() {} // this is explicitly inline
 
I thought it was only ever when you declare (as in not write the body of the function) a function that put static? and inline is only when you actually implement the function
 
I tend to favor defining the function in the class definition (implicit inline) and then letting the compiler do it's magic
so I might be wrong :)
 
@DavidRodríguezdribeas But is it still not up the compiler weather or not to actually inline functions? just the same as when you manual declare a function as inline
 
inline may be given at the declaration
struct S {
    inline static int f();
};

int S::f() { return 42; }
or at the definition (as above) or at both places.  It doesn't matter.
 
@thecoshman according to the standard it is, but in some compilers the inline keyword is interpreted as do inline even if you would not
unless you provide compilation flags that disable/tell the compiler not to favor inlining...
in particular, more often than not with g++ the first method will be inlined and the second will be left for the compiler to decide:
struct test {
inline void inlined() { ... }
void maybe() { .... }
};
even if according to the standard they are exactly the same definition
 
5:10 PM
yup its completely up to the compiler.
 
@thecoshman It is up to the compiler. But the compiler can only inline functions when it see their definition, and in non template cases, it is quite easier to ensure that they see it by using inline (well, link time optimisation are becoming more common, but there are still quite a lot of projects where it isn't used). Then there is the fact the declaring them inline may also helps compiler heuristics.
 
As Yogi Berra said (I know it has been attributed to other authors, but for me it will always be Yogi):
In theory, theory and practice are the same, in practice they aren't
 
5:41 PM
what's the git front end of choice on Linux?
 
git, probably.
 
heh
 
terminal?
Can I get a grammar check please? Should this be Affect or Effect, "Each tile's level of detail is not E/A-ffected by it's neighbours"
 
I'd use affect.
 
5:58 PM
I thought so, but I suck at English on account of being English :P
 
6:48 PM
Effect is a noun.
Cause and effect.

Affect is a verb.
Infect, is a totally different word.
You'd be surprised how often that one gets confused.
 
Effect is a verb as well :)
just not used as often
 
All I know is that there is that affect != effect and it fecks me over more often then it should
 
00:00 - 19:0019:00 - 00:00

« first day (143 days earlier)      last day (4796 days later) »