|
Boost : |
Subject: Re: [boost] [config] C++0X Compiler doesn't support classes with constructors in unions
From: Nevin Liber (nevin_at_[hidden])
Date: 2011-02-22 18:00:00
On 22 February 2011 16:06, Vicente Botet <vicente.botet_at_[hidden]> wrote:
>
> Hi,
>
> is there a macro that can be tested to know if a compiler doesn't support
> classes with constructors in unions?
>
What compiler(s) implement this as an extension? It isn't allowed in C++03
either: "An object of a class with a non-trivial constructor, a non-trivial
copy constructor, a non-trivial destructor, or a non-trivial copy assignment
operator cannot be a member of a union, nor can an array of such objects."
-- Nevin ":-)" Liber <mailto:nevin_at_[hidden]> (847) 691-1404
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk