Re: [Boost-bugs] [Boost C++ Libraries] #282: boost::optional<enum> fails with /CLR

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #282: boost::optional<enum> fails with /CLR
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-08-22 21:41:23


#282: boost::optional<enum> fails with /CLR
-------------------------------+--------------------------------------------
  Reporter: nobody | Owner: fcacciola
      Type: Support Requests | Status: new
 Milestone: | Component: optional
   Version: None | Severity: Problem
Resolution: None | Keywords:
-------------------------------+--------------------------------------------
Changes (by marshall):

  * status: assigned => new
  * component: None => optional
  * severity: => Problem

Old description:

> {{{
> -----
> #include <boost\optional.hpp>
>
> #using <mscorlib.dll>
> #include <tchar.h>
>
> using namespace System;
>
> enum Numbers { Zero, One, Two, Three };
>
> // This is the entry point for this application
> int _tmain(void)
> {
> boost::optional<Numbers> num;
>
> return 0;
> }
> -----
>
> optional.hpp(347): error C2300: 'System::Enum' : class
> does not have a destructor called '~T'
>
> I'm using boost 1.31.0; this fails in both VC7.0 and
> VC7.1.
>
> Removing "#using <mscorlib.dll>" and "using namespace
> System;" gets rid of the compiler error, but then you
> can't use things like System::String*
>
> Thanks,
> Dan
>
> sourceforge.net_at_[hidden]
>

> }}}

New description:

 {{{
 -----
 #include <boost\optional.hpp>

 #using <mscorlib.dll>
 #include <tchar.h>

 using namespace System;

 enum Numbers { Zero, One, Two, Three };

 // This is the entry point for this application
 int _tmain(void)
 {
         boost::optional<Numbers> num;

     return 0;
 }
 -----

 optional.hpp(347): error C2300: 'System::Enum' : class
 does not have a destructor called '~T'

 I'm using boost 1.31.0; this fails in both VC7.0 and
 VC7.1.

 Removing "#using <mscorlib.dll>" and "using namespace
 System;" gets rid of the compiler error, but then you
 can't use things like System::String*

 Thanks,
    Dan

 sourceforge.net_at_[hidden]


 }}}

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/282#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:56 UTC