///////////////////////////////////////////////////////////////////////////
// senf::log::StreamRegistry
-prefix_ std::string const &
-senf::log::StreamRegistry::SelectName::operator()(Registry::value_type const & v)
- const
-{
- return v.first;
-}
-
prefix_ senf::log::StreamRegistry::StreamRegistry()
{}
prefix_ senf::log::StreamRegistry::iterator senf::log::StreamRegistry::begin()
{
- return boost::make_transform_iterator(registry_.begin(), SelectName());
+ return boost::make_transform_iterator(registry_.begin(),
+ ::__gnu_cxx::select1st<Registry::value_type>());
}
prefix_ senf::log::StreamRegistry::iterator senf::log::StreamRegistry::end()
{
- return boost::make_transform_iterator(registry_.end(), SelectName());
+ return boost::make_transform_iterator(registry_.end(),
+ ::__gnu_cxx::select1st<Registry::value_type>());
}
prefix_ void senf::log::StreamRegistry::registerStream(detail::StreamBase const & stream)
// Custom includes
#include <map>
#include <functional>
+#include <ext/functional>
#include <boost/iterator/transform_iterator.hpp>
#include "Levels.hh"
#include "../singleton.hh"
{
typedef std::map<std::string, detail::StreamBase const *> Registry;
- struct SelectName
- {
- typedef std::string result_type;
- std::string const & operator()(Registry::value_type const & v) const;
- };
-
public:
- typedef boost::transform_iterator<SelectName, Registry::const_iterator> iterator;
+ typedef boost::transform_iterator< ::__gnu_cxx::select1st<Registry::value_type>,
+ Registry::const_iterator > iterator;
# ifdef DOXYGEN
// Hmm ... doxygen does not understand 'using declarations' ...