Skip to content
Snippets Groups Projects
Commit 902c8b4e authored by Jan Trávníček's avatar Jan Trávníček
Browse files

manual include of experimental array for safety

parent c4fb98d0
No related branches found
No related tags found
No related merge requests found
Pipeline #20673 failed
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#define __ARRAY_HPP_ #define __ARRAY_HPP_
   
#include <array> #include <array>
#include <experimental/array>
   
#include <ostream> #include <ostream>
#include <sstream> #include <sstream>
...@@ -34,6 +33,30 @@ ...@@ -34,6 +33,30 @@
#include <extensions/compare.hpp> #include <extensions/compare.hpp>
#include <extensions/range.hpp> #include <extensions/range.hpp>
   
namespace std {
namespace experimental {
namespace details {
template <class D, class...> struct return_type_helper { using type = D; };
template <class... Types>
struct return_type_helper<void, Types...> : std::common_type<Types...> {};
template <class D, class... Types>
using return_type = std::array<typename return_type_helper<D, Types...>::type,
sizeof...(Types)>;
}
template < class D = void, class... Types>
constexpr details::return_type<D, Types...> make_array(Types&&... t) {
return {std::forward<Types>(t)... };
}
} /* namespace experimental */
} /* namespace std */ //FIXME remove whole thing when make_array gets from experimental to the standard
namespace ext { namespace ext {
   
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment