« first day (233 days earlier)      last day (4731 days later) » 

sbi
3:01 PM
@Xeo make_function([]{return false})
 
Xeo
@sbi Inside the make_function, you need to define a std::function<???> object.. how? :(
 
@Xeo If you're dealing with closure objects only then analysing &T::operator() is the way to go
 
Xeo
@LucDanton Seems like it
 
sbi
@Xeo That's certainly possible by the same mechanism you would apply to get this out of the lambda's operator()().
 
Xeo
@sbi Yeah, the "how" was not really correct. I just wanted to imply that it is as tedious as taking apart the lambda itself. :)
@LucDanton I wish VC10 would support variadic templates...
I have partially specializing traits for the number of arguments only -.-
 
sbi
3:05 PM
@Xeo Yeah, it is tedious. That's why you usually would try to leverage an already existing implementation. :)
@Xeo, have a look at this.
 
Xeo
template<class MFPtr>
struct mfptr_result;

template<class C, class R, class... Args>
struct mfptr_result<R (C::*)(Args...)>{ typedef R type; }

typedef mfptr_result<decltype(&Lty::operator())>::type result_type;
Would be the totally cool version with variadic templates
for VC10 it is not. -.-"
 
sbi
@Xeo Variadic templates are cool. I have a version of that with 15 different specializations, for up to 15 arguments...
 
Xeo
@sbi Yeah, and I hate that :|
 
@Xeo Actually even then it's somewhat uncool because one has to deal with const, volatile, &, and && for a total of 16 specializations!
 
Xeo
3:09 PM
@LucDanton Urgh...
 
I still haven't read up on variadic templates. I guess I should do that soon
 
sbi
@LucDanton No, you don't. You can strip these off using other meta functions.
 
Xeo
Oh, right
 
Hah I just right that moment was planning to write that
 
Xeo
@sbi Like I recently learned: std::decay!!
 
sbi
3:11 PM
@Xeo Urgh. std::decay sounds foul.
3
 
Xeo
@sbi But it does the job
The standard says in a note that it is there to emulate pass-by-value conversions
Oh, that foul.
My bad.
 
Does Ret (Class::*)(Args...) & match T (Class::*) & the way a const function member matches T (Class::*) const though?
 
Xeo
should, yeah
 
sbi
@MartinhoFernandes More like this:
template< typename TFR
        , typename TPar1, typename TPar2, typename TPar3 >
struct func_type_to_arg_list_< TFR(*)(TPar1,TPar2,TPar3) > {
    typedef TFR                                 result_type;
    typedef TFuncResult(*func_type)(TPar1,TPar2,TPar3);
    typedef typename type_list_type< typename naked_type<TPar1>::TResult
                                   , typename naked_type<TPar2>::TResult
                                   , typename naked_type<TPar3>::TResult >::TResult
        argument_list_type;
 
Ugh, I guess my brain isn't yet wired to parse all this TMP stuff.
I can, but it requires some effort.
 
sbi
3:18 PM
Oh, now that I can't edit anymore, I see that my identifier substitution (to protect the innocent :)) was incomplete. However, you will get the idea.
This is a specialization of
 
@Xeo Well I can't test it. It appears that clang can deal with lvalue and rvalue *this but my 2.8 copy can't. I assume it's new for 2.9.
 
sbi
template< typename TFunc >
struct func_type_to_arg_list;
 
And I guess type_list_type, given no variadic templates, follows the same hundreds of specializations formula, right?
 
sbi
@MartinhoFernandes Actually not. It just has many arguments, all of which default to nil type, and there's some TMP black magic in there that strips off all trailing nil from the result.
 
Xeo
Sometimes, just because of variadic templates, I want to develop with gcc
 
3:28 PM
1
Q: mysterious linker error

lord.didgerI have written a simple program that use some classes and procol buffers. These classes are to make connecting and sending messages between computers easier. Compilation succeeded. However, linker says: server.o: In function `main': server.cpp:(.text+0x24): undefined reference to `da...

Why are linker errors always so seemingly "mysterious"?
 
Xeo
It's always the same, we need questions to close these off as duplicates..
 
It's always the same thing.
 
@Xeo: I find that Microsoft was right about variadic templates
 
Xeo
@MartinhoFernandes Because you can't double-click them in Visual Studio and get taken to the error. :)
 
they're great if you're developing a template library
but honestly, most of the rest of the time, they're just not that helpful
lambda functions (which at the time GCC did not have) are far more useful overall
 
3:33 PM
meh
 
one of the reasons that GCC now has a lot more C++0x features than MSVC is that simply put, MSVC releases much less often
I expect that MSVC11 will have a lot more in it
 
sbi
@Xeo Yep. No source file and line to look at. If you have symbols defined multiple times, you are on your own to find those definitions (or rather how they managed to end up in several TUs). If you have missing symbols, it's up to you to decode all the function decorations in order to tr out why they don't match. That's a PITA at the best of times.
@TonyTheTiger Still craving for tobacco? :)
@Xeo An FAQ entry that explains the compilation model of C++. Great idea! When will you do it?
12
 
@sbi oh yes, unfortunately :(
@sbi I would definitely read that
interesting pet combination
 
@DeadMG There are other factors in play, too. E.g. in the specific case of variadic templates IIRC there has been experimental support for it for quite some time already in GCC. However given the few things missing from both compilers I'm not expecting a lot more from anyone at this point.
 
MSVC is missing quite a bit
like variadic templates
constexpr, rvalue this, fixes for their lambdas and rvalue rules, library additions
although in my humble opinion, they could start by fixing their damn SFINAE support
 
3:41 PM
Hmm, what interesting scenarios does rvalue this enable?
 
no idea
btw @Xeo: I am totally a rep-whore, but don't require the odd accepted answer, up to 30.2k now
 
4:04 PM
hmmm
clang has rvalue-this
 
@JohannesSchaublitb do you know of any use for it?
Or what paper explains the rationale behind its inclusion?
 
whatever paper proposed it will give a reason for it's inclusion
 
I assume the rationale is that since a non-member can be overloaded for f(T&) and f(T const&) and now f(T&&), it's okay to overload members on && too. No idea if a scenario is given.
 
Ahah! Found it: N1821!
 
Xeo
Hm. In constrast to my expectation, the paper 1337 isn't all that special.
 
4:18 PM
No, really, why is <code> allowed in the posts, it's utterly broken, I can't be the only one to see that. :/
 
4:39 PM
@CatPlusPlus yeah, that always puzzled me as well
 
sbi
4:49 PM
@CatPlusPlus What do you mean "<code> is allowed"?
 
@sbi people sometimes use the <code> tag in SO answers to format their code
and it never works correctly, and it always ends up looking awful
they could just filter it out when you submit a question
 
sbi
@jalf Ah, so "it is allowed" means "I can type it, and it has an effect". (It could also mean "I can type it, and it shows as <code>.")
 
@sbi that's how I understood it, at least. And yes, you can type it and it has an effect
 
5:13 PM
Hey guys!
:)
 
hey
 
Does any of you use a mac?
 
no
 
I'm losing my mind. I can't play with the C++0x features of g++. 4.2 ftl. Tried installing 4.6 countless times, always broke something.
 
5:16 PM
As for <code>, just look at this: stackoverflow.com/revisions/…
It's just insane.
 
anyone got g++4.6 working with boost on os x 10.6?
 
@wilhelmtell Haven't tried, but g++4.6 fails to compile my code as well (which worked under 4.5)
I'm waiting for 4.6.1
 
@jalf it's beyond that. i'd be fine with the code, methinks. it's when i try to link against boost 1.46.1, say, libboost_program_options.dylib. i always get errors for bad architectures, or soemthing like that.
it shocks me there's no proper g++4.6 dmg to ease my pain.
 
Xeo
Ouch, this guy needs a good C++ book...
 
And a g++ manual.
 
5:30 PM
You don't need a g++ manual to know that it's not enough to just declare a function in order to call the function.
There are things that are compiler centric, like getting Boost to work with the latest gcc on a Mac. But this dude's case is not one of these. :p
 
Ah, nevermind. I was thinking about this crappy g++ behaviour of writing into file named a regardless of input filenames, but that's for linking.
 
ARGH HELP ME! I WANT THEM LATEST JEEPLUHSPLUHSES!
Oh on a related note: don't install g++ at /usr on a Mac. Or else have your OS X DVD ready for a re-install. God.
 
