473,395 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

What is ScatterHierarchyTag means?

I read the Loki source code, I doubt why use ScatterHierarchyTag head?

----------------------------------------------------------------------------------------------------------------

namespace Private
{

template<class, class>
struct ScatterHierarchyTag;
}

template <class TList, template <class> class Unit>
class GenScatterHierarchy;

template <class T1, class T2, template <class> class Unit>
class GenScatterHierarchy<Typelist<T1, T2>, Unit>
: public GenScatterHierarchy<Private::ScatterHierarchyTag<T 1,
T2>, Unit>
, public GenScatterHierarchy<T2, Unit>
{
public:
typedef Typelist<T1, T2> TList;
typedef GenScatterHierarchy<Private::ScatterHierarchyTag<T 1,
T2>, Unit> LeftBase;
typedef GenScatterHierarchy<T2, Unit> RightBase;
template <typename T> struct Rebind
{
typedef Unit<T> Result;
};
};

template <class T1, class T2, template <class> class Unit>
class GenScatterHierarchy<Private::ScatterHierarchyTag<T 1, T2>,
Unit>
: public GenScatterHierarchy<T1, Unit>
{
};

template <class AtomicType, template <class> class Unit>
class GenScatterHierarchy : public Unit<AtomicType>
{
typedef Unit<AtomicType> LeftBase;
template <typename T> struct Rebind
{
typedef Unit<T> Result;
};
};

template <template <class> class Unit>
class GenScatterHierarchy<NullType, Unit>
{
template <typename T> struct Rebind
{
typedef Unit<T> Result;
};
};

Jan 6 '06 #1
3 1781
alex wrote:
I read the Loki source code


Then unfortunately, you are off topic here, the sourceforge project has
a forum for help relating to that library.

Ben Pope
--
I'm not just a number. To many, I'm known as a string...
Jan 6 '06 #2
On Fri, 06 Jan 2006 10:11:26 +0000 in comp.lang.c++, Ben Pope
<be*************@gmail.com> wrote,
alex wrote:
I read the Loki source code


Then unfortunately, you are off topic here, the sourceforge project has
a forum for help relating to that library.


No, it is not off topic here. All of the Loki source code is
standard conforming C++ language code and completely subject to
discussion here. The sourceforge forum is still also a good
suggestion, and also comp.lang.c++.moderated since the author
sometimes answers questions there.

To Alex,
ScatterHierarchyTag was not used in the book version of Loki.
(I assume you are also reading _Modern C++ Design_ by Andre
Alexandrescu; if not there is no hope of understanding.)
The answer to your question is contained in the comment that appears
near the definition of ScatterHierarchyTag, or at least I hope it
answers your question because I probably cannot do any better.
// The following type helps to overcome subtle flaw in the original
// implementation of GenScatterHierarchy.
// The flaw is revealed when the input type list of GenScatterHierarchy
// contains more then one element of the same type (e.g. LOKI_TYPELIST_2(int,
int)).
// In this case GenScatterHierarchy will contain multiple bases of the same
// type and some of them will not be reachable (per 10.3).
// For example before the fix the first element of Tuple<LOKI_TYPELIST_2(int,
int)>
// is not reachable in any way!

Jan 6 '06 #3
David Harmon wrote:
On Fri, 06 Jan 2006 10:11:26 +0000 in comp.lang.c++, Ben Pope
<be*************@gmail.com> wrote,
alex wrote:
I read the Loki source code


Then unfortunately, you are off topic here, the sourceforge project has
a forum for help relating to that library.


No, it is not off topic here. All of the Loki source code is
standard conforming C++ language code and completely subject to
discussion here.


With all due respect, I don't think that all libraries that have
standards conforming code are up for discussion here.

That's a lot of code.

Ben Pope
--
I'm not just a number. To many, I'm known as a string...
Jan 7 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

92
by: Reed L. O'Brien | last post by:
I see rotor was removed for 2.4 and the docs say use an AES module provided separately... Is there a standard module that works alike or an AES module that works alike but with better encryption?...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
17
by: Anoob | last post by:
Can we consider () unary operator when calling a function, in exps eq. f(), ( 1 + 2). But when we call function f( 10 ) it is a binary operator. Even if we pass f( 10, 20) as we are using ,...
39
by: VidTheKid | last post by:
THE PROBLEM The % symbol is too vague when defining dimensions in CSS and HTML. It can relate to an inherited value, a measure of the containing element (which can differ between box models) or...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
10
by: Franky | last post by:
I think I misread a post and understood that if I do: System.Windows.Forms.Cursor.Current = Cursors.WaitCursor there is no need to reset the cursor to Default. So I made all the reset...
9
by: Cao Yi | last post by:
Hi, here's a fract of codes, and what's the line "scanf("%lf%*", &cvi)" doing? ============================= do { printf("\nCoefficient: "); scanf("%lf%*", &cvi); getchar(); } while (cvi <=...
5
by: thermate | last post by:
Dr.Bricmont, We are extremely proud of you for your brilliant analysis and courage to come out and say it. Your article brings out not one but several key concepts, worth close reading. The...
167
by: darren | last post by:
Hi I have to write a multi-threaded program. I decided to take an OO approach to it. I had the idea to wrap up all of the thread functions in a mix-in class called Threadable. Then when an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.