« first day (669 days earlier)      last day (4279 days later) » 

5:00 AM
Features for the programmers. There's always some annoying thing missing or messed up.
 
Qt is pretty bad. Lots of places where the user must surround a certain action with something like beginTransaction() and endTransation(). As if they have never heard RAII.
beginPaint(); ... ; endPaint(); etc..
 
Hmm, I missed that in my list of gripes with C++ libraries.
Actually I think most of them can be reduced to simply "not getting the language".
That seems quite common actually :(
 
C++ is designed to be multiparadigm. So there's no one true way to write C++. Whether that justifies those library's design choices... I don't know :D
 
Manually ending transactions smacks a lot of C.
 
@StackedCrooked There's not necessarily one right way to do it -- but there are some ways that are pretty clearly wrong, not just following a different paradigm.
 
5:15 AM
With lambda we could use the "execute-around" idiom (from other programming language) to abstract away the RAII: mutex.lock([&](){ ... }); instead of { scoped_lock lock(mutex); ... }
 
@StackedCrooked That's what my locker_box class provides as an alternative to abusing ranged-for.
 
I wonder if that will become common in the next decade.
@R.MartinhoFernandes Should have a look at that box then.
 
@R.MartinhoFernandes Looks good.
 
` cookie<Box> end() { return {}; }` Huh? This return {} means default construction?
 
5:18 AM
Yeah.
 
Cool.
 
Wait, is the room still in gallery mode?
Someone is requesting permission.
 
What does WHEELS_UNREACHABLE; do?
 
@R.MartinhoFernandes I think so :)
 
@StackedCrooked It's because GCC and clang can't see that the loop will always be entered, so they think the function doesn't always return and so warn about it. It is __builtin_unreachable() on those two compilers. Serves to tell them that I know the code won't reach that point.
 
5:21 AM
@R.MartinhoFernandes Must be. It's not letting me post (this message is a figment of your imagination).
 
I prefer making those things macros, just in case I ever get that code to compile on MSVC. (yeah, right...)
 
Macros are the right choice here.
Pity that you can't solve all problems with standard c++.
 
@StackedCrooked That macro defaults to throw "unreachable code reached"; which also works fine to solve the problem and is standard.
 
But has likely a measurable impact on performance :)
 
Why? It's never reached.
Exceptions have near-zero (or really zero?) cost on the success path.
 
5:25 AM
Hm.. I should withdraw until I can show proof.
Fact that exception can be thrown requires the compiler to generate extra code in some situations. You may be right that this is not the case here.
 
How exactly are exceptions implemented anyway? Is it just a second return value that checks to see if something has been thrown, then branches to run cleanup code and pass it further up?
 
That's an advanced question. I have no clue tbh.
I believe CFront couldn't do exceptions.
 
