Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 15:06

    ldionne on gh-pages

    Update benchmarks to 490dbf6 fo… (compare)

  • Jan 24 07:47

    ldionne on gh-pages

    Update benchmarks to 490dbf6 fo… (compare)

  • Jan 23 02:04
    pthom commented #432
  • Jan 18 12:46

    ldionne on gh-pages

    Update benchmarks to 490dbf6 fo… (compare)

  • Jan 16 22:27
    ricejasonf commented #434
  • Jan 05 06:22
    ricejasonf commented #330
  • Jan 03 11:40

    ldionne on gh-pages

    Update benchmarks to 490dbf6 fo… (compare)

  • Jan 02 00:33
    ricejasonf closed #434
  • Jan 02 00:33
    ricejasonf commented #434
  • Jan 02 00:04
    ricejasonf opened #434
  • Dec 27 2018 13:11

    ldionne on gh-pages

    Update benchmarks to 490dbf6 fo… (compare)

  • Dec 22 2018 11:56
    pthom commented #432
  • Dec 22 2018 11:55
    pthom commented #432
  • Dec 21 2018 15:48
    pthom synchronize #432
  • Dec 21 2018 09:19
    sdebionne opened #433
  • Dec 21 2018 00:08
    ricejasonf commented #432
  • Dec 21 2018 00:03
    ricejasonf commented #432
  • Dec 20 2018 23:36
    pthom commented #432
  • Dec 20 2018 23:36
    pthom commented #432
  • Dec 20 2018 23:13
    ricejasonf commented #432
Andreas Pokorny
@APokorny
hm what are common limits for number of template parameters?
lets say I want to create a integral matrix constant
Jason Rice
@ricejasonf
I'm not aware of any limits, but if you are working with integrals then an array would be much faster.
@APokorny ^
Andreas Pokorny
@APokorny
back at the graph algorithms .. thought about building an adjacency matrix
Jason Rice
@ricejasonf
for a game or something?
Andreas Pokorny
@APokorny
for a not that micro micro controller
we do push dedicated firmwares on each device... 4mb rom and ~ 512kb ram
seertaak
@seertaak
Hello
Is anyone there?
Jason Rice
@ricejasonf
yo
Jason Rice
@ricejasonf
It looks like Brigand is doing the types as values thing: https://github.com/edouarda/brigand/wiki/Runtime
Andreas Pokorny
@APokorny
I am currently using kvasir mpl
Jason Rice
@ricejasonf
I use mp11 for some stuff
Hunber
@a33445321
hello, If i want write a logger to database through boost-log , how should i do?
thanks a lot
Jason Rice
@ricejasonf
@a33445321 Perhaps ask this on the Boost mailing list. This is the chat for the Boost.Hana metaprogramming library.
Hunber
@a33445321
@ricejasonf Thank you
Andreas Pokorny
@APokorny
so a do notation..
Jason Rice
@ricejasonf
I just encountered a scenario where not having typename changed caused sfinae to squelch an error.
#include <boost/hana.hpp>
#include <array>
#include <string>
#include <type_traits>

namespace hana = boost::hana;

int main() {
  auto is_byte_container = hana::is_valid([](auto&& x)
    -> std::enable_if_t<(sizeof(typename std::decay_t<decltype(x)>::value_type) == 1)>
                             // ^ don't forget typename or its not valid
  { return {}; });

  static_assert(decltype(is_byte_container(std::string{})){});
  static_assert(decltype(is_byte_container(std::array<unsigned char, 42>{})){});
}
everything was fine, but the static_asserts were failing
something about sizeof, but I don't get it
Jason Rice
@ricejasonf
I mention Boost.Hana a few times here http://cppcast.com/2018/04/jason-rice/ (shameless plug)
Darth Rubik
@DarthRubik
Foolish question: Why is there not a concept for things that have the set operations (like union_, intersection, and symmetric_difference)? Or am I just not looking hard enough in the docs and code?
Jason Rice
@ricejasonf
boostorg/hana#367
There is also a PR that precedes that idea. Having a concept for those is definitely desirable.
To answer your question, it does not exist yet.
Darth Rubik
@DarthRubik
Thanks....that does answer the question
Andreas Borgen Longva
@Andlon
Hi everybody. I've just discovered Hana, and I have a very basic question. Say I want to iterate over a finite set of types (defined in some header file) and for each type call some function, is this something that it is natural to use Hana for?
Jason Rice
@ricejasonf

Hello, @Andlon, that is definitely a use case for Hana. Check out the functions associated with the Foldable concept.
http://boostorg.github.io/hana/group__group-Foldable.html

If you want to call a function that performs side effects, then for_each is a good choice. unpack and fold_left are good for returning something but note that, since unpack works with a variadic function, it performs better at compile-time because it doesn't create many intermediate function calls.

Jason Rice
@ricejasonf
There is also an Iterable concept that adds to Foldable.
Andreas Borgen Longva
@Andlon
Thanks for the response, @ricejasonf! That looks like exactly what we need.
My group isn't very keen on Boost, mostly because they don't like managing dependencies on Windows in particular, and I think I'd have a hard time of convincing them to integrate Boost into our projects. Can I use Hana without Boost (I understand this is possible as described in the User Manual) by bundling it in a way that does not require explicit installation?
I.e. can I for example just bundle the header files with the project?
Or even better, since Hana is a CMake project, can I simply include it as a cmake subdirectory?
Jason Rice
@ricejasonf
yeah it is standalone, header only. you can use cmake or just copy the contents of the 'include' directory.
Andreas Borgen Longva
@Andlon
All right, thanks for the clarification! That sounds really great, looking forward to try it out!
Van Nevel Mathieu
@Celes-Eternal
Hi guys, I have a question which is not directly for boost hana. I mean, I'm making some research about C++ library documentation, with metaprogramming, concepts and all this kind of stuff. And I didn't find any real answer, except using macros and doxygen. And it looks like it's what you're using. So I was wondering, is that a convenient approach? Or if you had to start another project you will use something else? Thanks :)
Jason Rice
@ricejasonf
"standardese" is a wip but worth looking at
Van Nevel Mathieu
@Celes-Eternal
@ricejasonf I searched this one all the afternoon! Thanks ^^
Still if someone have something to say, it's not like I have made up my mind
Adam Getchell
@acgetchell
I’d love to use standardese, but it doesn’t support LaTeX.
Andreas Borgen Longva
@Andlon
I'm a little bit confused about the issue of MSVC support for Hana. Can I not use it at all, or is it rather that some features will work and some won't?
I'd like us to use Hana for a project, and though I'm on Linux, my colleagues use Windows and MSVC
I think our only intended usage is to do something like a for-each loop over a compile-time defined set of types
Jason Rice
@ricejasonf
I've not tried it, but AFAIU all of the features work. I think they have their own fork or you can try the develop branch.
Andreas Borgen Longva
@Andlon
oh, interesting! Thanks, we will probably try it out and see how it works for us. Though we're still some time away until we actually get to the point where we will need Hana
Darth Rubik
@DarthRubik
Is there a way to automatically generate the == and != operators for a model of the comparable concept?
Jason Rice
@ricejasonf
I don't think so
Jason Rice
@ricejasonf
It works the other way around though, but you still have to define both == and !=... they should fix that or something