« first day (448 days earlier)      last day (4725 days later) » 

10:15
the default value for int is 0 right?
If initialized then yes
what does the runtime exception segmentation fault mean?
it means segmentation fault
trying to access memory you shouldn't be
You accessed a variable that does not exist. Bad pointer dereference or the like.
@IntermediateHacker be aware that it's a runtime error, and (usually) not a c++ exception that you could catch
10:30
template<typename T, int N> operator T&(); // what is N doing there , If object X has to be converted to type int[20] i.e func(int x[20]); and we pass object X to func?
Anyone has an idea of managing user's session on a web server for an iPhone app user?
2
Q: Manage user's session on a web server for an iPhone app user

HectoretI'm writing an iPhone app. This app requires users to login on a remote web server which is using php + mysql. How can the server handle this? Using sessions? Cookies? unique IDs? Any link/code/tutorial on how to do this would be great. Thanks!

0
Q: Session Management in iPhone

DilshanI need to manage server sessions in iPhone. As I researched there are many ways. One way is to use the apple native method calls by make use of the NSURLConnection and NSHTTPCookieStorage classes. However using the 3rd party libraries like ASIHttpRequest can also be helpful cos it already has imp...

0
Q: iphone session management

molloyHow can I manage user sessions in an iPhone app? I get a username and password from the user on the first page of my app. The user may log out whenever he wants. How can I store session information in an iPhone app like any other web application? Is there any other technique for that? thank you.

I found these links.
What actual work required for managing session in iphone?
nvm.
@Rock This is C++ lounge not Iphone lounge
but session management would be required in C++ also AFAIK.
and in iPhone lounge I am not getting which language users are using .
10:36
@Xeo can you give a look to my last message please?
Xeo
Xeo
@MrAnubis Hm?
12 mins ago, by Mr.Anubis
template<typename T, int N> operator T&(); // what is N doing there , If object X has to be converted to type int[20] i.e func(int x[20]); and we pass object X to func?
Xeo
Xeo
@MrAnubis That code is ill-formed, the operator will never be called because N can't be deduced
Also, int x[20] as a function parameter is the same as int* x
@Xeo if func's signature is func(int (&x)[20]); ?
0
Q: Generic way to convert a string into a numerical type?

IntermediateHackerI have this class: template<typename T> class Parser { public: Parser() : count(0) {} virtual void parse(const string&); void get_token(void); private: T result; char token; string expression; int count; }; now had the c...

