Commit Graph

1973 Commits

Author SHA1 Message Date
Louis Dionne
07b4249276 Merge develop into master with latest fixes 2019-09-26 09:49:27 -04:00
Louis Dionne
bcd7946290 [benchmarks] Fix issue with Tilt 2.0.10
See https://github.com/rtomayko/tilt/issues/347 for details.
2019-09-24 17:37:34 -04:00
Quentin Chateau
1f4157503b [sort] implemented as merge sort
replaced the insersion sort by a merge sort
reduces compilation time, memory usage and
template recursion depth
2019-09-24 06:47:22 -06:00
Quentin Chateau
be0640b9ed [benchmarks] added benchmarks for sort
benchmark for multiple tuple size
the following case are tested:
- sorted tuple
- reverse sorted tuple
- randomized tuple
- sorted tuple except first element
- sorted tuple except last element
2019-09-24 06:47:22 -06:00
Louis Dionne
a5923b4845 Remove support for Clang 3.5, 3.6, 3.7 and 3.8, and Xcode 8
Those are old compilers and removing support allows removing a couple
of workarounds. It also reduces the CI burden and will allow us to test
more recent and more relevant compilers.
2019-07-30 14:48:41 -04:00
Louis Dionne
83cc1cc53e [config] Remove warnings in config.hpp for unsupported compilers
As we bump the compiler requirements, it becomes unreasonable to issue
a warning for compilers that might work with Hana, but that are not
officially supported.
2019-07-30 14:48:41 -04:00
Louis Dionne
8f935a710b [config] Remove Standard Library detection
In most cases, this shouldn't be necessary if we detect the compiler
being used. Strictly speaking, this isn't true because someone could
override the Standard Library with any compiler. However, the logic
for detecting the Standard Library is broken for recent libc++'s, and
I don't want to maintain that.

