library

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub matumoto1234/library

:warning: tools/has-iterator.hpp

Depends on

Required by

Code

#pragma once

#include "./base.hpp"

#include <type_traits>

namespace matumoto {
  template <typename T>
  class HasIterator {
    template <typename Container>
    static true_type check(typename Container::iterator *);

    template <typename Container>
    static false_type check(...);

  public:
    static const bool value = decltype(check<T>(0))::value;
  };

  template <typename T>
  using has_iterator_t = enable_if_t<HasIterator<T>::value, typename T::iterator>;
} // namespace matumoto
#line 2 "tools/has-iterator.hpp"

#line 2 "tools/base.hpp"

namespace matumoto {
  using namespace std;
}
#line 4 "tools/has-iterator.hpp"

#include <type_traits>

namespace matumoto {
  template <typename T>
  class HasIterator {
    template <typename Container>
    static true_type check(typename Container::iterator *);

    template <typename Container>
    static false_type check(...);

  public:
    static const bool value = decltype(check<T>(0))::value;
  };

  template <typename T>
  using has_iterator_t = enable_if_t<HasIterator<T>::value, typename T::iterator>;
} // namespace matumoto
Back to top page