2,687 karma · joined October 2, 2015
Of course (C++14, possibly C++11):
#include <type_traits>
template <typename T, typename... Params>
struct HasFoo {
// SFINAE will disable this function template if U has no method foo(float)
template <typename U>
static constexpr bool check(decltype(std::declval<U>().foo(std::declval<Params>()...))*)
{
// We don't check foo's return type here
return true;
}
// Fallback if above function template is disabled
template <typename U>
static constexpr bool check(...)
{
return false;
}
static constexpr bool value = check<T>(0);
};
template <typename D>
struct Base {
Base()
{
static_assert(HasFoo<D, float>::value, "D must implement 'foo(float)'");
}
};
struct Derived {
void foo(int)
{
}
};
Since this essentially simulates a method call, implicit conversions work, as does overloading "foo".As you have to implement "HasFoo" for every method you check, a macro will come in handy, say MAKE_METHOD_CHECK(Foo, bool, float)
I added some comments, feel free to ask if something is not clear :-)
I don't think it's useful to not do anything merely because it's possible the future might turn out like you describe. We (as in humanity) should try to solve the food problem while also preventing nuclear war etc.
Or did I misunderstand what you're saying?
Golden Rice comes to mind: https://en.wikipedia.org/wiki/Golden_rice >Golden rice is a variety of rice (Oryza sativa) produced through genetic engineering to biosynthesize beta-carotene, a precursor of vitamin A, in the edible parts of rice.
Hacker 'Guccifer 2.0' publishes DNC campaign docs with strategies for defending Clinton
The handle is a reference to https://en.wikipedia.org/wiki/Guccifer
But apparently this is The Cold War 2.0, and whenever Russians may be involved, this means that the Russian government is involved...
Not if they have to keep information on paper to comply with the law.
Also seconding vmateixeira: Thanks for your research!
He doesn't:
He said the American companies failed to understand the power dynamics in the room that day. “It was almost like imperialistic Westerners coming to China and telling us what to do,”
almost like
And as the article states Chinese firms are hardly a hive-mind. But even if they were, "taking control" by virtue of mining the most coins is a feature, not a bug. And not "imperialistic."
Of course not. But unpaid internship is always exploitation.
Proof by assertion?
It's also dead slow (obviously).
Unpaid internship. Aka exploitation.
So it's mainly uttered by fascists? (Tyler Durden is a textbook fascist) Sounds about right.
So aggressive and aggravating!/s
>a reasonable decision
Who says the dress code is a reasonable decision?
That's a big assumption to make. I doubt the company ever tested whether their business made more or less money without dress code.
Yes, a petition is really aggressive/s
I would add: "in the UK", since that is what the author is talking about.
There was also the Women's Trade Union League, founded in 1903, and the American Federation of Labor, founded in 1886.
This sounds like a really dysfunctional family to me.