Book Image

Learning Boost C++ Libraries

By : Arindam Mukherjee
Book Image

Learning Boost C++ Libraries

By: Arindam Mukherjee

Overview of this book

Table of Contents (19 chapters)
Learning Boost C++ Libraries
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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 whether type T is signed or a floating point type

    d. Generates a metafunction that checks (b)

  4. We have a template declared as: template <typename T, typename Enable = void> class Bar and does not use...