Skip to content

Commit 3db2bcd

Browse files
committed
remove out of scope index ctor
1 parent 7dc86ac commit 3db2bcd

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

cpp/memilio/utils/index.h

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -21,53 +21,14 @@
2121
#define INDEX_H
2222

2323
#include "memilio/utils/compiler_diagnostics.h"
24-
#include "memilio/utils/metaprogramming.h"
2524
#include "memilio/utils/type_safe.h"
26-
#include <tuple>
27-
#include <type_traits>
28-
#include <utility>
2925

3026
namespace mio
3127
{
3228

3329
template <typename... CategoryTags>
3430
class Index;
3531

36-
namespace details
37-
{
38-
39-
template <class... Tags>
40-
std::tuple<Index<Tags>...> get_tuple(Index<Tags...> i)
41-
{
42-
if constexpr (sizeof...(Tags) == 1) {
43-
return std::tuple(i);
44-
}
45-
else {
46-
return i.indices;
47-
}
48-
}
49-
50-
template <class Enum>
51-
std::tuple<Index<Enum>> get_tuple(Enum i)
52-
requires std::is_enum<Enum>::value
53-
{
54-
return std::tuple(Index<Enum>(i));
55-
}
56-
57-
// template <class... Tags>
58-
// Index<Tags...> merge_index_from_tuple(std::tuple<Index<Tags>...>);
59-
60-
template <class... IndexArgs>
61-
auto merge_indices(IndexArgs... args)
62-
{
63-
return std::tuple_cat(get_tuple(args)...);
64-
}
65-
66-
template <class... IndexArgs>
67-
using merge_indices_expr = decltype(std::tuple(get_tuple(std::declval<IndexArgs>())...));
68-
69-
} // namespace details
70-
7132
/**
7233
* @brief An Index with a single template parameter is a typesafe wrapper for size_t
7334
* that is associated with a Tag. It is used to index into a CustomIndexArray
@@ -178,13 +139,6 @@ class Index
178139
}
179140

180141
public:
181-
template <class... IndexArgs,
182-
class = std::enable_if_t<is_expression_valid<details::merge_indices_expr, IndexArgs...>::value>>
183-
Index(IndexArgs... _index_args)
184-
: indices(details::merge_indices(_index_args...))
185-
{
186-
}
187-
188142
// comparison operators
189143
bool operator==(Index const& other) const
190144
{

0 commit comments

Comments
 (0)