[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error: no matching constructor for initialization of 'string_vector'
From: |
Ben Abbott |
Subject: |
Re: error: no matching constructor for initialization of 'string_vector' |
Date: |
Fri, 26 Aug 2016 08:33:27 -0400 |
> On Aug 26, 2016, at 7:32 AM, Ben Abbott <address@hidden> wrote:
>
>> On Aug 25, 2016, at 9:40 PM, Mike Miller <address@hidden> wrote:
>>
>> 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
>> <str-vec-clang.diff>
>
> The patch works for me as well.
>
> Ben
Savannah is down (at least for me in FL). I’m attaching a cset attributed ti
Mike. The change log might need some editing.
Ben
changeset.patch
Description: Binary data