@Mysticial No, there's quite a bunch of crap in there. GCC's implementation (I think it's dictated by the Itanium ABI or something) involves manually walking stack frames.
 
That's why real C++ compilers became necessary.
 
@R.MartinhoFernandes Woah... and destructors are run at each stage?
 
5:28 AM
Yeah, that's deterministic destruction for ya.
 
@Mysticial Yes, but code for that exists on the success path as well, so it doesn't really make a difference on the performance.
 
I remember Alexandrescu had some sort of library for transactions and rollbacks that builds nicely on this principle.
 
So I suppose branching from a second return value is a valid way to do it. But it hurts performance in the usual case. So they walk the stack instead when there is an exception.
 
I guess all the code the success path needs is updating a pointer to the stack.
@Mysticial Yeah.
 
Man, I don't even wanna know how they keep track of what destructors to run when walking the stack.
 
5:32 AM
Exception mechanism is designed to be fast if no exceptions are thrown. There is a significant cost attached to throwing and catching them.
 
Yeah, it is messy.
libunwind implements the stack-walking part, IIRC.
 
Ah, can that library be used to print the current stack trace? I.e. for debugging purposes?
 
Cool!
This may change my life.
 
5:35 AM
introspection
 
Eventually I need to implement a sort of checkpointing that requires me to essentially preserve the state of the program and be able to reload it on a different run. That requires that I manually keep track of the call-stack along with all the variables that need to be preserved.
 
> The libunwind API makes it trivial for debuggers to generate the call-chain (backtrace) of the threads in a running program.
@Mysticial Woah, how do you restore a call stack?
Well, I guess doing it in asm would be trivial.
 
@R.MartinhoFernandes I haven't implemented it yet, but pretty much every function will need to be modified to be able to jump to any subcall. So I'll probably doing it with switch statements.
The overhead is negligible. Each "variable" is a swapfile that will be gigabytes large.
 
@Mysticial Oh, I've seen a similar technique to get some sort of co-routines in C.
 
This is obviously for that Pi program.
The current release version only checkpoints at the iterative part of the algorithm. But it can't checkpoint the recursive parts.
I'll be attempting to checkpoint the recursive points as well.
 
5:39 AM
@R.MartinhoFernandes I think it's safe to say that no way of doing it will be entirely trivial. At least on Windows, however, GetThreadContext and SetThreadContext would probably be the most obvious starting point.
As far as libunwind goes, at least for Windows it sounds to me like a library is rather overkill (and, of course, a C interface almost guaranteed to be excessively clumsy to work with).
 
@JerryCoffin Well, it's what GCC uses.
And it's quite small actually.
 
What of these do I need to use C++11 features: -std=c++0x OR -std=c++11 ?
 
In GCC 4.7, both work. In previous versions only the former.
And yes, they're the same.
In clang I think both work too.
 
@R.MartinhoFernandes Thanks very much
 
@R.MartinhoFernandes It should be. The program I linked does stack tracing and includes demo code driving it both for an exception and otherwise, all in ~250 lines of code (nearly all of which is pretty easy to use where needed, though I should do a bit more to decouple the data display from data collection).
 
5:48 AM
posted on August 15, 2012 by R. Martinho Fernandes

Ownership In C++ the destructors of objects with automatic storage duration are invoked whenever their scope ends. In C++ this property is often used to handle cleanup of resources automatically in a pattern known as Resource Acquisition Is Initialisation (RAII). An essential part of RAII is the concept of resource ownership: the object responsible for cleaning up a resource in its destruct

 
Facepalm...
0
Q: Sizeof next byte in byte array

user9000So I got an unsigned char and I add integers to it but I want to get the sizeof next byte (i.e sizeof unsigned short int or unsigned int and so on) The following code demonstrates what I want: #include <stdio.h> int main() { unsigned char b[2]; unsigned int v0; /* 4 */ ...

 
@R.MartinhoFernandes What are the other two? Venus and Jupiter?
 
Hi
@Mysticial did you change your profile pic?
 
@LuchianGrigore Yeah
 
6:02 AM
@R.MartinhoFernandes oh, that's my picture of me with Megan Fox
 
morning :)
 
@Mysticial Don't really know. I can identify the planets on an Earth sky, but Mars is a complete unknown to me ;)
 
@R.MartinhoFernandes Finally!
 
@ManofOneWay :)
 
@Nils Hey, somebody finally got it right, even for my time zone. It's been morning for all of three minutes here...
 
6:04 AM
@ManofOneWay Do let me know what you think once you're done reading.
 
@R.MartinhoFernandes Looking at the current planetary positions, Jupiter, Venus and Earth are indeed in conjunction right now from Mars. But the Suns is very close to it - which I don't see in that picture.
 
Where do you live @JerryCoffin?
 
@Nils Colorado, USA.
 
@Mysticial Oh, I also don't know the date of that photo.
 
Actually, now that I take a closer look at it, none of them can be Jupiter. Jupiter and Mars are almost at exact opposite sides of the sun right now.
@R.MartinhoFernandes Oh... It's not from Curiosity?
 
6:06 AM
lol
 
Don't know :S
 
it's 8 am here (Switzerland)
 
@Nils Ah, good morning.
 
@R.MartinhoFernandes Yes I will =) I'll read it tonight when I get back from work
 
From Earth, Jupiter is very easy to recognize: it's the third brightest object in the night sky, after the Sun and the Moon.
Wait, that's silly. There is no Sun in the night sky :S
 
6:10 AM
Where did you get that picture?
 
This makes the earth feel very small. http://fb.me/FZxWbo1l
 
@R.MartinhoFernandes And a good thing too -- if it weren't true my weather predictions wouldn't be nearly as accurate (in case you're wondering, my prediction is: "Weather tonight: dark. Continued dark until morning").
 
@JerryCoffin lol
 
says it's fake
 
@Mysticial Ah lol.
 
6:12 AM
But it is physically possible for that to be real.
 
I did find it strange that you could see all three bodies so clearly. You can barely see Mercury from Earth, and only during brief windows of time.
 
I'm not sure about the relative brightness of Venus and Jupiter though.
Venus definitely wouldn't be that much brighter than Jupiter from Mars.
 
Jupiter is orders of magnitude brighter.
 
From Earth, Venus is MUCH brighter than Jupiter except during conjunctions with the Sun.
Back in March, every night I went to get dinner, I'd walk west to town.
And I'd see these two bright stars in front of me.
Turned out to be Jupiter and Venus.
I kinda followed both of them, until Jupiter went behind the sun, and followed Venus through the transit day.
 
6:17 AM
@R.MartinhoFernandes I'm not sure that's true. Jupiter is (obviously) much larger, but Venus has an extremely high albedo (i.e., it's extremely reflective).
 
Venus is also a lot closer than Jupiter.
 
Point 3 is great "Zuck is too involved."
 
@JerryCoffin Mars is a lot closer to Jupiter than the Earth.
 
@R.MartinhoFernandes wrong
 
6:18 AM
Just pull out any scale map.
Click on "Explore the Solar System".
Then zoom out a bit.
 
I wonder how long this guy keeps his job at fb.
 
Mars is at 1.5 AUs from the Sun.
That's a lot.
 
Zoom with the mouse roller thingy.
Kinda wish there was a way to turn off all the space probes when I don't want to see them.
 
@R.MartinhoFernandes It depends (heavily) on where the planets are in their orbits. At their closest approach, Jupiter is somewhat closer to Mars than it ever gets to Earth. On the other hand, the greatest distance between them is actually greater than between Earth and Jupiter. The average should be about the same.
 
@JerryCoffin Really? Jupiter is 5 AU. Ignoring eccentricity, closest approach between Earth and Jupiter is 4 AU. Furthest distance between Earth and Mars is 1 + 1.5 = 2.5 AU.
 
6:24 AM
I wonder if this blog post is part of FB's strategy to attract new talent..
 
@Nils Could/should be pretty effective for that.
@Mysticial Ignoring eccentricity, Jupiter's distance from Mars is 5-1.5 AU at the closest, and 5+1.5 at the farthest. Average = 5. From Earth, it's 5-1 at the closest and 5+1 at the farthest. Average = 5.
 
You can't observe Jupiter in the Sky when it's behind the Sun, that's irrelevant.
 
@R.MartinhoFernandes The relative orbital inclinations between Earth and Jupiter aren't high enough to see Jupiter when it's behind the sun.
 
The Sun would blind you anyway.
 
For Venus, I think it is high enough to see Venus at some inferior conjunctions.
(excluding a transit)
*with the right equipment anyways
 
6:38 AM
@Mysticial Venus can be seen quite high. It's a commonly reported UFO for that.
 
@R.MartinhoFernandes yeah, and it's ridiculously bright...
I remembering seeing it in broad daylight before sunset during the two months before transit.
 
@R.MartinhoFernandes yes, but that's only a tiny part of its orbit.
 
I knew these comments I was reading were strange: "I've read some articles about this but no one explains as your what was the thing so thanks for this great information." WTF? Then I saw the poster's name... "viagra review".
 
7:03 AM
3
A: Trouble with constant objects and functions

Lwin Htoo KoYou need a default constructor.

This is wrong, right?
And it's getting upvoted for no reason...
 
@LuchianGrigore You don't need a default ctor, but if you include a default ctor that initializes any const members, then you can define an object of that type without specifying any other initialization.
 
@JerryCoffin I know but the answer is misleading IMO.
The other answer is also wrong.
Herd upvoting
 
@LuchianGrigore Right -- just confirming what I'm pretty sure you already knew/know.
 
6 hours ago, by Cheers and hth. - Alf
how can the latter fail?
@Cheersandhth.-Alf How can the ladder fall? ;)
 
That's what I said :D
 
7:12 AM
@LuchianGrigore Oh, right! :-)
Well, it's 0115 here -- I think I need to go get some rest. G'night all.
 
never read online text early in morning
 
gnight!
 
by the way, it's time for some great new UFO story
 
Unified Function Object?
 
hm, dunno, sorry
SNUFO - Situation Normal .... ?
 
Xeo
7:23 AM
@R.MartinhoFernandes your post isn't accessible, is that intentional? It's going to be hard to check it that way :P
 
