bugGNU Octave - Bugs: bug #44818, clang: error: implicit...

 
 

bug #44818: clang: error: implicit instantiation of undefined template

Submitter:  Mike Miller <mtmiller>
Submitted:  Sun 12 Apr 2015 02:37:15 PM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 17 Apr 2015 09:13:36 PM UTC, comment #1: 

I applied the patch under your credentials here (http://hg.savannah.gnu.org/hgweb/octave/rev/1663b82bd009).  Closing report.

Rik <rik5>
Group administrator
Sun 12 Apr 2015 02:37:15 PM UTC, original submission:  

Building with clang 3.6 catches the following C++ errors (selected subset):


../../libinterp/corefcn/c-file-ptr-stream.h:31:25: error: implicit instantiation of undefined template 'std::__1::basic_streambuf<char, std::__1::char_traits<char> >'
../../libinterp/corefcn/c-file-ptr-stream.h:38:16: error: implicit instantiation of undefined template 'std::__1::basic_streambuf<char, std::__1::char_traits<char> >'

../../libinterp/corefcn/procstream.h:73:22: error: implicit instantiation of undefined template 'std::__1::basic_istream<char, std::__1::char_traits<char> >'
../../libinterp/corefcn/procstream.h:78:29: error: type 'std::istream' (aka 'basic_istream<char>') is not a direct or virtual base of 'iprocstream'

../../libinterp/corefcn/procstream.h:103:22: error: implicit instantiation of undefined template 'std::__1::basic_ostream<char, std::__1::char_traits<char> >'
../../libinterp/corefcn/procstream.h:108:29: error: type 'std::ostream' (aka 'basic_ostream<char>') is not a direct or virtual base of 'oprocstream'

../../libinterp/corefcn/procstream.h:133:21: error: implicit instantiation of undefined template 'std::__1::basic_iostream<char, std::__1::char_traits<char> >'
../../libinterp/corefcn/procstream.h:138:28: error: type 'std::iostream' (aka 'basic_iostream<char>') is not a direct or virtual base of 'procstream'


The problem being that only the "iosfwd" header is included before the definition of classes deriving from std::streambuf, std::istream, etc. For some reason I haven't figured out yet, gcc is ok with this but clang 3.6 is not. Replacing "iosfwd" with the full headers needed for all base class definitions works for me. Any reason these header changes would cause problems?

See attached diff.

Also this is not critical for the 4.0 release.

Mike Miller <mtmiller>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #33645:  streams.diff added by mtmiller (734B - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mtmiller (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-04-17 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2015-04-12 mtmiller Attached File- Added streams.diff, #33645

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code