Library: search for a way to rebind to nested definitions
...automatically whenever those are present. Up to now, we hat that as base case, which limited usage to those cases where we already know such nested definitions are actually present
This commit is contained in:
parent
d73b0b05b2
commit
6bb288bf20
2 changed files with 11 additions and 1 deletions
|
|
@ -40,6 +40,8 @@
|
|||
|
||||
|
||||
#include "lib/error.hpp"
|
||||
#include "lib/meta/duck-detector.hpp" ////////TODO
|
||||
#include "lib/meta/util.hpp" ////////TODO
|
||||
|
||||
|
||||
|
||||
|
|
@ -51,6 +53,8 @@ namespace std {
|
|||
namespace lib {
|
||||
namespace meta {
|
||||
|
||||
META_DETECT_NESTED (value_type);
|
||||
|
||||
/**
|
||||
* Type re-binding helper template for creating nested typedefs
|
||||
* for use by IterAdapter or similar "Lumiera Forward Iterators".
|
||||
|
|
@ -104,7 +108,7 @@ namespace meta {
|
|||
* STL style type binding definitions themselves
|
||||
*/
|
||||
template<typename TY>
|
||||
struct TypeBinding<TY, typename TY::value_type *>
|
||||
struct TypeBinding<TY, enable_if<HasNested_value_type<TY>> >
|
||||
{
|
||||
typedef typename TY::pointer pointer;
|
||||
typedef typename TY::reference reference;
|
||||
|
|
|
|||
|
|
@ -200,6 +200,12 @@ namespace test{
|
|||
cout << showType<TypeBinding<Join&>::reference>() <<endl;
|
||||
cout << showType<TypeBinding<Join&>::pointer>() <<endl;
|
||||
|
||||
#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #888
|
||||
cout << showType<TypeBinding<Join&&>::value_type>() <<endl;
|
||||
cout << showType<TypeBinding<Join&&>::reference>() <<endl;
|
||||
cout << showType<TypeBinding<Join&&>::pointer>() <<endl;
|
||||
#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #888
|
||||
|
||||
cout << showType<TypeBinding<Join const&>::value_type>() <<endl;
|
||||
cout << showType<TypeBinding<Join const&>::reference>() <<endl;
|
||||
cout << showType<TypeBinding<Join const&>::pointer>() <<endl;
|
||||
|
|
|
|||
Loading…
Reference in a new issue