Also, the Standard Libraries that are not supported are getting more
and more ancient, so the benefit of having these warnings in place is
getting smaller and smaller.
2019-07-30 14:48:41 -04:00
Louis Dionne
99649ba5ed Remove workaround for libc++ bug 22806
This is the only workaround that uses BOOST_HANA_CONFIG_LIBCPP, and I'd
like to get rid of all standard library detection.
2019-07-30 14:48:41 -04:00
Louis Dionne
ddccbbb5b4 Merge branch develop into master with most recent fixes 2019-07-29 13:51:37 -04:00
Louis Dionne
9fdce75e71 [doc] Fix Doxygen warnings and errors with recent Doxygens 2019-07-29 10:23:55 -04:00
Louis Dionne
f2cad68488 [Travis] Build the documentation on Xenial 2019-07-29 10:23:55 -04:00
Louis Dionne
48eb17e0bf [curry] Use anonymous namespace instead of 'static'
Apparently, 'static' can't be used on explicit instantiations of
variable templates (or so GCC says).
2019-07-29 10:23:55 -04:00
Louis Dionne
26f59c645f [example] Avoid ambiguity with ::sqrt 2019-07-29 10:23:55 -04:00
Louis Dionne
7218a046c7 Fix duplicate symbol error
Explicit instantiations of const variables templates are not given
internal linkage by default, so defining curry_or_call<0> was an
ODR violation (a global defined in all TUs where it's included).

In LLVM parlance, we could either give it linkonce_odr semantics
(with C++17 inline variables) or give it internal linkage. Since
Hana is a C++14 library and I don't think there will be any code
bloat associated to this, I'm going with internal linkage.

Fixes #446
2019-07-29 10:23:55 -04:00
Louis Dionne
1adee8c595 [Travis] Update Doxygen to 1.8.15
That version of Doxygen should be statically linked against libclang,
which should resolve a long standing link issue in the CI.
2019-07-29 10:23:55 -04:00
Louis Dionne
aea3a5801c Fix broken cnstr.trap test
A default constructor needs to be define, otherwise Clang emits a
warning that is turned into an error.

Fixes #447
2019-07-29 10:23:55 -04:00
Samuel Debionne
4a5ee58b29 Add a is_valid test for non static member functions 2019-05-10 12:13:37 -06:00
Louis Dionne
e3d5ac7338 Merge develop into master for v1.6.0 release 2019-05-10 09:56:21 -06:00
Louis Dionne
3c660c1e9d Remove unnecessary ref-qualifiers in static_cast
In that context, `decltype(f)` and `decltype(f)&&` are always the same
thing.
2019-04-22 10:47:27 -04:00
Louis Dionne
389816af29 [Travis] Remove job with Clang 7 and C++20
CMake says that Clang 7 doesn't support C++20, even though it supports a
-std=c++2a option.
2019-04-22 10:47:27 -04:00
Louis Dionne
97a77f5063 Bump compiler requirements 2019-04-22 10:47:27 -04:00
Tinko Bartels
9ffeb079fe [doc] fixed links that were broken by a page move at cppreference. 2019-04-22 10:43:21 -04:00
Tinko Bartels
ddb6607f05 [doc] update testing instructions in CONTRIBUTING.md to match README.md. 2019-04-22 10:42:45 -04:00
Louis Dionne
45369732ea [Travis] Fix build with Clang 7 2019-02-12 11:12:47 -05:00
Louis Dionne
be98780061 [Travis] Fix Doxygen URL which prevents the documentation from updating 2019-02-11 17:04:19 -05:00
Louis Dionne
9a821b6750 Revert "[doc] Document support for VS2017"
This reverts commit 490dbf656d.

It turns out that support for VS2017 did not land in Boost 1.69, and
people are confused as to why the documentation says so. This will land
in the next release of Hana in Boost instead.

Fixes #433
2019-02-11 16:58:21 -05:00
Louis Dionne
e307f494cb [Travis] Add testing with -std=c++20
Also, bump default compiler to Clang 7, which supports C++20 to some
extent.
2019-02-11 16:50:29 -05:00
Louis Dionne
a931d11241 [version] Bump to 1.6.0, the next planned release 2019-02-11 16:37:58 -05:00
Louis Dionne
a83b844110 [tests] Fix reliance on C++17 behavior for aggregate types
Fixes #429
2019-02-11 16:30:20 -05:00
Louis Dionne
9bb400fc60 [CMake] Improve how we test against c++17
This will allow us to test against c++20 more easily.
2019-02-11 16:28:35 -05:00
Louis Dionne
224a968d15 [CMake] Add -Wno-self-assign-overloaded to the unit test flags 2019-02-11 16:16:37 -05:00
Louis Dionne
30e09ad300 [Travis] Update URL of Doxygen 2018-12-20 13:27:47 -05:00
Barrett Adair
45d35daabc [Travis] Add tests on GCC 8, Clang 6, Clang 7 2018-12-19 12:14:00 -05:00
Nathan Hourt
24b9779721 [doc] Resubmit #425: bad math typo fix
Attempting to de-munge #425
2018-12-06 14:44:52 -08:00
Louis Dionne
d7efa66130 Remove unused variable warnings with recent Clang 2018-11-09 00:25:30 -08:00
Louis Dionne
ccd6e14a66 [doc] Document support for VS2017 2018-09-24 14:22:15 -07:00
Louis Dionne
490dbf656d [doc] Document support for VS2017 2018-09-24 14:21:55 -07:00
Xiang Fan
2f88520238 Switch AppVeyor to use MSVC 2018-09-23 12:07:32 -04:00
Louis Dionne
73d005bf2c [tutorial] Fix typo type<T> -> type_c<T>
Fixes #423
2018-09-21 21:54:40 -07:00
Zach Laine
7adb3f4b31 Rename check to hana_check
If a "check" target exists, give it a dependency on hana_check. Also, add a custom target check that depends on hana_check otherwise.

Closes  (#422)
2018-09-20 14:47:24 -04:00
Xiang Fan
73cf124587 Switch AppVeyor to use VS2017 (#420)
* Move AppVeyor to VS2017.

The config currently uses clang-cl which will fail due to some compiler errors.
Once AppVeyor supports VS2017 15.8, we can switch the compiler to MSVC.
2018-08-30 10:50:42 -04:00
Louis Dionne
7f1ae3b1bb
Enable building boost.hana with VS2017 15.8
This merges pull request #419 from xiangfan-ms/develop
2018-08-29 09:29:41 -04:00
Xiang Fan
9b808523ff Update the status of 'BOOST_HANA_WORKAROUND_MSVC_DECLTYPEAUTO_RETURNTYPE_662735' 2018-08-22 17:00:13 -07:00
Xiang Fan
5d38f120fa Address review feedback.
1. Apply workaround 'BOOST_HANA_WORKAROUND_MSVC_RDPARSER_TEMPLATEID_616568' unconditionally

2. Fix indentation of #if/#endif
2018-08-22 16:59:56 -07:00
Xiang Fan
95f8f74a2c Enable building boost.hana with VS2107 15.8 (with five source workarounds)
Here is the test result:

 100% tests passed, 0 tests failed out of 1103

Here are the details of the source workarounds:

 1. Active issues we are working on
 a. Multiple copy/move ctors
 VC doesn't correctly handle multiple copy/move ctors.
 The workaround is under macro BOOST_HANA_WORKAROUND_MSVC_MULTIPLECTOR_106654.

 b. Forward declaration of class template member function returning decltype(auto) (this issue is exposed by a recent change in boost 1.68)
 To deduce the actual return type, the compiler expects the function definition to be on the pending list for temploid, which isn't always the case when generic lambda is involved.
 The workaround is under macro BOOST_HANA_WORKAROUND_MSVC_DECLTYPEAUTO_RETURNTYPE_662735

 2. Issues fixed in the development branch of MSVC
 Parsing template id
 VC sometimes incorrectly parses a comparison operation as a template id.
 The workaround is under macro BOOST_HANA_WORKAROUND_MSVC_RDPARSER_TEMPLATEID_616568.

 3. Issues fixed conditionally
 a. Empty base optimization
 VC doesn't always do EBO (empty base optimization). Changing this will break the ABI of MSVC and we provide a __declspec(empty_bases) to enable EBO.
 We have a blog post on this: https://blogs.msdn.microsoft.com/vcblog/2016/03/30/optimizing-the-layout-of-empty-base-classes-in-vs2015-update-2-3/.
 Some tests in hana have static_assert on the size of certain types which relies on EBO being applied:

 hana\test\detail\ebo.cpp
 hana\test\issues\github_202.cpp
 hana\test\pair\empty_storage.cpp
 hana\test\tuple\empty_member.cpp

 The workaround is under macro BOOST_HANA_WORKAROUND_MSVC_EMPTYBASE.

 b. Variadic macro expansion
 The implementation of variadic macro isn't conformant and the macro expansion often results in incorrect result.
 The issue is fixed under /experimental:preprocessor and isn't on by default yet.
 We have a blog post on this: https://blogs.msdn.microsoft.com/vcblog/2018/07/06/msvc-preprocessor-progress-towards-conformance/.

 The workaround is under macro BOOST_HANA_WORKAROUND_MSVC_PREPROCESSOR_616033.

Here is the list of files impacted by the source workarounds:

 BOOST_HANA_WORKAROUND_MSVC_MULTIPLECTOR_106654
  hana\test\_include\laws\base.hpp
  hana\test\map\cnstr.trap.cpp
  hana\test\set\cnstr.trap.cpp
  hana\test\tuple\cnstr.trap.cpp

 BOOST_HANA_WORKAROUND_MSVC_DECLTYPEAUTO_RETURNTYPE_662735
  hana\test\_include\laws\euclidean_ring.hpp
  hana\test\_include\laws\group.hpp
  hana\test\_include\laws\monad_plus.hpp
  hana\test\_include\laws\monoid.hpp
  hana\test\_include\laws\ring.hpp

 BOOST_HANA_WORKAROUND_MSVC_RDPARSER_TEMPLATEID_616568
  hana\include\boost\hana\basic_tuple.hpp
  hana\include\boost\hana\string.hpp
  hana\include\boost\hana\tuple.hpp

 BOOST_HANA_WORKAROUND_MSVC_EMPTYBASE
  hana\include\boost\hana\basic_tuple.hpp
  hana\include\boost\hana\pair.hpp
  hana\include\boost\hana\tuple.hpp
  hana\include\boost\hana\detail\integral_constant.hpp
  hana\test\detail\ebo.cpp

 BOOST_HANA_WORKAROUND_MSVC_PREPROCESSOR_616033
  hana\include\boost\hana\detail\preprocessor.hpp
  hana\include\boost\hana\detail\struct_macros.hpp

BTW,
1. There are some warnings which I don't fix. I will likely address them in a separate PR. They look legit and don't impact the build and tests.
2. Appveyor currently doesn't provide 15.8 Preview 5 which contains all the compiler fixes we made in the previous months. I plan to update appveyor.yml after Appveyor provides 15.8 RTM.
2018-08-22 16:59:34 -07:00
Louis Dionne
4baa9069bb [experimental/printable] Mark function as inline
This gets rid of an ODR-violation.

Fixes #417
2018-08-13 11:18:21 -04:00
Louis Dionne
6187d448df Merge develop into master for release 1.5.0 2018-07-05 22:50:58 -04:00
Louis Dionne
1e1bedb7df Bump version to 1.5.0 2018-07-05 22:48:36 -04:00
Louis Dionne
725f60f13c [example] Remove remaining uses of the _s operator 2018-06-19 21:12:13 -07:00
Louis Dionne
c334974abe [type] Make metafunction & friends SFINAE friendly
Also add a section to the tutorial showing how to use this functionality.
2018-06-19 21:07:14 -07:00