@AlfPSteinbach can u take a look at the question?
Xeo
Xeo
10:45
@IntermediateHacker Ever heard of stringstream or boost::lexical_cast?
And I'm pretty sure that the question is a duplicate
@Xeo Thanks :)
@Xeo thanks, boost::lexical_cast works. :)
Xeo
Xeo
@IntermediateHacker Duplicate found
I think it's an interesting exercise to do that without the stream, though.
Xeo
Xeo
10:49
@AlfPSteinbach std::to_string in C++11. :)
You mean with?
One runs into problem with e.g. size_t, is the same as some other type or not?
my question is about to get closed in 10... 9..
@Xeo thanks, i haven't used it yet, but probably will. i always called that stringFrom
describing the result instead of the action
to_string still isn't generic, though, not a template but an overload set
10:51
however, many people prefer the verb/imperative form for function names
Xeo
Xeo
Oh, I just noticed that he wants string -> numerical input, not the other way around. Well, to_string won't help in that case.
if builtin types were objects, one could inherit from them and actually create new, but distinct basic types
Yes, the C++11 answer to @IntermediateHacker's question is even further from a template. std::stoi, std::stol, etc
@rubenvb They are objects, but not classes.
My first C++ compiler actually allowed deriving from builtin types. It was interesting.
@Potatoswatter You've written C++ compilers?
@Potatoswatter it would be much easier to be able to introduce new types like that.
for e.g. char16_t etc...
(where it's missing)
Xeo
Xeo
10:55
@rubenvb Eh? Why not just a normal struct with conversion operator and a converting constructor?
@Xeo because that would fail where the builtin type wouldn't. I think we talked about that yesterday or the day before
Xeo
Xeo
Examples?
The robot might remember, he suggested an enum char16_t : uint32_t
but also noted it was far from perfect
@IntermediateHacker No, the one I used in the mid 90's. Come to think of it, there was another I used before that.
@rubenvb in C++11 you can to some extent achieve that with a based enum
11:06
Even within the context of writing a discrete standard library, what's the need to define new fundamental types?
@Potatoswatter to get static type checking. it's a safety thing. and letting the compiler do the work
@AlfPSteinbach For things like unit conversions?
@Potatoswatter yes. and character encodings.
I think that's still better done with a wrapper class.
boost has a macro that generates a simple wrapper for integer
Xeo
Xeo
11:09
I once played around with a tagged_type template, that would allow for wrapping of arbitary types bound to a tag (tagged_type<struct a_tag, int>) for example
@Potatoswatter but in some cases (in particular for encodings) a wrapper class doesn't cut it.
A fundamental type is really pretty low level in the language.
Xeo
Xeo
It would either inherit publicly from the type or would simple wrap it, depending on whether it's a fundamental type or a user-defined type
C++ doesn't really handle more than one execution character encoding per translation unit.
Xeo
Xeo
11:10
Sadly, without C++11, the inheritance thing doesn't work so well. Hooray for inheriting constructors.
I which there was typedef and alias in C++.
i don't understand why e.g. tomalak puts picture of girl's face as avatar/icon on So
Xeo
Xeo
@rubenvb typedef for distinct types and alias for what typedef currently is?
@Xeo exactly. And the alias would be useful for alias templates as well, instead of ugly using.
that's what typedef struct does in C, kind of.
DOn't you think there's a discord between using in namespace context and and using in a (current) typedef context?
Xeo
Xeo
How is using ugly? It describes pretty well what it does
If you're using a name, it actually equals another name
11:15
Yuck. The overloading facility already solves the problem.
Xeo
Xeo
using a_name = another_name;
Lightness Races in Orbit, Nottingham, United Kingdom
45.6k 6 60 121
^ Like that. Who is the girl?
@Potatoswatter overloading cannot differentiate between char and int8_t (if they have the same underlying type of course), which would be quite handy for decent input/output.
Xeo
Xeo
@AlfPSteinbach Wait, that is Tomalak?
Empty at the moment. But it'll happen! I occasionally go around gnomishly fixing typos and grammar, tidying up pages and such like. =Links= * [http://www.facebook.com/tomalak Facebook profile] * [http://www.last.fm/user/tomalak16/ last.fm profile] * [http://www.flickr.com/photos/tomalak_geretkal/ flickr profile] * [http://kera.name kera.name Homepage] =About Me=
11:20
That is very misleading. Following the link, that's the singer of an Italian metal band.
Also, not the same as the girl in the avatar.
@Potatoswatter huh, which link did you follow?
Lacuna Coil is an Italian gothic metal band from Milan. Formed in 1994, the group has had two name changes since being previously known as Sleep of Right and Ethereal and was inspired by the combination of gothic imagery and music. The members have been known, musically, for composing midtempo songs consisting of prominent guitar lines and contrasting dual female/male vocal harmonies to help create a melodic, detached sound. Much of the band's recent material, however, sees a heavier and more down-tuned style, featuring a more distinct bass line and a higher mixing of the guitars within ...
@Potatoswatter I don't know how to influence the one-boxing's choice of picture.
Not your fault, but it's a misleading juxtaposition.
@Potatoswatter well tomalak says he's a great fan of that band?
11:23
Yep. Also Evanescence. There are no pics of dudes on his WP user page, FWIW.
Well, that fills my stalking quota for the day :)
@Potatoswatter it was just that he decided to edit an earlier question of mine, and posting a possibly misleading comment. i don't see anything he writes here in chat, so i don't know if he's here. i don't care, i just wondered about that girlie image
i mean, he's not the only one
maybe he just digs chicks?
Not the only Evanescence fan? Gawd I know, I live next to a Karaoke bar.
Xeo
Xeo
0
Q: Warnings that will consistently get triggered across different compilers?

