Comments (3)
I think the reason types
can't be a Sequence
is that any implementation of make
would lose the run-time information for all of the elements.
For example this would fail:
static_assert(hana::front(hana::make<types_tag>(1, '2', 3.3)) == 1, "");
from hana.
Given the concept of the types container, the expectation is that I cannot hold runtime info, right? It would seem, from my naive perspective, that it should be possible to cleanly disable certain actions without disabling the use of the types container completely.
But perhaps I'm missing a critical insight.
At least conceptually, it's both possible and desirable to be able to sort a type container.
from hana.
It's also possible and desirable to sort a std::vector
😛, but for that you would not use hana::sort
which works with objects that satisfy hana::Sequence
.
I don't know that it is explicitly forbidden. You still have to implement the functions required to make it a Sequence
. Here is an example I posted on how to do that: https://stackoverflow.com/a/61879631/800347
I do remember barking up this tree myself and getting shot down. In any case, Boost.Hana is optimized for heterogeneously typed containers that contain run-time information so it is slow for type-only computations compared to libraries such as Boost.Mp11. (It has a sort function.)
from hana.
Related Issues (20)
- Integrate Boost.Describe into Boost.Hana?
- How to use hana containers as class data members? HOT 1
- Build Error C2039 with MSVC when using /std:c++latest (C++20) - std::is_literal_type removed HOT 1
- Doxygen issues HOT 1
- Get warnings with clang14 HOT 2
- Is there a replacement for fusion::nview HOT 6
- Circular dependency of boost/hana/concept/struct.hpp and boost/hana/accessors.hpp breaks tooling
- boost::hana::drop_front doesn't respect refness HOT 1
- 'apply': identifier not found inside a lambda function HOT 1
- Hana failed to build with error C2065, error C2977, error C2913... on MSVC HOT 2
- Is it possible to get back the C++ type from hana::type? HOT 1
- A proposal that works like BOOST_HANA_DEFINE/ADAPT_STRUCT and makes it 5x faster. HOT 2
- "Try it" link is broken. HOT 1
- some compile error when I use msvc2022 HOT 4
- Question: has clang __PRETTY_FUNCTION__ behavior changed in clang 16.0.0 ? HOT 1
- std::aligned_storage and std::aligned_union deprecated in C++23
- Is it possible to join two functors to one? HOT 1
- Integrate boost::pfr into hana
- Hana build failed due to fatal error C1189: #error: "No support for this compiler."
- Strange behavior of `hana::partial`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hana.