Boost logo

Boost :

Subject: Re: [boost] [fusion][map] default construction semantics
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2009-03-25 11:13:25


Rutger ter Borg wrote:
> Please see attached an example of constructing a fusion map,
> of which I would expect to give identical results.

Really?


> // OK
> map_type map();

This looks like a function declaration to me (a function with name "map" that takes no arguments and returns a map_type), but C++ might be intelligent enough to see that it is a default initialization.


> // Compiler error -- tries to copy
> map_type map;

This looks like a default initialization to me. I have no idea, whether this default initialization should compile without error.

Regards,
Thomas


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk