Self-test questions

For multiple choice questions, choose all the options that apply:

  1. 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

  2. What is the interface that a metafunction must satisfy?

    a. It must have a static value field

    b. It must have an embedded type called type

    c. It must have a static type field

    d. It must have an embedded type called result

  3. 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 ...

Get Learning Boost C++ Libraries now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.