Skip to content

Commit 40fc4ee

Browse files
inherit
1 parent d6700aa commit 40fc4ee

File tree

1 file changed

+5
-36
lines changed

1 file changed

+5
-36
lines changed

include/pmacc/particles/boostExtension/InheritLinearly.hpp

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -19,48 +19,17 @@
1919
* If not, see <http://www.gnu.org/licenses/>.
2020
*/
2121

22-
2322
#pragma once
2423

25-
26-
#include "pmacc/meta/accessors/Identity.hpp"
27-
28-
#include <boost/mpl/inherit.hpp>
29-
#include <boost/mpl/inherit_linearly.hpp>
30-
#include <boost/mpl/placeholders.hpp>
24+
#include "pmacc/types.hpp"
3125

3226
namespace pmacc
3327
{
34-
namespace detail
35-
{
36-
/** get combined type which inherit from a boost mpl sequence
37-
*
38-
* @tparam T_Sequence boost mpl sequence with classes
39-
* @tparam T_Accessor unary operator to transform each element of the sequence
40-
*/
41-
template<typename T_Sequence, template<typename> class T_Accessor = meta::accessors::Identity>
42-
using InheritLinearly = typename boost::mpl::
43-
inherit_linearly<T_Sequence, boost::mpl::inherit<boost::mpl::_1, T_Accessor<boost::mpl::_2>>>::type;
44-
45-
} // namespace detail
28+
template<typename T_Sequence, template<typename> typename T_Accessor = bmp::mp_identity_t>
29+
struct InheritLinearly;
4630

47-
/** type which inherits from multiple classes
48-
*
49-
* @tparam T_Sequence boost mpl sequence with classes
50-
* @tparam T_Accessor unary operator to transform each element of the sequence
51-
*/
52-
template<typename T_Sequence, template<typename> class T_Accessor = meta::accessors::Identity>
53-
struct InheritLinearly : detail::InheritLinearly<T_Sequence, T_Accessor>
31+
template<typename... Ts, template<typename> typename T_Accessor>
32+
struct InheritLinearly<bmp::mp_list<Ts...>, T_Accessor> : T_Accessor<Ts>...
5433
{
5534
};
56-
57-
58-
// template<typename T_Sequence, template<typename> class T_Accessor = meta::accessors::Identity>
59-
// struct InheritLinearly;
60-
61-
// template<typename... Pairs, template<typename> class T_Accessor>
62-
// struct InheritLinearly<bmp::mp_list<Pairs...>, T_Accessor> : T_Accessor<Pairs>...
63-
//{
64-
//};
65-
6635
} // namespace pmacc

0 commit comments

Comments
 (0)