@R.MartinhoFernandes what you do? start talking about blue tits?
@R.MartinhoFernandes 404
 
blue tits have nothing on blue waffles
 
@LuchianGrigore don't taint them for them
 
Xeo
@StackedCrooked Why would you want them at class scope?
 
Interesting
You pronounce std::string as [es tee dee string]. So is it "a std::string" or "an std::string" ?
It's "a", right?
 
7:36 AM
yes
 
Xeo
@LuchianGrigore If you pronounce it as "es tee dee", it's "an". If you pronounce it as "stud", it's "a"
 
@Xeo Seemed less intrusive than namespace scope. I guess I was in a nit-picky mood.
 
Xeo
I got that habbit from STL :(
 
@Xeo who pronounces it stud? :|
 
The habbit, by Xeo.
:P
 
7:38 AM
@LuchianGrigore you say this like it is a set rule
 
Xeo
@LuchianGrigore basically, just pronounce it like "std" is a word
@LuchianGrigore and it's a [u] sound, not an [a] sound
hmm
 
@LuchianGrigore I came here to check that as well :)
 
Xeo
Maybe "stood" would be a better approximation, but with a short "oo"
 
I always say 'standard', it's not like when I see 'management' abbrevieated to 'mgnt' I say 'mmg-nut'
@Xeo Indeed it would
 
@Default heh funny meeting you here
 
7:40 AM
I still sounds stupid as hell if you ask me
 
Xeo
@thecoshman but but "standard" is so long!
 
I think I pronounce it [es tee dee] since it's easier to say than "standard"
 
I hate it when I accept an answer. Now my rep's gonna end in 2 or 7...
 
@Xeo that's what she said!
 
Xeo
Where did that question come from anyways?
 
7:42 AM
@Default how is three syllables easier to say then two?
 
rings better with "[..]ee string" than "standar d string"
 
Xeo
@StackedCrooked Least-intrusive is at function scope with using namespact std::placeholders; or using std::placeholders::_1; :P
 
@Default I guess... but what about all the other standard classes?
 
std::vector - same thing
 
standard vector
 
7:43 AM
@Xeo Since I was using it in derived classes, it was handy because I only needed to type _1 there.
 
I guess "standard algorithm" works better than "std algorithm"..
@thecoshman stdeee vector :)
 
@LuchianGrigore stud shared putter!
 
Xeo
@FredOverflow "stood"
 
'stood pooter' ¬_¬ the worst ever
 
Na, I like studs better.
 
Xeo
7:45 AM
@thecoshman "putter", not "pooter"
 
Xeo
@LuchianGrigore Wat, never saw a video by STL?
 
@Xeo did you see 'STL' in those vids?
 
@LuchianGrigore Here is his video about shared_ptr.
 
Xeo
7:46 AM
@thecoshman ?
@LuchianGrigore Do it
 
@Xeo some MS guy who's initials are (are kid you not) STL talking about template stuff, 'stood pooter' is said A LOT
 
Xeo
@thecoshman I know STL, but he says "putter", not "pooter"
 
@Xeo i am sure he was saying 'poo-ter'
 
Xeo
@thecoshman Watch the vid linked by FredO
 
7:48 AM
@thecoshman If you listen at 0.6 speed.
 
@thecoshman That's disgusting!
 
What's next. A shit?
 
wth, I have to install silverlight to watch that video?
 
No. Various formats are supported.
 
And it's 42 minutes long.
........
 
7:50 AM
@LuchianGrigore Speed up the playback.
 
Xeo
@LuchianGrigore Those are well-spent 42 mins
 
@LuchianGrigore stupid link then, I watched a flash version of it I was sure
 
To be honest, I have never managed to keep my attention for a full STL video.
 
@Xeo I bet it is, but it's 1 AM here and I go to work tomorrow....
 
Xeo
@StackedCrooked Not even for the code C++ vids?
 
7:51 AM
At some point I'm always lost.
 
meh
bookmarked
 
Xeo
For the others I can kinda understand, since most of us here should know most of that stuff
@thecoshman I don't think it supports Flash
HTML5 or Silverlight, but no Flash
Or you can just right-click the files listed to the right and "save as"
 
I'll definitely watch it. The guy wears glasses, he definitely knows what's he's talking about. If he was Asian, I'd watch it right now...
 