5:50 PM
god bless Windows
 
hi all
 
6:26 PM
i wonder what purpose paging serves
 
it serves the purpose of not having to waste physical RAM on memory that doesn't need to be there?
 
i mean, those "<- page N of M ->" below large lists
why can't it dynamically show content depending on what part of the data is being looked at
I'm always annoyed by those paging buttons
 
no idea
 
Xeo
Well, Google Images does that
 
6:38 PM
Graceful degradation.
Or at least, it should be this.
 
Xeo
Hell yeah, I'm wet to the bones.
 
@Xeo Been swimming in acid?
 
Xeo
@CatPlusPlus No, 5 minute march through pouring rain
 
sbi
@Xeo Well, while you did avoid any possibility for us to check on your sex, this is as good an indication as we are likely to get that at least you really live in Berlin. Looking out of my balcony door I see rain hammering down and have seen it for a long time.
 
@sbi: It could be raining in more than one place in the world at once
you know that, right? ;p
 
sbi
6:47 PM
@DeadMG Yes, but, as I said, it's "as good an indication as we are likely to get". (And, really, @all: At how many places participants in this chat room live in has it poured like hell during the last 60mins?)
 
Xeo
@sbi You can come check on my sex. S+U Jannowitzbruecke, Games Academy Berlin
 
sbi
@Xeo Why would I want to do that? It would bereave of a piece of fun we have here. :)
 
Xeo
lol
 
Yeah, we can't let facts get in the way of fun.
3
 
sbi
@Xeo: BTW, I did notice that you disappeared the moment I suggested you write that FAQ entry. (A suggestion that's now starred to the top of the starred messages.)
(Well, it was at the top until @CatPlusPlus cracked his bon mot anyway.)
 
6:54 PM
@wilhelmtell Mac, bad architecture, there you go :)
@sbi The rain was very intense in Hamburg.
 
sbi
@FredOverflow Thanbks for the feedback! That makes three out of 15 participants so far.
 
Sony is having a reaaally bad quarter. Their developer network source code leaked out.
 
Am I the first to notice the funny a, b = 0; line? :)
0
Q: If I delete a class, are it's member variables automatically deleted?

KeelxI have been researching, and nothing relevant has come up, so I came here. Trying to avoid memory leaks, so I am wondering: Say I have class MyClass with member ints a and b, and an int array c, which are filled in a member function: class MyClass() { public: int a, b; int[2...

 
Also int[2] c;.
 
user379888
Hi
 
7:09 PM
Ih.
 
user379888
If a object on stack is deleted, is the destructor called?
 
Yes, why wouldn't it be?
 
@JustAnotherProgrammer Can't use delete on an automatic variable.
 
@JustAnotherProgrammer What would you expect using delete on an object to do? Or do you mean when the object goes out of scope?
 
sbi
@ildjarn "object on stack"
@JustAnotherProgrammer You don't delete objects on the stack. They are destroyed automatically when execution leaves their scope.
 
7:12 PM
@sbi Not sure what that's intended to clarify
 
user379888
I was actually using a global count in ctor of class but my class uses an array on stack so I was wondering how to decrement the count
 
sbi
@ildjarn You don't use delete on an object on the stack.
 
I keep forgetting delete even exists.
4
 
@JustAnotherProgrammer I think you mean a member array here.
 
@sbi I'm aware of that, my question was intended to find out whether he does
 
user379888
7:14 PM
@LucDanton : member array? Sorry.
 
Global count sounds bad.
 
@JustAnotherProgrammer like so: struct C { int member[40]; }; ?
 
user379888
@CatPlusPlus @LucDanton :
class Rooms
{
protected:

int Floor;
string Room_Type;
public:
static int Room_No;
Rooms() //default ctor
{
Floor = 0;
Room_No ++;
Room_Type = "";
}//ok
};
 
user379888
and I have an array of this object
 
Ah; so your class isn't using an array. You are using an array of the class.
 
user379888
7:16 PM
@LucDanton yes.
 
sbi
@JustAnotherProgrammer Please put this into its own message and hit the "fixed font" button appearing when you paste multi-line code. (You might want to read the newbie hints linked boldly from the right.)
 
If array is automatic, all dtors will be called at the end of the scope.
Nothing special about that.
Except your counter might prove unreliable in case something gets copied.
 
user379888
@sbi: Where is the fixed font button?
 
user379888
class Rooms
{
protected:

int Floor;
string Room_Type;
public:
static int Room_No;
Rooms() //default ctor
{
Floor = 0;
Room_No ++;
Room_Type = "";
}//ok
};
 
user379888
got it :)
 
sbi
7:18 PM
@JustAnotherProgrammer "appearing when you paste multi-line code" besides the "send"...
 
Here, when you have multiline message. --->
 
sbi
Oh, you got it.
 
user379888
So how do I decrement this count ?
 
sbi
As the @Cat already noted, this misses a few things to make the counter correct. Most dearly it misses a copy constructor. Then it misses a destructor, in which the count is to be decremented.
 
user379888
I am not sure if a destructor can help me
 
user379888
7:20 PM
@sbi :no I just pasted a snippet of my long code.
 
sbi
@JustAnotherProgrammer Neither am I.
Why don't you tell us what you want to do, rather than presenting us failed attempts to do so?
 
user379888
@sbi: here is my terrible looking code :
https://ideone.com/SAjEz
I am trying to increment the Room_No whenever a room is booked and decrement it when a room is deleted.
 
user379888
Sorry to say but it has got too many bugs :(
 
@JustAnotherProgrammer That code lacks a copy constructor and sensibly-implemented destructor, just as sbi already said
 
user379888
@ildjarn: Why would a copy constructor be used here?
 
7:25 PM
Okaay, so maybe let's start with the assignment. What are you trying to write, exactly?
 
user379888
 
evening all
 
user379888
evening :)
 
> Use C++ features and NOT C features
 
user379888
Yes
 
7:26 PM
No kidding.
 
user379888
@CatPlusPlus: It meant that the approach should be like a C++ project
 
@JustAnotherProgrammer Well, since you're writing in C++, I'd think it's obvious that it should be C++. :P
Letters are against me today.
 
user379888
@CatPlusPlus: The last date is 10th June.. :( Please help me out
 
Well, I'd use only one class to represent user, for starters. You can implement permission level with a single field.
 
user379888
7:32 PM
@CatPlusPlus: How would I set access levels with just one class? Then all the users will anyhow get the same privelages
 
@JustAnotherProgrammer Just said how. :> Eh, I don't really have time to think about this.
 
sbi
@JustAnotherProgrammer Ugh. You're coming from Java?
 
I'm already torn between learning for test tomorrow (I always get this word wrong, every single damn time) and the Internet.
 
user379888
@sbi: C only
 
sbi
@JustAnotherProgrammer So why do you create classes for algorithms? Tthat's what functions are for.
2
 
user379888
7:36 PM
@CatPlusPlus: :'(
 
user379888
@sbi: Where did I used algorithms ? You mean the the empty classes? I tried to show up that polymorphism is there
 
sbi
Anyway, I don't think you'll find anyone here spending the time necessary to walk you through that assignment. (Nor do I consider this useful. The more this hurts, the more you will^Wcan learn from it.) But we might let a few scraps fall that would help you.
@JustAnotherProgrammer Well, GuestRoomBooking suspiciously looks like an action rather than an entity.
 
user379888
@sbi: Can you share a better class diagram ? :)
 
sbi
@JustAnotherProgrammer No, I cannot put an algorithm into a class diagram. This is what iw as trying to tell you.
 
user379888
@sbi: I still did not get that...
 
7:40 PM
Well, it shouldn't inherit from the room, that's for sure.
It doesn't make much sense "oh yeah, it's like a room, but it's a booking info".
I'd also think it's something better associated with a room itself, rather than floating somewhere on its own.
 
sbi
@JustAnotherProgrammer That "class" is two algorithms that operate on the same data. That's definitely not OO design, and, as the @Cat already noted, booking a room isn't a room. (And Is-A is the relationship modeled by public inheritance.)
 
user379888
@CatPlusPlus: If I make a function for booking, then where should the data of the class Booking be ?
 
sbi
@JustAnotherProgrammer Who calls those algorithms?
 
user379888
@sbi: which algorithms?
 
user379888
@sbi, @CatPlusPlus : Should I make booking a part of Room class?
 
sbi
7:46 PM
I'm, exasperated. I herewith officially give up on trying to talk about your assignment's design.
Just one more hint about the programming part: The proper way to write a class that counts its own instances is to A) increment the counter in all constructors, and B) decrement it in the destructor. The trick with A is to not to forget about copy construction, even though the compiler usually creates a copy constructor for you if you forget about copying.
 