XeoAfter writing an answer to this question which displays the solution at compile time with an error, I wondered if it was possible to get a warning instead and finish compilation (as is actually specified in the question). While diagnostics in general are compiler-dependant, it's pretty obvious ...

11:49
@StackedCrooked maybe. A lot of STM libs behave like that. But that requires you to heap-allocate shared objects (mine are stored in-place), and you lose locality as well. Btw, for movable types, you should get a move at the end of a transaction, not a copy, improving matters a fair bit. Then it's one copy and one move.
I wanted to follow the "natural" C++ semantics as closely as possible. If you want to avoid the copy, you can use a shared smart pointer, but I don't want to force the user to use the heap and pointer indirection
Bye all, pizza time!
Can anyone tell me a reliable method for detecting wild pointers ? (i.e.I want to be able to make an if condition like : if the pointer is wild , do something ... if not do something else)
Wild pointer?
I think he means one that hasn't been zoo-ified
@angryInsomniac nope, it doesn't exist. You have to write your code to work in the first place
which means that you have to know if your pointers point to a valid object or not
12:11
@jalf Hmmm , that's what I was afraid of :( well I guess I can maintain a few boolean values
12:28
are there templates in ocaml?
What do you mean by template?
afternoon
is it implied that x0 goes to 0 in this for loop for (x0 = 8; x0; --x0) ?
@Pubby as in, some form of generic programming that allows for template-like constructs. I'm not saying I'd need MTP.
@TonyTheLion use the "goes to" operator
@Pubby oh no, but this is existing code that I didn't write, I'm trying to figure out if it just means that it goes to x0 == 0
12:33
Yes, it goes to 0
@rubenvb Never did OCaml, but aren't functions generic by default?
e.g. let foo x = x works on all types
@Pubby ok, that's pretty cool. Instant templates
@TonyTheLion The condition x0 means x0 != 0.
@FredOverflow right thanks :)
is there an advantage (besides less typing) of writing it like that over just writing clear code x0 != 0 ?
Might not be equivalent with overloads
12:43
1 hour ago, by Alf P. Steinbach
Empty at the moment. But it'll happen! I occasionally go around gnomishly fixing typos and grammar, tidying up pages and such like. =Links= * [http://www.facebook.com/tomalak Facebook profile] * [http://www.last.fm/user/tomalak16/ last.fm profile] * [http://www.flickr.com/photos/tomalak_geretkal/ flickr profile] * [http://kera.name kera.name Homepage] =About Me=
didn't know he is TS
@TonyTheLion For ints and such, there definitely is no difference. Some people just like to write terse code. It's the C way.
only for enums and classes it may be different
if you overloaded ops
5
Q: Is Learning C++ Through The Qt Framework Really Learning C++

user866190The problem I have, is that most of the C++ books I read spend almost forever on syntax and the basics of the language, e.g. for and loops while, arrays, lists, pointers, etc. But they never seem to build anything that is simple enough to use for learning, yet practical enough to get you to unde...

"As an example of my dilemma take the task of building a simple web browser." Isn't that an oxymoron?
anything is simple until you start looking at the details xD
12:52
@JohannesSchaublitb hahah yes, too damn true :)
Xeo
Xeo
Anything is simple until you start.
Is it normal that it doesn't show up properly here? Even though I can see it when I click it?
Xeo
Xeo
@FredOverflow It's deleted
Only 10k+ Rep users can see it
12:56
I can see it
Yes, but I am 10k+ so why can't the chat display it for me? :)
Xeo
Xeo
@FredOverflow Because it is generic and it hates you. :P
I thought genericity came with generosity? :(
@FredOverflow i did a meta question about it once. for some reason i cannot anymore remember, it was deleted
@JohannesSchaublitb If you paste the question here, will I be able to see it? ;)
Xeo
Xeo
13:09
0
Q: Pass class Constructor through template argument in C++

michael911009I know function can pass through template argument, can I pass class Constructor like this. class A { A(){n=0;} A(int i){n=i;} int n; }; template<class T,class Constructor> T* new_func() { return new Constructor; } new_func<A,A()>(); //get default class new_func<A,A(1)&...

Seriously, some questions...
1
A: Why does int main() {} compile?

Chris CrossNo main() is not required to return just an int. It all depends on how you define main() . It can also be void, double, string, char... #include <iostream> using namespace std; void main() { cout << " void main\n"; }

It even got 2 upvotes in 10 minutes even though it's totally wrong..
@Xeo not too surprising for SO
SO ppl vote for all kind of crap
we can make an experiment. you post a question and i write a completely wrong answer but that sounds right.
and see how many ppl upvote it at first
13:28
What is best way to forward parameter pack?
Xeo
Xeo
@Pubby std::forward<Args>(args)...?
As in
2
A: Pass class Constructor through template argument in C++

FredOverflowYou cannot pass around constructors, but you can pass around factory functors: class A { int n; A(int i) : n(i) {}; public: static A* makeA(int i) { return new A(i); } }; template<typename T, typename Factory> T* new_func(Factory factory) { return factor...

yay std::bind :)
Xeo
Xeo
template<class T, class... Args>
T* make(Args&&... args){
  return new T(std::forward<Args>(args)...);
}
@Xeo Works, but what is that syntax?
Xeo
Xeo
Argument pack expansion
13:30
new_func([]{return new A(1);});
damn, the % operator isn't working with doubles. :(
Yeah, but where is unpacking allowed?
and the fmod function doesn't work with int s. :(
Xeo
Xeo
@Pubby Whenever you have a pack? I don't know what you mean
@IntermediateHacker write your own overload that calls % for ints and fmod for doubles
Als
Als
@sbi: Thanks for the condolences. As for the room owner thingy, its a non issue. I agree wholeheartedly that only regular visitors to the room should be owners and more than the regular presence users who have over the time shown some ability to act responsibly should be a criteria if there are far many regulars.
13:33
@Xeo I don't understand what a parameter pack is. A type?
@Xeo i know. but it's still disappointing when i don't find something like this in the standard library.
Xeo
Xeo
@Pubby Args... args would be a parameter pack
Same with Args&&... args
it can be a template parameter pack or function parameter pack
it can also be a pack expansion, depending on what "Args" is
if it is "typedef int Args;" then it is not a pack expansion. if it itsel fwas declared as "typename ...Args" then it is a pack expansion
Wait, typename... T then T is a parameter pack, right?
yes
a template parameter pack
13:37
What would foo<T> be then?
where T is parameter pack and foo takes normal typename parameter
and then "T... t" then "t" is also a parameter pack. if it is in a function paramter list it is a function paramter pack. if it is in a template parameter list it is a template parameter pack. and it is also a pack expansion.
@Pubby it would be the pattern or part of the pattern of a pack expansion
lulz
ok, I think I figured it out
0
A: How can I emulate constructor and destructor behavior (for particular data types) in C

refp#define your way through the problem... As pointed out by previous authors there is no automatic way of doing what you are asking, which sadly is kind of obvious since C doesn't have any way of doing true OOP. But a programmer can always hack him or herself through any kind of obstacle.. At the...

time to await the anti #define-hack bashers!
:D
it's satrollday!
hehe, Maya 2012
0
Q: Why Maya takes so long to calculate gravity?

stackoverflowerI am using Maya 2012 to create a wall made up of bricks (polyCubes). When I playback the scene, Maya takes so long to calculate gravity, making my frame rate as low as 0.3 fps. Are there some settings that I overlooked, or is Maya dynamics inherently slow? Also the bricks behave weird. They ke...

