octave-maintainers
[Top][All Lists]
Advanced

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

Re: error: no matching constructor for initialization of 'string_vector'


From: Mike Miller
Subject: Re: error: no matching constructor for initialization of 'string_vector'
Date: Thu, 25 Aug 2016 18:40:04 -0700
User-agent: Mutt/1.6.2-neo (2016-07-23)

On Thu, Aug 25, 2016 at 20:43:19 -0400, Ben Abbott wrote:
> On Aug 25, 2016, at 9:01 AM, Carnë Draug <address@hidden> wrote:
> > 
> > In the change that's causing issues for clang, the argument is a
> > std::set<std::string> so I would expect it to use the templated
> > constructor for String_Container<std::string>.
> 
> If I’m following … might clang require an explicit constructor for 
> std::set<std::string>?

I can reproduce this build error on Debian with clang 3.7 / libc++ 3.7.

The specific constructor that should work but doesn't fails with the
following error:

  ../liboctave/util/str-vec.h:131:16: note: candidate template ignored: 
substitution failure [with String_Container = set]: too few template arguments 
for class template 'set'
  string_vector::string_vector (const String_Container<std::string>& lst)
                 ^                    ~~~~~~~~~~~~~~~~

This appears to be the following issue filed with the C++ working group:

  http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#2057

And the attached patch resolves the default template argument resolution
problem and the build finishes successfully for me. Feel free to refine
however you like.

-- 
mike

Attachment: str-vec-clang.diff
Description: Text Data


reply via email to

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