mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
[desuructive changes] container traits new interface [破壊的変更]
This commit is contained in:
parent
52a2178ac1
commit
ad60c8c530
356 changed files with 3183 additions and 3251 deletions
31
sprout/container/sub_container_traits.hpp
Normal file
31
sprout/container/sub_container_traits.hpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
#ifndef SPROUT_CONTAINER_SUB_CONTAINER_TRAITS_HPP
|
||||
#define SPROUT_CONTAINER_SUB_CONTAINER_TRAITS_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/utility/forward.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
// sub_container_traits
|
||||
//
|
||||
template<typename Container>
|
||||
struct sub_container_traits {
|
||||
public:
|
||||
template<typename Cont>
|
||||
struct internal {
|
||||
public:
|
||||
typedef Cont&& type;
|
||||
};
|
||||
public:
|
||||
template<typename Cont>
|
||||
static SPROUT_CONSTEXPR typename internal<Cont>::type get_internal(Cont&& cont) {
|
||||
return sprout::forward<Cont>(cont);
|
||||
}
|
||||
};
|
||||
template<typename Container>
|
||||
struct sub_container_traits<Container const>
|
||||
: public sprout::sub_container_traits<Container>
|
||||
{};
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_CONTAINER_SUB_CONTAINER_TRAITS_HPP
|
Loading…
Add table
Add a link
Reference in a new issue