user379888
@sbi: Why in "All constructors"? If the class is inheriting and I am calling my base class constructor from my derived class constructor, that would increase it more than once.
 
500
Q: The Definitive C++ Book Guide and List

grepsedawk This question has historical significance, but is not a good example of an appropriate question. Read and learn from this post, but please do not use it as evidence that you can ask similar questions. See the FAQ for more info. Provide QUALITY books and an approximate skill level. Add ...

 
@JustAnotherProgrammer He meant all constructors of the class, not all constructors of the hierarchy
 
user379888
I have bookmarked that page quite a times :)
 
A class typically has more than one constructor
 
user379888
7:50 PM
@LucDanton: thanks, I misunderstood that.
 
sbi
@JustAnotherProgrammer Unfortunately, bookmarking the book list page isn't a proper substitute for reading the books recommended on that page. :)
 
user379888
@sbi: I love reading quality books but the problem is that their standard and way of expressing is quite high and its hard to understand it.
 
@JustAnotherProgrammer Yes, C++ sets the bar quite high in terms of terminology
 
BTW, Thinking in C++ is made available online for free by the author, maybe we should link to it?
 
sbi
@CatPlusPlus Maybe we should. I wouldn't know, since I have never read it.
 
8:00 PM
I've never read any C++ book
is it obvious?
 
user379888
How do you clear the screen in C++,console ?
 
C++ doesn't provide a way
maybe your platform does
 
user379888
@DeadMG: I just have one more way left i.e to use cout << endl; 50 times
 
why do you even need to do this?
the C++ console isn't designed for anything more advanced than outputting text and maybe receiving a couple inputs
 
user379888
In a console application, like a management system, the user must be provided clear menu screens
 
8:07 PM
sure, but you'd be much better off using a library or another language/framework and make a GUI app out of it
that kind of console application hasn't been written for fifteen years
 
@JustAnotherProgrammer, if you are doing such a thing, you use a library such curses which provide the needed facilities.
 
and the only compilers that provide the functions you'd want haven't been updated for fifteen years- sometimes more
 
@JustAnotherProgrammer you can call shell commands using the system function. I think on Windows calling system("cls"); will clear the screen.
 
user379888
@StackedCrooked: Yes that worked , Thanks
 
besides, you could always look at your favourite platform's API
 
8:08 PM
@StackedCrooked That's ugly.
 
@JustAnotherProgrammer that was fast :)
 
user379888
:p
 
very ugly
 
Ugliness gets the job done :)
 
8:09 PM
heh
I have in my current project a function called LogText
it displays it via MessageBox()
 
With Console API under Windows (that's Python, but it's easily translatable to C++):
    topLeft = ctypes.wintypes._COORD(0, 0)
    console = ctypes.windll.kernel32.GetStdHandle(ctypes.wintypes.DWORD(-11))
    buffer  = CONSOLE_SCREEN_BUFFER_INFO()
    written = ctypes.wintypes.DWORD()

    ctypes.windll.kernel32.GetConsoleScreenBufferInfo(console, ctypes.byref(buffer))
    ctypes.windll.kernel32.FillConsoleOutputCharacterA(
        console, ctypes.c_char(' '), buffer.dwSize.X * buffer.dwSize.Y,
        topLeft, ctypes.byref(written)
    )
    ctypes.windll.kernel32.GetConsoleScreenBufferInfo(console, ctypes.byref(buffer))
 
user379888
I would like to know why is everyone trying to write beautiful code here and not just getting the job done ?
 
@JustAnotherProgrammer, often terminal emulator accept constrol sequence compatible with VT100 (see termsys.demon.co.uk/vtansi.htm for a list) which would give you std::cout << "0x1B""[2J"
 
Because the job is never done.
 
well, once anything unexpected happens, ever, which is rather common, then just getting the job done won't help you
 
8:11 PM
@JustAnotherProgrammer I find that writing ugly code is very demotivating.
 
