Click here to Skip to main content
15,891,136 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhat WM_??? does "ShowWindow" actually call and send Pin
Stan the man31-Mar-12 5:40
Stan the man31-Mar-12 5:40 
AnswerRe: What WM_??? does "ShowWindow" actually call and send Pin
Richard MacCutchan31-Mar-12 6:10
mveRichard MacCutchan31-Mar-12 6:10 
AnswerRe: What WM_??? does "ShowWindow" actually call and send Pin
Code-o-mat31-Mar-12 11:36
Code-o-mat31-Mar-12 11:36 
GeneralRe: What WM_??? does "ShowWindow" actually call and send Pin
Stan the man31-Mar-12 13:55
Stan the man31-Mar-12 13:55 
Questionwhy boost define this struct ? [solved] Pin
yu-jian30-Mar-12 21:05
yu-jian30-Mar-12 21:05 
AnswerRe: why boost define this struct ? Pin
Mohibur Rashid30-Mar-12 22:01
professionalMohibur Rashid30-Mar-12 22:01 
GeneralRe: why boost define this struct ? Pin
Code-o-mat30-Mar-12 22:24
Code-o-mat30-Mar-12 22:24 
AnswerRe: why boost define this struct ? Pin
Code-o-mat30-Mar-12 22:22
Code-o-mat30-Mar-12 22:22 
I checked out this[^] file, it has this in it (as you said):
struct nat{};

then later on in this file i see things like:
template<class T>
struct add_reference<T&>
{
    typedef T& type;
};
and
template<>
struct add_reference<void>
{
    typedef nat &type;
};

As you see this last template specialization is a specialization for the add_reference template with void. Thus, i would say, nat is used to make template instantiation available with void. Just think about it, e.g. this:
add_reference<int> x; //+ typedef T& type; (as seen in the template) -> typedef int &type; -OK

Without the specialization with void and nat:
add_reference<void> x; //+ typedef T& type; -> typedef void &type; -ERROR

this obviously won't work, you can't have reference to void, you wouln't be able to instantiate this template using void. So they substitute the void & reference with nat &, the compiler will be happy and the programmer will be happy:
add_reference<void> x; //+ typedef T& type; -> typedef nat &type; -A.O.K.

So i supose nat simply stands for something like: not a type, or somesuch.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<

GeneralRe: why boost define this struct ? Pin
Nelek1-Apr-12 8:57
protectorNelek1-Apr-12 8:57 
GeneralRe: why boost define this struct ? Pin
Code-o-mat1-Apr-12 10:22
Code-o-mat1-Apr-12 10:22 
GeneralRe: why boost define this struct ? Pin
yu-jian2-Apr-12 6:40
yu-jian2-Apr-12 6:40 
GeneralRe: why boost define this struct ? Pin
Code-o-mat2-Apr-12 6:44
Code-o-mat2-Apr-12 6:44 
QuestionDateTime::ParseExact Pin
Mike Certini30-Mar-12 11:38
Mike Certini30-Mar-12 11:38 
QuestionRe: DateTime::ParseExact Pin
Code-o-mat30-Mar-12 23:17
Code-o-mat30-Mar-12 23:17 
AnswerRe: DateTime::ParseExact Pin
Richard MacCutchan30-Mar-12 23:23
mveRichard MacCutchan30-Mar-12 23:23 
SuggestionRe: DateTime::ParseExact Pin
David Crow31-Mar-12 4:04
David Crow31-Mar-12 4:04 
QuestionDisabling USB ports Pin
softwaremonkey30-Mar-12 6:39
softwaremonkey30-Mar-12 6:39 
AnswerRe: Disabling USB ports Pin
David Crow30-Mar-12 7:02
David Crow30-Mar-12 7:02 
GeneralRe: Disabling USB ports Pin
softwaremonkey30-Mar-12 8:07
softwaremonkey30-Mar-12 8:07 
GeneralRe: Disabling USB ports Pin
David Crow30-Mar-12 9:24
David Crow30-Mar-12 9:24 
QuestionPassing std:: or boost::shared_ptr as a reference to a function Pin
AlexZakharenko29-Mar-12 23:58
AlexZakharenko29-Mar-12 23:58 
QuestionHermite Curve Pin
002comp29-Mar-12 20:25
002comp29-Mar-12 20:25 
AnswerRe: Hermite Curve Pin
Richard MacCutchan29-Mar-12 22:25
mveRichard MacCutchan29-Mar-12 22:25 
GeneralRe: Hermite Curve Pin
002comp29-Mar-12 22:37
002comp29-Mar-12 22:37 
GeneralRe: Hermite Curve Pin
Richard MacCutchan29-Mar-12 23:16
mveRichard MacCutchan29-Mar-12 23:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.