Use static_cast, rather than const_cast. Cheers, ron On Jun 13, 2005, at 11:14 AM, Yan Zhang wrote: Arial0000,0000,8080Hi Ron, Arial0000,0000,8080  Times New RomanHow do you “cast "other" to the multi_array type” here? I used Times New Roman  Courier New      Array (0000,0000,FFFFconst Array& other) : boost::multi_array<<0000,0000,FFFFdouble,2>( 0000,0000,FFFFconst_cast<<0000,0000,FFFFconst boost::multi_array<<0000,0000,FFFFdouble,2>& > other) Courier New      { Courier New      } Courier New  Courier NewAnd it failed to compile. Courier New  Courier NewThank for your help, Courier New  Courier NewYan Arial0000,0000,8080  TahomaFrom:Tahoma boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Ronald Garcia TahomaSent:Tahoma Monday, June 13, 2005 7:54 AM TahomaTo:Tahoma boost-users@lists.boost.org TahomaSubject:Tahoma Re: [Boost-users] How to inherit from boost::multi_array Times New Roman  Times New RomanGreetings Yan, Times New Roman  Times New RomanI do not recall the context of the problem you describe below, but It appears that the definition: Times New Roman  Times New RomanArray (const Array& other) : Times New Romanboost::multi_array< (other) Times New Roman{} Times New Roman  Times New Romanis the problem. the above expression will call the templated constructor. I believe that the solution here is to cast "other" to the multi_array type. That should result in the proper constructor call. Times New Roman  Times New RomanHTH, Times New Romanron Times New Roman  Times New RomanOn Jun 6, 2005, at 12:09 PM, Yan Zhang wrote: Times New Roman  Courier NewI’m read the posting by Thomas and replay by Ronald on how to inherit from boost::multi_array as following:  On Oct 2, 2004, at 10:26 AM, Thomas Mensch wrote: Dear List, I am using boost 1.31.0 on Linux (with gcc 3.3.2)I would like to create a 2D array class, which inherits  fromboost::multi_array< class. However I have problemswith the copy constructor of my class Array.  Below is the code,which I am trying to run.   _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users