@JustAnotherProgrammer Why are the two unrelated?
 
Ugly code bites.
 
dependencies on a platform, if you have to make them, should at least be explicit
if you get a Windows API function and try to build for Linux, your compiler will error out
but if you do a shell command via system() that won't work on Linux, then GCC will happily accept it
 
system does way too much work for a simple task like that. And it's mostly useless.
 
Sorry, "\x1B""[2J".
 
user379888
8:12 PM
@AProgrammer: Ahh
 
Perhaps there we need a boost::console library or something.
 
user379888
that reminds me when I first learned C, I was wondering how does that clear the screen
 
user379888
 
@StackedCrooked: The console sees so little use now for anything beyond trivial programs/interaction, I'd see little value
 
Console is not that useful.
 
8:14 PM
Well, if it could clear the screen that would be something already.
 
Boost.ClearConsole.
The most useful Boost library to date. :P
 
Also boost::console::set_cur_pos(int line, int column);
boost::console::put(int line, int column, char_t c);
Stuff like that.
 
What you want is some C++ wrapper around curses.
 
user379888
What apps do you all built today using C++? I am trying to move towards C# and ASP for webdevelopment, I think desktop apps are going dead...
 
Because the original API is abysmal.
 
8:16 PM
@CatPlusPlus yep
@JustAnotherProgrammer Server-side stuff where scripting languages aren't performant enough. iPhone.
 
Well, I do hope desktop apps won't be dead as long as I live.
I refuse to webify everything.
 
@CatPlusPlus They won't die soon.
 
Also, games.
Quite a lot of them are written in C++.
 
@JustAnotherProgrammer CAD tool. Not sure making a web app out of something in the 40 million lines of code range will flight.
 
@StackedCrooked Do you want me to start nitpicking on the term 'scripting language'? :P
 
8:21 PM
@Cat, scripting languages is now more or less synonymous with interpreted language and rapidly becoming a synonymous of programming language.
I blame perl. Easy target.
 
o_O
 
why are we talking about C++?
 
@AProgrammer Yeah, but it doesn't make sense. Any language can be shoehorned into scripting.
And whether language is compiled or interpreted (not that there is much difference in most cases) is not a property of a language itself.
 
@Cat, I can't say I understand why, and I surely don't it.
 
I always blame Java, it's the easiest target.
;)
 
8:23 PM
@CatPlusPlus Agree. That's one more point against that.
@CatPlusPlus But I fear it wasn't involved here. Perl is the first language which extended scripting outside the meaning I find natural. TCL is the second one.
 
@AProgrammer It's a joke. :P
 
@CatPlusPlus Never assume I'm serious, even when I look like so, its dangerous ;)
I could even argue in favor of Perl.
When I'm drunk.
 
@AProgrammer You crazy man.
 
the reason that C++ will never go away is because everybody needs a language to write their CLR, JVM, interpreters in
let alone the high-performance market
 
Yeah, not really. C++ won't go away because there is a lot of code in C++ and a lot of people who have no desire to rewrite that code.
 
8:28 PM
@CatPlusPlus What's your language of choice for systems programming that's not C then?
 
@CatPlusPlus and lot of people who desire to rewrite that code but will never get the funding.
@LucDanton Ada. Then a subset of C++.
 
holy shit, my graphics driver is a buggy piece of crap
ever since I updated it it's been crashing multiple times a minute in Visual Studio
 
@LucDanton C++? I'm not touching C with a ten-metre stick, in any case.
I think I enjoy programming in Python the most.
 
sbi
Wow. The @Cat and I own the starred message column. :)
 
8:38 PM
@sbi And everything is right with the world.
 
sbi
@CatPlusPlus LOL!
 
ugh
I hate formal specifications
 
user379888
lol
 
"By the end of this module, you should be able to give the formal specification of a grammar."
uh- the set of rules that define the syntax of a language? seems pretty accurate to me
 
BNF notation.
 
user379888
8:42 PM
Can anyone help me out with it,
string designation;
string password;
cout << "Enter Your Designation(First Alphabets Capital):" << endl;
cin >> designation;
cout << "Enter Your Password:" << endl;
cin >> password;
if((designation == "admin") && (password == admin))

