If I were do design a build system I'd put the compiled things by default in a random directory in ~/.<name of buildsystem>/. Of course you can change it in a configuration file.
I'd put the build in the directory where you ran the command, and refuse to do anything if that directory is the same or a subdirectory of the project file.
Today I'm going to think like a Java developer. I'm going to write a build system and use XML for configuration files. On top of that, the XML configuration files must add the right XML namespace declarations or it'll refuse to run! Also, I'm going to put things in millions of different namespaces!
actually, setting up a failsafe backup system is really hard anyway. On OS X I just use Time Machine … which sucks, by the way, but at least it works. But configuring your own rsync script correctly, and so that restore works hassle-free is really, really hard
all I’m saying is that the user interface idiom of rm is fundamentally broken
normal person: "oops, didn't mean to press delete, oh well ctrl+z. There, all fixed" you: "oops, didn't mean to press delete. Now I have to search through my backups to get that file back"
I find it staggering that you can be so ignorant to the possibility for mistakes. You make back up's because your HDD could crash. You have a trash folder because you could accidentally delete something. Yes you could restore from back up, but undoing the delete is near enough instant and if your file is newer then the last back up, your changes are gone.
in other words, disabling trash is an idiotic move. All you stand to gain is hassle and a small bit of HDD space
I've just wasted 2 hours of my life because i had #define CLASS_HPp instead of #define CLASS_HPP :-/ Someone fancy coming over to stab me in an eye with a fork ?
@thecoshman Right-y, Visual Assist actually takes care of me for this. :) I just type #guard, <tab>, and there we go (automatically takes the filename)
any one made use of cppunit? or any 'testing that a class behaves as I expect it to' system? I would say 'unit testing' but last time I called it that, it turned into a talk about what unit testing really is
> GCC originally gave a warning declaring #pragma once "obsolete" when compiling code that used it. However, with the 3.4 release of GCC, the #pragma once handling code was fixed to behave correctly with symbolic and hard links. The feature was "un-deprecated" and the warning removed.
In the C and C++ programming languages, #pragma once is a non-standard but widely supported preprocessor directive designed to cause the current source file to be included only once in a single compilation. Thus, #pragma once serves the same purpose as #include guards, but with several advantages, including: less code, avoiding name clashes, and sometimes improved compile speed.
Example
See the article on #include guards for an example of a situation in which one or the other of these methods must be used. The solution using include guards is given on that page; the #pragma once solutio...
I wish the onebox would honor #tag suffixes and show a preview of that
Short question: in std::map one can define a custom Compare functor ( default is operator<()) but can I use it to compare equally values for which operator== would return false ?
No wait... now that I think about it, the answer is no and I'm dumb. Never mind.
If you implement it so that !("127.0.0.1" < "::ffff::127.0.0.1") && !(":ffff:127.0.0.1" < "127.0.0.1"), then as far as the map is concerned, they are equivalent, and will be considered the same key
I Derived privatly from Base class. and when I create a Base pointer that point to a Derived object I get this ERROR. error: 'Base' is an inaccessible base of 'Derived'.
@classdaknokt : yes but why. I create Derived Object and it works fine. but why a base pointer can't point to a Derived class if it inherist form it Privatly. thanks
@CatPlusPlus First time running Unity what that indicator-appmenu thingy removed. The menus are now attached to their windows, but that happens even when the window is maximised, so the top bar becomes wasted screen real estate. So it's more of a hack than real customisation.
Mmh I thought I could maybe try to add support for recursive variants but it's kinda weird.
Mmmh, if I do variant_type v = u; where the variant type is <int, std::string, recursive_variant_> then it's not a copy, but if I change the last param to recursive_variant_& then it's a copy.
We have an employee whose last name is Null. He kills our employee lookup app when his last name is used as the search term (which happens to be quite often now). The error received (thanks Fiddler!) is
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>...
@thecoshman This is annoying if you want to do something like:template<class T, template<class> class ContainerType> struct Stack { ... };. It doesn't work with Stack<int, vector>.
not sure of the proper words for this, but are you trying to 'implement' a template class where one of the types in the template is a template that has not it self been implemented with a type?
Note that another way to make std::vector 'match' template<typename> class T is to use an alias: template<typename T> using vector = std::vector<T>; then vector can be used.
can't you use the first template type as the 'type' passed to another template eg template <type T, std::vector<T>>funkyThing and call it with funkything<int> funk
However you can do template<typename T, template<typename...> class Template = std::vector> and later on use Template<T> which will default to std::vector<T> is that's what you want.
As you know the Standard container adapters do not use template template parameters. Instead it's e.g. template<typename T, typename Container = std::deque<T>> class stack. So know that you're starting to know how template template parameters works, know when they're not necessary.
Similarly it's not template<typename T, template<typename> class Allocator = std::allocator> class vector.