|
Boost : |
Subject: Re: [boost] [algorithm] Test failure in C++14
From: Marshall Clow (mclow.lists_at_[hidden])
Date: 2013-12-14 10:48:18
On Dec 10, 2013, at 11:34 PM, Ben Pope <benpope81_at_[hidden]> wrote:
> "clang++-3.4" -c -x c++ -std=c++1y -stdlib=libc++ -O0 -g -fno-inline
> -Wall -g -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_TEST_DYN_LINK=1
> -DBOOST_TEST_NO_AUTO_LINK=1 -I".." -o
> "/home/ben/development/boost/test/build/results/boost/bin.v2/libs/algorithm/test/is_permutation_test1.test/clang-linux-3.4~c14_libc++/debug/is_permutation_test1.o"
> "../libs/algorithm/test/is_permutation_test1.cpp"
>
> In file included from ../libs/algorithm/test/is_permutation_test1.cpp:13:
> ../boost/algorithm/cxx11/is_permutation.hpp:178:6: error: declaration
> conflicts with target of using declaration already in scope
> bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1,
> ^
> /usr/include/c++/v1/algorithm:1374:1: note: target of using declaration
> is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
> ^
> ../boost/algorithm/cxx11/is_permutation.hpp:104:12: note: using declaration
> using std::is_permutation; // Section 25.2.12
> ^
> ../boost/algorithm/cxx11/is_permutation.hpp:205:6: error: declaration
> conflicts with target of using declaration already in scope
> bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1,
> ^
> /usr/include/c++/v1/algorithm:1361:1: note: target of using declaration
> is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
> ^
> ../boost/algorithm/cxx11/is_permutation.hpp:104:12: note: using declaration
> using std::is_permutation; // Section 25.2.12
> ^
> 2 errors generated.
>
> I haven't looked in detail, but it looks like those two overloads were
> added in C++14 and need guarding with a suitable #if __cplusplus >=
> C++1Y_version_here
Yep - that’s what’s happening here.
Also, there are two implementations of the same routines; one in cxx11/is_permutation.hpp, and the other in cxx14/is_permutation.hpp.
I’ll clean that up - thanks for letting me know.
— Marshall
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk