@@ -67,6 +67,15 @@ namespace mamba::download
67
67
MirrorRequest& operator =(MirrorRequest&&) = default ;
68
68
};
69
69
70
+ struct MirrorStats // Moved out of Mirror internals because of compilers not agreeing: https://godbolt.org/z/GcjWhrb9W
71
+ {
72
+ std::optional<std::size_t > allowed_connections = std::nullopt;
73
+ std::size_t max_tried_connections = 0 ;
74
+ std::size_t running_transfers = 0 ;
75
+ std::size_t successful_transfers = 0 ;
76
+ std::size_t failed_transfers = 0 ;
77
+ };
78
+
70
79
// A Mirror represents a location from where an asset can be downloaded.
71
80
// It handles the generation of required requests to get the asset, and
72
81
// provides some statistics about its usage.
@@ -110,24 +119,9 @@ namespace mamba::download
110
119
MirrorID m_id;
111
120
size_t m_max_retries;
112
121
113
- struct Stats
114
- {
115
- Stats () = default ;
116
- Stats (const Stats&) = default ;
117
- Stats (Stats&&) noexcept = default ;
118
- Stats& operator =(const Stats&) = default ;
119
- Stats& operator =(Stats&&) noexcept = default ;
120
-
121
- std::optional<std::size_t > allowed_connections = std::nullopt;
122
- std::size_t max_tried_connections = 0 ;
123
- std::size_t running_transfers = 0 ;
124
- std::size_t successful_transfers = 0 ;
125
- std::size_t failed_transfers = 0 ;
126
- };
127
-
128
- static_assert (std::default_initializable<Stats>);
122
+ static_assert (std::default_initializable<MirrorStats>);
129
123
130
- util::synchronized_value<Stats > m_stats;
124
+ util::synchronized_value<MirrorStats > m_stats;
131
125
132
126
};
133
127
0 commit comments