[Bug 207253] cad/openvsp: Fix in 11-CURRENT

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Feb 26 10:55:49 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207253

--- Comment #22 from Raphael Kubo da Costa <rakuco at FreeBSD.org> ---
(In reply to David Chisnall from comment #21)
> This patch looks more complicated than it needs to be.  Wouldn't inserting:
> 
> using ::array;
> 
> Immediately after the definition of array work?

It doesn't seem to work:

% cat foo.cc
#include <iostream>
using namespace std;  // Not doing that here doesn't help, as it can be done
indirectly from another file included before this one.
template<typename T>
struct array {
        array(T t);
};
using ::array;
template<typename T>
array<T>::array(T t) {}

% clang++ -c foo.cc
foo.cc:9:1: error: unknown type name 'array'
array<T>::array(T t) {}
^
foo.cc:9:6: error: expected unqualified-id
array<T>::array(T t) {}
     ^
2 errors generated.

> Alternatively, changing the
> uses  of array to ::array would also work without sticking array in a
> namespace.

That solves the issue for users of the array class, but not for array.h itself
(plus the same amount of lines would need to be changed be it to "::array" or
"openvsp_array".

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the freebsd-toolchain mailing list