Skip to content

Conversation

@marksantaniello
Copy link
Contributor

Free functions that are defined in header files must be qualified inline in order to avoid duplicate symbol errors at link time. Bugfix two cases:

  • boost::sort::common::now()
  • boost::sort::common::subtract_time()

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
Free functions that are defined in header files must be qualified inline in
order to avoid duplicate symbol errors at link time.  Bugfix two cases:
- boost::sort::common::now()
- boost::sort::common::subtract_time()
@spreadsort
Copy link
Collaborator

I see a test failure:

...failed clang-linux.compile.c++ bin.v2/libs/sort/test/test_parallel_stable_sort.test/clang-linux-3.8/debug/cxxstd-14-iso/optimization-speed/threading-multi/visibility-hidden/test_parallel_stable_sort.o...
...skipped <pbin.v2/libs/sort/test/test_parallel_stable_sort.test/clang-linux-3.8/debug/cxxstd-14-iso/optimization-speed/threading-multi/visibility-hidden>test_parallel_stable_sort for lack of <pbin.v2/libs/sort/test/test_parallel_stable_sort.test/clang-linux-3.8/debug/cxxstd-14-iso/optimization-speed/threading-multi/visibility-hidden>test_parallel_stable_sort.o...
...skipped <pbin.v2/libs/sort/test/test_parallel_stable_sort.test/clang-linux-3.8/debug/cxxstd-14-iso/optimization-speed/threading-multi/visibility-hidden>test_parallel_stable_sort.run for lack of <pbin.v2/libs/sort/test/test_parallel_stable_sort.test/clang-linux-3.8/debug/cxxstd-14-iso/optimization-speed/threading-multi/visibility-hidden>test_parallel_stable_sort...
clang-linux.compile.c++ bin.v2/libs/sort/test/test_parallel_stable_sort.test/clang-linux-3.8/debug/cxxstd-1z-iso/optimization-speed/threading-multi/visibility-hidden/test_parallel_stable_sort.o
In file included from libs/sort/test/test_parallel_stable_sort.cpp:20:
In file included from ./boost/sort/parallel_stable_sort/parallel_stable_sort.hpp:23:
./boost/sort/sample_sort/sample_sort.hpp:376:25: error: 'this' cannot be explicitly captured when the capture default is '='
auto func = =, this
~~^~~~
1 error generated.

"clang++" -c -x c++ -std=c++1z -fvisibility-inlines-hidden -fPIC -m64 -pthread -O3 -fno-inline -Wall -g -fvisibility=hidden --target=x86_64-pc-linux -DBOOST_ALL_NO_LIB=1 -I"." -I".." -o "bin.v2/libs/sort/test/test_parallel_stable_sort.test/clang-linux-3.8/debug/cxxstd-1z-iso/optimization-speed/threading-multi/visibility-hidden/test_parallel_stable_sort.o" "libs/sort/test/test_parallel_stable_sort.cpp"

@marksantaniello
Copy link
Contributor Author

Seems unrelated to this PR. I think it was caused by this commit, which added "this" in the lambda capture list.
d2b2cf6

@spreadsort spreadsort merged commit db798f6 into boostorg:develop Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants