Skip to content

build failure with -std=c++17 and pari #45

@isuruf

Description

@isuruf

paridecl.h has long rank(GEN x);, but there's also std::rank in C++11.

When

#include <string>
using namespace std;

is done in libsrc/eclib/parifact.h, std::rank is pulled in to the namespace with gcc 7.3. (doesn't happen with gcc 4.9)

This leads to a build failure,

<PREFIX>/include/pari/paridecl.h:1442:19: error: return type specified for deduction guide
 long    rank(GEN x);
                   ^
<PREFIX>/include/pari/paridecl.h:1442:1: error: decl-specifier in declaration of deduction guide
 long    rank(GEN x);
 ^~~~
<PREFIX>/include/pari/paridecl.h:1442:19: error: 'long' or 'short' invalid for '__dguide_rank'
 long    rank(GEN x);
                   ^
<PREFIX>/include/pari/paridecl.h:1442:9: error: deduction guide for 'std::rank< <template-parameter-1-1> >' must have trailing return type
 long    rank(GEN x);

cc @saraedum

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions