[aspect-devel] Installation error: building object gplates.cc

Timo Heister timo.heister at gmail.com
Mon May 19 15:29:10 PDT 2014


It looks like the direct conversion to bool is only available in
c++11. I just checked in a fix:

return !(!ifile);

On Mon, May 19, 2014 at 6:16 PM, Wolfgang Bangerth
<bangerth at math.tamu.edu> wrote:
>
> Sean,
>
>> */aspect-1.0/source/velocity_boundary_conditions/gplates.cc
>> <http://gplates.cc>:119:16: **error: **no viable conversion from
>> 'std::ifstream'*
>> *      (aka 'basic_ifstream<char>') to 'bool'*
>>
>>          return ifile;
>>
>> This stops the installation. I have pretty limited experience with C++ so
>> haven’t had any luck in diagnosing the problem. I am running Xcode 5.1.1,
>> if
>> that helps.
>
>
> Can you see if either of the following two options works:
>
>   return (bool)ifile;
>
> or
>
>   return (ifile.is_open());
>
> ?
>
> Best
>  W.
>
> --
> ------------------------------------------------------------------------
> Wolfgang Bangerth               email:            bangerth at math.tamu.edu
>                                 www: http://www.math.tamu.edu/~bangerth/
>
> _______________________________________________
> Aspect-devel mailing list
> Aspect-devel at geodynamics.org
> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel


More information about the Aspect-devel mailing list