C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches

Solution to Exercise 4-5. More...

#include <algorithm>
#include <boost/mpl/if.hpp>
#include <boost/type_traits/is_const.hpp>

Go to the source code of this file.

Namespaces

namespace  exercise_4_5
 Encapsulate solution for Exercise 4-5.
 

Functions

template<typename Container , typename Value >
boost::mpl::if_< boost::is_const< Container >, typenameContainer::const_iterator, typenameContainer::iterator >::type exercise_4_5::container_find (Container &c, Value const &v)
 Executes std::find across an entire container.
 

Detailed Description

Solution to Exercise 4-5.

Author
Matt Bisson

Definition in file exercise-4-5.hpp.