@refp until you start wanting to have freestanding commas in the code
int a, b;
fail
13:51
@JohannesSchaublitb exactly!
;)
@JohannesSchaublitb it's a trollpost, just wanna see where it will end up (comment wise)
@JohannesSchaublitb an argument against what you are saying is that there are not many cases where you have "freestanding commas" in the code in C, since you are "supposed" to declare all variables at the first immediate entry of your function. (that will be my trollback when someone spots out what you already have)
why don't you put up a hot account picture on SO xD
it would make ppl vote on your posts even if they don't like them xD
haha, well.. it will be much more obvious that I'm trollin' if I do that
:D
13:56
hmm.. the post isn't getting the attention I was expecting, maybe I should just delete it..
wait, just realized something..
@JohannesSchaublitb variadic macros is the solution to circumvent the obvious problem!
14:28
@refp why are you "supposed" to declare in such a way? What would that say against my point "int x, y;" at the first immediate entry of our function still has a freestanding comma
@JohannesSchaublitb you are not supposed (allowed) to mix declaration and code in C90
Xeo
Xeo
15:07
0
Q: double type variable multiplication in C++ results in inaccurate value

Xi DuanI found this happened when I was doing string-to-double converting exercise (e.g. atof in stdlib.h). I wanted to put string of "625" (which indicates a fraction part of a double) to a double variable 0.625. The strange thing is when I put it as part of my exercise, it resulted in inaccurate resul...

Again and again....
Anybody got a duplicate link handy?
 
1 hour later…
16:20
anyone know how I should convert mprotect(start, end-start, PROT_READ|PROT_WRITE|PROT_EXEC) to VirtualProtect( start, end-start, PAGE_EXECUTE_READWRITE, ????)?
@rubenvb what's the problem?
@Abyx I don't know if the macro is the correct one, nor what the last parameter has to be. mprotect doesn't seem to have one...
read MSDN.
The code's in LLVM compiler-rt
> lpflOldProtect [out]

