template <> \
struct NameOf<type> {\
static const char value[];\
};\
const char NameOf<type>::value[] = #type;
#include <iostream>
template <typename T>
struct NameOf {};
#define DEF_TYPENAME(type) template <> \
struct NameOf<type> {\
static const char value[];\
};\
const char NameOf<type>::value[] = #type;
DEF_TYPENAME(int)
DEF_TYPENAME(double)
DEF_TYPENAME(long double)
DEF_TYPENAME(float)
DEF_TYPENAME(char)
DEF_TYPENAME(long)
DEF_TYPENAME(unsigned)
DEF_TYPENAME(unsigned long)
template <typename T, typename ...types>
void printTypes(T)
{
std::cout << NameOf<T>::value << std::endl;
}
template <typename T, typename ...types>
void printTypes(T, types... t)
{
std::cout << NameOf<T>::value << ", ";
printTypes(t...);
}
int main(int argc, char *argv[])
{
printTypes(1,2U,3L, 4.0, 5.0L, 6UL, 'a', 8.0F);
}
void printTypes(T, types... t)
{
std::cout << NameOf<T>::value << ", ";
printTypes(t...);
}
SELECT * FROM example1 e1 INNER JOIN example2 e2 ON e1.keyArticle = e2.keyArticle INNER JOIN example3 e3 ON e1.keyArticle != e3.keyArticle ORDER BY e1.id
SELECT * FROM example1 WHERE example1.keyArticle NOT IN (SELECT keyArticle FROM example3 WHERE idUser = '{$_COOKIE['keyReg']}'