DryChem 1.0.0
A generic, compile-time C++ toolbox with no dependencies for the modern computational chemistry project.
Loading...
Searching...
No Matches
popFront.hpp
Go to the documentation of this file.
1// Copyright (c) 2020-2025 Cody R. Drisko. All rights reserved.
2// Licensed under the MIT License. See the LICENSE file in the project root for more information.
3//
4// Name: popFront.hpp
5// Author: crdrisko
6// Date: 01/21/2021-09:10:15
7// Description:
8
9#ifndef POPFRONT_HPP
10#define POPFRONT_HPP
11
12#include <tuple>
13#include <utility>
14
17
18namespace CppUtils::Meta
19{
20 template<typename... Elements>
21 constexpr auto pop_front(const std::tuple<Elements...>& tuple)
22 {
23 return select(tuple, pop_front_list_t<std::make_index_sequence<sizeof...(Elements)>> {});
24 }
25} // namespace CppUtils::Meta
26
27#endif
Definition frontList.hpp:13
constexpr auto select(const std::tuple< Elements... > &tuple, std::index_sequence< Indices... >)
Definition select.hpp:27
typename pop_front_list< List >::type pop_front_list_t
Convenience variable template for ease-of-use.
Definition popFrontList.hpp:25
constexpr auto pop_front(const std::tuple< Elements... > &tuple)
Definition popFront.hpp:21