octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #44818] clang: error: implicit instantiation o


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #44818] clang: error: implicit instantiation of undefined template
Date: Sun, 12 Apr 2015 14:37:17 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0 Iceweasel/35.0.1

URL:
  <http://savannah.gnu.org/bugs/?44818>

                 Summary: clang: error: implicit instantiation of undefined
template
                 Project: GNU Octave
            Submitted by: mtmiller
            Submitted on: Sun 12 Apr 2015 10:37:15 AM EDT
                Category: Libraries
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Build Failure
                  Status: Patch Submitted
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

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.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sun 12 Apr 2015 10:37:15 AM EDT  Name: streams.diff  Size: 734B   By:
mtmiller

<http://savannah.gnu.org/bugs/download.php?file_id=33645>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44818>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]