@Xeo Even those. The thing is that, in the beginning of the video, I know most of it already so I start to doze off. Then I realized that he started on something interesting and I need to scroll back.
 
Xeo
@LuchianGrigore He's half-asian, IIRC
 
7:53 AM
OOOO and he's using MSVS. Awesome!
 
@LuchianGrigore he is a MS guy...
 
Xeo
@LuchianGrigore Well.. he works for MS
But he explicitly says that he's normally living in the command line :P
@LuchianGrigore Also, that guy is the maintainer and developer of MSVC's standard library implementation, working together with whowasitagain
 
@LuchianGrigore ಠ_ಠ
 
@LuchianGrigore I don't find this remotely funny.
@LuchianGrigore Just download the MP4.
 
7:59 AM
:)) I can watch it
I mean it's working
just not now
and I was just saying he's awesome
I mean, "maintainer and developer of MSVC's standard library implementation"
 
#def tainer int
auto main() -> tainer;
 
@FredOverflow ?
 
auto main() -> int; is the same as int main();
 
Xeo
@FredOverflow I don't think it's required to be accepted, though
ah, wait, they reformulated that part
 
@FredOverflow where would you tack on the actual {} part?
 
8:02 AM
@thecoshman Just replace the semicolon with the braces. Declaration vs. definition, you know?
 
@FredOverflow ah, such obscure formatting confused me
 
By the way, I don't like keyword reuse. Back in the days, auto meant "automatic storage". Now it either means "dear compiler, would you please deduce the type for me" or "dear compiler, I can't tell you the return type right here, but I will tell you at the end of the line". auto is almost as bad as static :)
 
Xeo
@FredOverflow And C++ doesn't like introducing new keywords :P
 
auto main() -> int
{
    std::cout << "hello world\n";
}
@thecoshman better? ;)
 
@FredOverflow indeed
 
8:05 AM
What about override or sealed?
 
Xeo
@LuchianGrigore final
contextual keywords
 
Aren't those contextual keywords?
 
Xeo
They only work in certain places
 
Lemme just google that...
 
So you can still name your variables final if you want to.
 
Xeo
8:05 AM
struct X final { ... }; and struct X{ void f() final; };
 
Ok got it ;)
 
Xeo
anywhere else, they don't mean anything
 
my work on kyrostat has been stuck for ages on two main problems. One, I am lazy. Two, I can't decide how/where I want the platform detection to work, either ppm or build scripts
 
I still don't know much about C++11
And by much I mean anything
but I'd rather start learning cloud development than C++11
 
I like the idea of the platform detection for the compilation to be done as part of the code it self... but equally '#ifdef win etc is just ugly ass shit
 
Xeo
8:07 AM
@LuchianGrigore Follow the C++11 tag on SO and you'll learn a lot.
 
Yeah I know, that's how I learned C++ :)
But I'd rather start focusing on concepts rather than languages
& cloud seems like the next big thing
 
hah!
 
@LuchianGrigore Make sure to learn the HTTP protocol :P
 
'cloud' is just idea's from the 60's finally able to work like we want them
it's nothing new or clever
 
I hadn't heard that one before ...
:P
 
8:11 AM
C++ is based on Turing's ideas in principle, doesn't mean we shouldn't learn C++....
 
A computer terminal is an electronic or electromechanical hardware device that is used for entering data into, and displaying data from, a computer or a computing system. Early terminals were inexpensive devices but very slow compared to punched cards or paper tape for input, but as the technology improved and video displays were introduced, terminals pushed these older forms of interaction from the industry. A related development was timesharing systems, which evolved in parallel and made up for any inefficiencies of the user's typing ability with the ability to support multiple users on ...
 
Is assembly like lisp in that you can take data and run it as code? I.e. "eval".
Pro-top: the mid-quality videos require less cpu when playing at higher speeds.
 
@StackedCrooked ¬_¬ but there is high quality?
 
Yes, "High Quality MP4" and "High Quality WMV".
 
8:25 AM
huh, make_shared is preferred over shared_ptr
 
Xeo
yes
 
Yeah. Better cache locality. And other reasons that I forgot.
 
Xeo
exception safety
 
Right.
 
Xeo
And it's less about the cache locality, but more about less allocation (which plays together, obviously)
 
8:27 AM
Morning
 
8:42 AM
oh, that trick with 'any shared_ptr counts as one weak_ptr' is rather smart :D
 
Xeo
2
A: Can you generate a variadic template pack from a size and its content?

