Self-test questions
For multiple choice questions, choose all the options that apply:
Which of the following overloads/specializations does the call
foo(1.0, std::string("Hello"))
resolve to?a.
template <typename T, typename U> foo(T, U);
b.
foo(double, std::string&);
c.
template <> foo<double, std::string>
d. There is ambiguity
What is the interface that a metafunction must satisfy?
a. It must have a static
value
fieldb. It must have an embedded type called
type
c. It must have a static
type
fieldd. It must have an embedded type called
result
What does the following statement do:
boost::mpl::or_<boost::is_floating_point<T>, boost::is_signed<T>>
?a. Checks whether type T is signed and a floating point type
b. Generates a metafunction that checks (a)
c. Checks whether type T is signed or a floating point type
d. Generates a metafunction that checks (b)
We have a template declared as:
template <typename T, typename Enable = void> class Bar
and does not use...