I must say I have never heard about these functions. Since I've only had class about C and not C++, I think I'll keep safe and use the macro (also since I'm sure this is at compile time). I'll keep this in mind though and look up exactly what they are, thanks. — arbitter5 mins ago
People just declining to use constexpr-functions, i rage
There are a lot of links to forums about this but I does not help.
Its about integrating VC++ to Eclipse.
The headerfiles seems to be there but I am not sure about the libs-files? What happends is that I get this "famous" error when building a simple c++ program:
LINK : fatal error LNK1104: ...
@StackedCrooked Technically it's not a keyword, just an alternative token for !, but the end result is similar - you can't define a variable, class, function and call it not
This question is old, but with C++11 we got a new way to check for a functions existence (or existence of any non-type member, really), relying on SFINAE again:
template<class T>
auto serialize_imp(std::ostream& os, T const& obj, int)
-> decltype(os << obj, void())
{
os << obj;
}
template<...
I keep trying to think of a way to make the indecies trick to log(n) "recursions" because it seems like it ought to be easy, but I haven't yet thought of a way.
If what you're using in the code is a weird form of the indices trick, here's an implementation that has O(log N) instantiations:
// using aliases for cleaner syntax
template<class T> using Invoke = typename T::type;
template<unsigned...> struct seq{ using type = seq; };
template<class S1, cla...
This question attempts to collect the few pearls among the dozens of bad C++ books that are published every year.
Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a well-written...
What are "Sequence Points"?
What is the relation between Undefined Behaviour and Sequence Points?
I often use funny and convoluted expressions like a[++i] = i;, to make myself feel better. Why should I stop using them?
If you've read this, be sure to visit the follow-up question Undefined Beha...
I hate the idea of "preparing" for interviews. Because as soon as you prepare, it becomes harder to properly gauge what the person actually knows or artificially crammed into their brain.
@Xeo My SFINAE code sucks, but it's the only code that will compile halfway sort of maybe-properly with VC++. Now I'm stuck in QtCreator, trying to mangle together what build system I should use to make ninja files for me and run the ninja builds.
user3010322
I've thrown CMake out the window, and there's no reason to use QMake or its pre-processing baking steps because I am not using the QtLibrary at all or its QML nonsense.