XeoWith a bit of TMP, this isn't that hard after all: template<class T, unsigned ToGo, T Arg, template<T...> class Target, T... Args> struct generate_pack : generate_pack<T,ToGo-1,Arg,Target,Args...,Arg> { }; template<class T, T Arg, template<T...> class Target, T... A...

Finally a bit of template wankery again
feels good.
Though I could probably clean that up a bit more..
 
I've not done enough with variacs to give a proper opinion on it :P
std::iota is an odd function to include in the standard
 
Xeo
@thecoshman Why?
 
8:57 AM
@Xeo well, is looping from one iterator to a next, assigning an ever increasing value really something to provide as a standard feature? it also has an odd name... where does it come from?
 
@thecoshman ¯\(°_o)/¯
 
Xeo
@thecoshman iota is a Greek letter IIRC
 
"iota" means "a very small value" so I really don't see how it's related
 
@kbok my thoughts exactly :P
 
@thecoshman so I totally agree with you that it's very strange ideed
 
8:59 AM
@kbok oh yeah, I didn't read it as a word... 'eye oh tea aye'? wtf?
 
@thecoshman tea eye what ?
 
Xeo
@thecoshman It is a word
3
Q: What does iota of std::iota stand for?

Jesse GoodI'm assuming the "i" is increment and the "a" is assign, but I could not figure out or find the answer. Also, it looks very similar to the non-standard itoa which I think is confusing.

 
@Xeo I know, I just didn't read it as a word :P
for_each the example with that Sum struct is madness!
there we go
 
Xeo
@thecoshman wat?
 
it use a for_each that calls 'Sum()', Sum being a struct that has an operator()(int) that adds the int to a static with in sum
Sum s = std::for_each(nums.begin(), nums.end(), Sum());
that line in particular is just... beyond me :P
how does that work?
 
Xeo
9:09 AM
for_each returns the functor
 
I would have thought that would just create a new 'Sum' object for each item in the vector
 
Xeo
Also, the int isn't static inside Sum
 
it's not is it :P
 
Xeo
later
 
My addition vs subtraction question has 17 upvotes O_O
I am so awesome
 
9:26 AM
Can I make create an object of derived type when using make shared with base type. E.g: std::make_shared<BaseType>(...); // need to construct SubType.
 
@StackedCrooked I wouldn't think so with make_shared, that calls constructor for T
 
@StackedCrooked std::shared_ptr<BaseType>(std::make_shared<SubType>(...))
 
Hm..
Does that really work? :)
 
auto std::shared_ptr<base>(new derived()); should work
I think
 
@thecoshman Yeah, I can always resort to that.
However, I wanted to use the fancy make_shared.
 
9:28 AM
@StackedCrooked Why wouldn't it?
 
@thecoshman We don't use that word around here.
 
@ecatmur dang, too late.
just make_shared<derived> and put it in a shared_ptr<base>
 
@ecatmur ?
 
@thecoshman new.
 
9:30 AM
@thecoshman new is evil especially when you're talking about make_shared which completely avoids its use.
 
@ecatmur ah now, don't be silly. Apart from the facet that you use make_shared that's a perfectly fine example :P
does LWS fully support C++11?
IDEONE is still lagging well behind isn't it
 
I am expecting one would support boost some day
 
@thecoshman LWS is GCC 4.7.1 and also has Boost.
I use it exclusively now.
 
I think I do too now :D
it also looks a lot nicer IMO
 
it has only C, C++, and python though.
They should add Clang too, for fun.
 
9:38 AM
@rubenvb boost ? really ? which version ?
 
@NeelBasu 1.50 svn
 
WoW Good
and headers only libraries ?
I've a typedef char char_t which can also be typedef wchar_t char_t

and I have a util namespace I want an util::cout that would be std::cout if char_t is char and std::wcout if char_t is wchar_t
Is that possible with mpl ?
 
9:55 AM
well, namespace util{ using namespace std; } util::cout << "hi"; will work. and I am fairly sure you can even do it for cout specifically
not sure if you could wrap both std::cout and std::wcout to both hide behind util::cout
 
@thecoshman maybe with enable_if
but not sure if cout lends itself to be templatized.
and my SFINAE is rusty.
 
I think you would have to create your own class, implement every function for cout and wcout, and use overloading
 

« first day (669 days earlier)      last day (4279 days later) »