Compiler Error:c:\documents and settings\fahad\my documents\visual studio 2008\projects\system\system\system.cpp(35) : error C2678: binary '==' : no operator found which takes a left-hand operand of type 'std::string' (or there is no acceptable conversion)
 
Have you included <string>?
 
the second part of the if is wrong
 
What is admin?
 
user379888
@CatPlusPlus :Sorry, no
 
It's a member variable IIRC, and it was string too.
 
8:43 PM
you've got (designation == "admin") && (password == admin), instead of (password == "admin"), which I'm guessing from the context was intended
 
user379888
@DeadMG @LucDanton: admin is a string storing password which is "admin"
 
Are you sure it's in scope? From your snippet it's the one thing we can't verify for you
 
It wouldn't complain about the operator if it weren't.
 
user379888
@LucDanton: Sorry it was too silly, as Cat pointed out did not included string header
 
Will C++ ever get rid of header files?
 
8:47 PM
@FredOverflow I don't see how it could while remaining C++
 
@FredOverflow Well, they contemplated modules, so there is hope.
But given it'll be next N years until the next standard, maybe something else will come up in the meantime.
 
@CatPlusPlus I think it's more of dynamic loading thing though.
 
Ew, import
 
Exactly
 
9:00 PM
@ildjarn Don't let shortcomings of how import is implemented in some other languages make you think that anything/everything else using the same keyword is equally flawed. In Modula (where, I believe, it originated) import was really pretty clean.
 
@JerryCoffin Oh, to be clear I didn't read the overall proposal, just the syntax :-P
 
@ildjarn IMO, the overall proposal is well worth reading. It was never really finished, (and obviously not accepted) but (IMO) it's worth reading if only to prompt some thinking about what you'd ideally like in the way of modules, what should be hidden, what public, etc.
 
I do't think it'll be that long before the next Standard
it'll have a lot less to do
 
@DeadMG Depends how much of TR2 it tries to incorporate
 
I don't even know what's in TR2
but I expect that C++11's successor will be mostly DRs, and maybe a couple of things that weren't fully ready for C++11 like maybe concepts/modules
 
9:08 PM
Filesystem's a big one
and supposedly ASIO is going into it
 
oh, library inclusions are nothing
talking about language features here
 
Getting the standardese finalized for libraries that big is quite time-consuming
 
@DeadMG I'd be willing to bet somebody said almost exactly that about C++11 too though...
My money is on "no sooner than 2020" If they hit that, maybe they can get an interview with Barbara Walters. :-)
 
@JerryCoffin: Somebody, but probably not me
we already had that Standard- C++03
which was mostly just DRs
 
@DeadMG Well, yes, and I suppose another "interim" standard like that could happen this time as well. If it does, yes, it'll probably be a fair amount faster (but I barely think of things like that as "new standards", even if the ISO says they are officially).
 
9:18 PM
well
 
From my viewpoint, that's just prior standard + Technical Corrigenda + (possibly) a few other bits and pieces.
 
I was hoping for more than that in C++11's successor
but it certainly doesn't need to be C++03 vs C++11
 
I think for most practical purposes, TR2 will be the real successor. The only challenge is getting people to accept and use that. That mostly didn't happen with TR1, but perhaps the fact that nearly all of TR1 is now in C++11 will change people's perceptions a bit.
 
honestly, C++11 was never about the libraries, it was about the new language features
variadic templates, rvalue references
a TR
won't be enough
 
Does any know what "impertinent lout" means?
 
9:28 PM
impertinent is irrelevant
 
I always find myself grasping to the dictionary when reading English fiction.
 
and lout is some old insult the exact meaning of which I forgot long aog
ago
 
impertinent: "not showing proper respect; rude : an impertinent question."
lout: an uncouth or aggressive man or boy : drunken louts.
Ok, now I can go on reading :)
@DeadMG btw you were correct, impertinent can also mean irrelevant
 
Lol someone flagged an image of a dinosaur.
 
 
2 hours later…
11:17 PM
don't remember what question it was, but it tickled my iostreams/locales muscle and now i feel like reading a good book on iostreams and locales. any suggestion? from google it seems like there's roughly one book about this subject out there.
 
@wilhelmtell If you're referring to the Langer book, then yes, that is the only book worth reading on the subject
 

« first day (233 days earlier)      last day (4731 days later) »