A pointer to a variable that receives the previous access protection value of the first page in the specified region of pages. If this parameter is NULL or does not point to a valid variable, the function fails.
16:25
it really makes no sense to me
DWORD oldProt_unused_;
VirtualProtect( start, end-start, PAGE_EXECUTE_READWRITE, &oldProt_unused_);
So I just use a dummy variable?
yep
ok, thanks.
don't I need PAGE_NOACCESS instead?
This pretty much sums up why I hate most other Q&A sites:
_no scammy google-cloaking tactics, no salespeople, no JavaScript windows dropping down in front of the answer asking for $12.95 to go away_~ From StackOverflow / About
16:41
@rubenvb PAGE_NOACCESS where?
I don't know how mprotect interprets parameters, but PROT_READ|PROT_WRITE|PROT_EXEC equal to PAGE_EXECUTE_READWRITE
ok, thanks
17:00
great, MSVC is not expanding FUNCTION, while it is expanding FILE and LINE... grrr
What's __FUNCTION__? ;-) .
Allegro source code is confusing.
Xeo
Xeo
17:25
@rubenvb It should expand __FUNCTION__ as long as you do not only preprocess the file
__FILE__ and __LINE__ are standard in C99 (perhaps C11) and C++11. __FUNCTION__ is not standard in either language.
evening all
what's been going on here?
Nothing :)
Noooo, really !!!
lol
I'm bored
user1115652
17:42
I have a basic C++ question...
morning
user1115652
I have a data member which is an array.
what kind of array?
user1115652
I would like to return the pointer to the first element to outside code but I would like the actual data to be const. What kind of return type do I need.?
const T*
user1115652
17:43
gcc complained on that
well how the hell am I supposed to fix that?
you haven't shown a lick of code
try MSVC
user1115652
Im recompiling to see what it complains about. It is a warning. I think it says type modifier ignored on return type. or something along those lines
you probably have const T* const or something like that
user1115652
protected:
HashResult results[NUM_OF_ALGORITHMS];
user1115652
17:48
public:
const HashResult * getHashResults () const { return results; };
user1115652
where HashResult is a struct
I guess you got that warning at another place
I'm pretty sure it's because of the semicolon at the end
oh
C++ member functions do not have semicolons
at the end of their definitions
user1115652
17:53
ok, never mind now I don't manage to reproduce the warning anymore and the app runs...strange stuff...
user1115652
removed the ; to see if it compiles
18:10
@DeadMG Unfortunately they do have an optional semicolons. I don't know why.
because the semicolon could be parsed as an empty declaration?
logically
because it may be useful for code generation
No, it's explicitly pare of the grammar for a member function definition:
member-declaration:
function-definition ;opt
curious
@Abyx How? I just don't see how it helps.
It just allows inconsistency. grrr.
18:16
* source code generation
macros, etc
no, it's consistency, like in {1, 2,}
@Abyx How? I can't see a situation in which a generator might have to write out and extra semi-colon.
@Abyx That's a different situation, it's not like you can have more than one function body.
#define SOME_MEMBER void f() {...}
#define OTHER_MEMBER int x; string y
class Foo {
   SOME_MEMBER;
   OTHER_MEMBER;
};
string y is not a properly terminated declaration. The semi-colon should be put there.
it's macro
; is a terminator for (some) declarations and statements, it's not a separator like , in a parameter list.
@Abyx I'm open to be persuaded, but you haven't showed me anything that convinces me yet.
18:24
just believe that somewhere exists a code which requires this feature. (and probably this code uses preprocessor stuff)
also I believe there is a lot of legacy code with semicolons after member function definitions
#define OTHER_MEMBER int x; string y - you can find code like this in Lua source. (but there is no methods, because it's C)
@Abyx I'm not saying that it can't be changed now, I'm questioning why the decided to put it in the language in the first place. I still haven't seen any evidence that it was necessary or beneficial.
@Abyx Out of context, it doesn't help me. As it's C, it can't be used in a struct body in any case.
19:01
as if I needed another reason to believe that Lua sucked
I think Python source code has same stuff
19:13
@CharlesBailey The ; is right after OTHER_MEMBER in OTHER_MEMBER;.
Hi all
Ell
Ell
hi guys
:)
how does std::map allocate?
on the stack or heap? or does std::allocator decide?
in heap
Ell
Ell
@Abyx always?
how can it be on stack? it's just a structure with pointers to their nodes
Ell
Ell
19:24
but the values have to be default constructable
if i had std::map<string, Person>
and I went
mymap["Ell"]'
*;
it would have to default construct a Person object, so does it do it with heap or stack? or does allocator decide
@Ell it constructs the object on the Free Store.
do you really know what is heap and stack?
Ell
Ell
@rubenvb o.O is that the heap?
yes
:D
Ell
Ell
well I thought I did :p head memory is allocated by the operating system (correct me) and with stack memory, the frame pointer is just moved forward
is that right?
woaaha i just realised in win7 when you hover over a program task bar, its colour is decided by its icon
awesome!
19:29
sort of. if Person would be allocated on stack, it won't be exists out of frame (scope)
@LucDanton I know, my pointer was that, given the grammar for classes, it more naturally belongs in the OTHER_MEMBER and the list of macros in the class body should not be followed by ;.
Ell
Ell
@Abyx yeah I understand that
@CharlesBailey it's not so readable as with terminating ;
class Foo {
  SOME_MEMBER
  int z;
};
@Abyx Well, I don't like the use of macros at all, but I don't see why the use of macros is more or less readable with or without ;.
Ell
Ell
@CharlesBailey it is inconsistent
19:35
@Ell Inconsistent with what?
with z;
Ell
Ell
@CharlesBailey with most other of C++ as in, member declarations etc. they all end with a ; apart from SOME_MEMBER
@Ell Most member declarations have a type and a name and a ; or a function body. If you're using a macro (one word) to wrap up the type and name, it's already inconsistent with other declarations.
Why not make it internally consistent and wrap the complete declaration in the macro, not all of the declaration bar the semicolon. That is inconsistent.
Ell
Ell
well I dont know the situation but it appears to me that it would just look nicer with a trailing ;
@Ell I don't know the situation either, I am still not convinced it shows a situation that a trailing optional ; on inline function definitions is a helpful grammar artifact.
Ell
Ell
19:40
well my personal taste just says that it should have a trailing ; but really I'm just a c++ noob
@CharlesBailey, btw, you can ask it on SO - why there is optional ;
@Abyx I could do, but there are probably better places to ask.
well the optional trailing ; is just an empty statement.
nothing less
@rubenvb no.
1 hour ago, by Charles Bailey
No, it's explicitly pare of the grammar for a member function definition:
member-declaration:
function-definition ;opt
@Abyx IIRC Howard Hinnant has a stack-allocator for use with STL containers (i.e. also map)
19:44
well knock my pants off.
@rubenvb No, you're not allowed empty statements in a class definition.
@sehe like smallMap<N> ?
C++ is starting to reek more and more
Some text editors will indent improperly without the trailing ;
funkyalloc<std::pair<const K,V> > onstack(100);
std::map<K, V, funkyalloc<K,V> > stackmap(onstack);
@Abyx No, like
That is heavily pseudo code. Compilers will think it's bad. However, Hinnants page will show you proper usage
19:48
> typedef std::set<int, std::less<int>, stack_alloc<int, 100> > SmallSet;
@Abyx Actually, you're not so far off: his sample typedef a SmallVector<> much like you mentioned :)
#include "stack_alloc.h"
#include <vector>
typedef std::vector<int, stack_alloc<int, 100> > SmallVector;
Ell
Ell
does c++11 allow constructor inheritence?
@Ell What do you mean by constructor inheritance?
Ell
Ell
as in i can initialize B with one of As constructors
where B is a derived from A
@Ell I don't think so, C++11 gained constructor forwarding.
Ell
Ell
20:01
i dont why constructors aren't inherited?
how does a derived type share the interface of a supertype if it doesnt inherit the constructors?
@rubenvb are you the one who recommended me kate yesterday?
C++11 has using Base::Base;.
@Ell Actually, I was wrong. C++ has gained inheriting constructors.
Ell
Ell
hmm
It doesn't quite mean what I thought it meant, though.
20:05
@bamboon yes
Ell
Ell
basically I want to write a template class (CRTP) that just adds functions to the class
but thats not possible is it
@rubenvb it's very cool indeed, thanks
Ell
Ell
wait a minute, nevermind that wouldnt work either
@bamboon glad you like it.
Ell
Ell
20:30
are mixins possible in c++
?
sbi
sbi
20:47
10
Q: Why are template mixins in C++ not more of a mainstay?

Jesse PepperI use template mixins in C++ a lot, but I'm wondering why the technique isn't used more. It seems like the ultimate in reuse. This mix of power and efficiency is one of the reasons I really love C++ and can't see myself moving to a JIT language. This article: http://www.thinkbottomup.com.au/si...

Obviously, even strange forms of mixins, involving templates, are possible.
Ell
Ell
aahh thats exactly what I was looking for! thank you D
:D
and also why I asked about constructor inheritance :p
sbi
sbi
I seem to remember Stroustrup (in Design & Evolution?) explaining how his gang at Bell Labs got the idea to name those things "mixins" 30 years ago (from an ice cream shop), when C++ was still a mostly OO language. So, yes, pure OO mixins are possible, too.
Ell
Ell
pure oo mixins?
sbi
sbi
@Ell I think the term used to refer to a design style where you would "mix in", through multiple inheritance, classes implementing certain pure virtual functions of a common base class.
I would have had to dig out D&E, though, to be sure. It's long ago that I read this.
Ell
Ell
kk
have you got time for me to explain something I'm trying to achieve to you?

« first day (448 days earlier)      last day (4725 days later) »