// -*- C++ -*-

// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the terms
// of the GNU General Public License as published by the Free Software
// Foundation; either version 3, or (at your option) any later
// version.

// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// General Public License for more details.

// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.

// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.

// Permission to use, copy, modify, sell, and distribute this software
// is hereby granted without fee, provided that the above copyright
// notice appears in all copies, and that both that copyright notice
// and this permission notice appear in supporting documentation. None
// of the above authors, nor IBM Haifa Research Laboratories, make any
// representation about the suitability of this software for any
// purpose. It is provided "as is" without express or implied
// warranty.

/**
 * @file types_traits.hpp
 * Contains a traits class of types used by containers.
 */

#ifndef PB_DS_TYPES_TRAITS_HPP
#define PB_DS_TYPES_TRAITS_HPP

#include <ext/pb_ds/detail/basic_types.hpp>
#include <ext/pb_ds/detail/type_utils.hpp>
#include <utility>

namespace __gnu_pbds
{
  namespace detail
  {
    template<typename Key, typename Mapped, typename Alloc, bool Store_Extra>
    struct vt_base_selector
    {
      typedef value_type_base<Key, Mapped, Alloc, Store_Extra> type;
    };

    template<typename Key, typename Mapped, typename Alloc, bool Store_Extra>
    struct types_traits 
    : public vt_base_selector<Key, Mapped, Alloc, Store_Extra>::type
    {
      typedef typename Alloc::template rebind<Key>::other key_allocator;
      typedef typename key_allocator::value_type key_type;
      typedef typename key_allocator::pointer key_pointer;
      typedef typename key_allocator::const_pointer const_key_pointer;
      typedef typename key_allocator::reference key_reference;
      typedef typename key_allocator::const_reference const_key_reference;
      typedef typename Alloc::size_type size_type;

      // Extra value (used when the extra value is stored with each value).
      typedef std::pair<size_type, size_type> 	comp_hash;

      typedef integral_constant<int, Store_Extra> store_extra;
      store_extra	m_store_extra_indicator;

      typedef typename no_throw_copies<Key, Mapped>::indicator no_throw_copies;
      no_throw_copies 	m_no_throw_copies_indicator;
    };
  } // namespace detail
} // namespace __gnu_pbds

#endif 
