simon-git: spigot (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Mon Aug 5 20:47:10 BST 2019


TL;DR:
  ecae2f7 Fix build failures on gcc 6.3.0.

Repository:     https://git.tartarus.org/simon/spigot.git
On the web:     https://git.tartarus.org/?p=simon/spigot.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2019-08-05 20:47:10

commit ecae2f7d61afec442dbd5d0581fe34bc7dba26af
web diff https://git.tartarus.org/?p=simon/spigot.git;a=commitdiff;h=ecae2f7d61afec442dbd5d0581fe34bc7dba26af;hp=cbafc56b21e4d0da1ac38c5cd0c5b9ab2cc8153d
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Aug 5 20:36:30 2019 +0100

    Fix build failures on gcc 6.3.0.
    
    The use of 'using' to import all your constructors from a base class
    turns out not to sit well with every C++ compiler. gcc 7.4.0 on Ubuntu
    18.04 didn't complain, but 6.3.0 on Debian 8 considers that importing
    the constructors from 'vector' into 'argvector' doesn't give it a
    default constructor (because the thing 'vector' has that _looks_ like
    a zero-argument constructor actually has an allocator argument that is
    defaulted, and apparently gcc doesn't manage to import all of that).
    
    In a similar vein, there's some confusion over spigot_error's
    arbitrarily templated constructor that builds an error message out of
    whatever pieces you give it. That seems to work fine in spigot_error
    itself without getting confused with the copy and move constructors,
    but when I 'using' it into all spigot_error's subclasses, gcc suddenly
    thinks that any attempt to copy (say) a domain_error must surely have
    been intended to be passed to the template, rather than to the copy
    constructor. And that provokes an error, because that's one argument
    type you _can't_ pass to the template successfully - which you'd think
    would mean it got SFINAEd away and fell back to the copy constructor,
    but there we go.

 error.h | 12 ++++++++++++
 funcs.h |  1 +
 2 files changed, 13 insertions(+)



More information about the tartarus-commits mailing list