profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/denzor200/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Denis Mikhailov denzor200 SmaSS Tech Samara

OLR-xray/OLR-3.0 5

Oblivion Lost Remake 3.0 version

denzor200/Asn1Editor.WPF 0

Graphical .NET-based WPF Abstract Syntax Notation One (ASN.1) editor

denzor200/AssCpp 0

Simple .ass subtitles format parser written in modern c++

denzor200/BiffGui 0

Convenience gui shell for our generator of mounting sheets "Biff Tannen"

denzor200/curl 0

A command line tool and library for transferring data with URL syntax, supporting HTTP, HTTPS, FTP, FTPS, GOPHER, TFTP, SCP, SFTP, SMB, TELNET, DICT, LDAP, LDAPS, MQTT, FILE, IMAP, SMTP, POP3, RTSP and RTMP. libcurl offers a myriad of powerful features

denzor200/fusion 0

Boost.org fusion module

denzor200/inspect.lua 0

Human-readable representation of Lua tables

denzor200/intellij-sdk-code-samples 0

Mirror of the IntelliJ SDK Docs Code Samples

issue commentboostorg/fusion

Is there a identity_view?

My example above show already implemented test for "ForwardSequence" concept. filter_view passed this test good. But the current filter_view will fail test for "AssociativeSequence" concept, i suppose

denzor200

comment created time in a day

issue commentboostorg/fusion

Is there a identity_view?

Again, PR would be great. It seems you have familiarity with fusion.

PR in process.. I started with the tests. The way I see it: https://godbolt.org/z/3Y93n3dvd

I propose to make a set of generic tests that will be check any Sequence for compliance with the Concept. Now in fusion, view tests are absolutely not scalable:(

denzor200

comment created time in a day

issue commentboostorg/fusion

Is there a identity_view?

@djowel I implemented this in a rather cheeky way :smile: https://godbolt.org/z/3qn4x8ns5

denzor200

comment created time in 2 days

issue openedboostorg/fusion

Potential non correspondent in documentation

https://www.boost.org/doc/libs/1_77_0/libs/fusion/doc/html/fusion/container/generation/functions/tiers.html This documentation states that a const reference cannot be as an element of some tier. However, this examples compiles successfully: https://godbolt.org/z/9b3jh48xv

created time in 2 days

issue commentboostorg/fusion

Is there a identity_view?

Yes, transform_view is a good idea. But it's view has no at_key_impl, key_of_impl, and so others for associative sequence. Respectively, if we get boost::fusion::map and wrap it into transform_view, then our map will lose its associative character.

Is that intended, or is this a flaw on the transform_view side?

denzor200

comment created time in 2 days

issue openedboostorg/fusion

Is there a identity_view?

Hi. I need a simple wrapper that doesn't have any side effects on the wrapped sequence. Does this library support it? Or is there a shortest way to implement it? To implement >20 tag dispatched functions - is not a short way:(

What do i mean..

For example:

vector<int, std::string> v(12, "Hello world");
identity_view<vector<int, float>> view(v);
std::cout << at_c<0>(view) << std::endl; // Will print 12
std::cout << at_c<1>(view) << std::endl; // Will print Hello world

It's just example for a vector but i expect that identity_view will work with any valid fusion sequence.

created time in 3 days

issue commentboostorg/spirit

Parsing into in place created view

sadly C++ misses ability to switch between by value/by reference depending on a deduced template parameter type. Why not so? https://godbolt.org/z/7b5ce4b4b

denzor200

comment created time in 4 days

issue openedboostorg/spirit

Parsing into in place created view

I am using the spirit library in conjunction with the fusion library. I need to parse a structure from a string, given that the elements in the string are in reverse order. I use the concept of "view" from the fusion library for this, and I expect the code to look something like this: https://godbolt.org/z/h3KneWzGh

As you can see, the build of the example stops with an error. The fixed variant contains the creation of a temporary view object, and its build succeeded: https://godbolt.org/z/PxdKrsrPh

Essense of my question: can we provide on the library side an ability to use first variant (variant without creating a temporary object)? Is there an objective reason why its won't work?

created time in 8 days

issue openedboostorg/describe

Add support for describe getters && setters

I suggest adding support for getters and setters to the library. I see this new functionality like this:

#include <boost/describe.hpp>
#include <iostream>

struct employee
{
    void                  set_name    (std::string name)         ;
    void                  set_age     (int age)                  ;
    const std::string&    get_name    ()                   const ;
    int                   get_age     ()                   const ;
};

BOOST_DESCRIBE_STRUCT(
    employee, (), (
        ("name", get_name, set_name),
        ("age", get_age,  set_age)))


int main()
{
    using boost::describe::describe_members;
    using boost::describe::mod_any_access;
	
    employee emp;
    emp.set_name("John");
    emp.set_age(20);
    
    boost::mp11::mp_for_each<describe_members<decltype(emp), mod_any_access>>([&](auto D){
        auto getter = D.getter; // D also have "setter" field, but a "pointer" field is unavailable
        std::cout << D.name << " = " << (emp.*getter)() << std::endl;
    }); 
	
    // Will print:
    //    name = John
    //    age = 20
    
    return 0;
}

created time in 16 days

issue commentboostorg/describe

Add reflection on attributes

Hello everyone! I recently discovered an interesting way to describe custom attributes in C++17. I propose to consider it.

#ifdef _STR
#  error _STR already defined
#endif
#define _STR(S) BOOST_METAPARSE_STRING(S){}

boost::describe::field<int, (units=cm), (description=_STR("this is sparta"))> x;

This short example shows that it is possible to implement it. At least - for one attribute :-) https://godbolt.org/z/ad1ojzch7

sdebionne

comment created time in 16 days

pull request commentboostorg/fusion

#231 Added pfr extension

Hello everyone! This PR will be extended in the future. I suppose, we need an alternative way to tell fusion that structure must be serialized by pfr, it's way without 'adapt' macro. ...

Addition to my previous comment.. Consider this simple fusion-able structure:

struct A
{
    int first;
    int second;
    int third;
};

BOOST_FUSION_ADAPT_STRUCT(A, first, second/*, third*/);

I suggest giving the user of the library the ability to choose from two ways: 1. boost::fusion::pfr approach

auto a = A{100, 200, 300};
boost::fusion::for_each(boost::fusion::pfr(a), [](auto val) {
	std::cout << val << " ";
});

Will print "100 200 ", because boost::fusion::pfr is intended to indicate that boost.fusion SHOULD serialize value using boost.pfr library.

2. boost::fusion::pfr_fields approach

auto a = A{100, 200, 300};
boost::fusion::for_each(boost::fusion::pfr_fields(a), [](auto val) {
	std::cout << val << " ";
}); 

Will print "100 200 300 " because boost::fusion::pfr_fields is intended to indicate that boost.fusion MUST serialize value using boost.pfr library. This approach do ignore another ways to serialize value and work only with pfr library.

For a structure that is not fusion-able, it makes no difference which way to choose, because boost::fusion::pfr and boost::fusion::pfr_fields behave the same in this case - both look to pfr for serialization.

@djowel what do you say about this? PS Inspired by boost::pfr::io && boost::pfr::io_fields pair from the pfr library. https://www.boost.org/doc/libs/1_75_0/doc/html/boost_pfr/tutorial.html#boost_pfr.tutorial.three_ways_of_getting_operators

denzor200

comment created time in 19 days

pull request commentboostorg/fusion

#231 Added pfr extension

Hello everyone! This PR will be extended in the future. I suppose, we need an alternative way to tell fusion that structure must be serialized by pfr, it's way without 'adapt' macro.

#include <iostream>
#include <boost/spirit/home/x3.hpp>
#include <boost/fusion/adapted/pfr.hpp>
 
constexpr std::string_view str = "100 200";
 
struct A
{
    int first;
    int second;
};

/// No BOOST_FUSION_ADAPT_STRUCT here! And no BOOST_FUSION_ADAPT_PFR too..
 
int main()
{
    A rec;
    auto iter = str.begin();
    auto const end = str.end();
    using boost::spirit::x3::int_;
    bool r = boost::spirit::x3::parse(iter, end, int_ >> ' ' >> int_, boost::fusion::pfr(rec));
    std::cout << "done (" << std::boolalpha << (r && iter == end) << ")" << std::endl;
    return 0;
}
#include <iostream>
#include <boost/spirit/home/x3.hpp>
#include <boost/fusion/adapted/pfr.hpp>

constexpr std::string_view str = "100 200";

struct A
{
    int first;
    int second;
};

boost::spirit::x3::rule<class test, boost::fusion::pfr_reference<A>> const test = "test";
auto const test_def = boost::spirit::x3::int_ >> ' ' >> boost::spirit::x3::int_;
BOOST_SPIRIT_DEFINE(test);

int main()
{
    A rec;
    auto iter = str.begin();
    auto const end = str.end();
    bool r = boost::spirit::x3::parse(iter, end, test, boost::fusion::pfr(rec));
    std::cout << "done (" << std::boolalpha << (r && iter == end) << ")" << std::endl;
    return 0;
}
denzor200

comment created time in a month

issue openedboostorg/spirit

Is there a `x3::position_tagged` without inheritance?

Is it possible to add the x3::position_tagged attribute to a custom structure without applying inheritance? If it's not possible, it question should resolve, because in the future BOOST PFR library maybe will be used on the Spirit side (The corresponding PR has already been created in the neighboring Fusion repository)

Recall that the pfr library is not able to work with inherited structures, the presence of inheritance for this library is not acceptable.

If this issue has not been resolved yet, I suggest solving it using composition instead of inheritance:

struct employee
{
	int age;
	person who;
	double salary;
        x3::position_tagged __position_tagged;
};

/// The library is aware of all the fields as they are listed in the BOOST_FUSION_ADAPT_STRUCT macro.
/// Among these fields, a search is performed for the field whose type corresponds to x3::position_tagged, the name of the field is not important.
/// Now this construction looks strange, but in the future the fields will be automatically detected using the PFR. The BOOST_FUSION_ADAPT_STRUCT macro will not be required
BOOST_FUSION_ADAPT_STRUCT(client::ast::employee,
    age, who, salary, __position_tagged
)

created time in a month

issue commentboostorg/metaparse

[Feature request] value based BOOST_METAPARSE_STRING macro analog

@sabel83 Cool! This is what i need. Thanks

denzor200

comment created time in a month

push eventdenzor200/sqlite_orm

denzor200

commit sha 443248da4ab74bba519a18d094581c1733835260

Implemented 'Every table must have at least one non-generated column' assert

view details

push time in a month

push eventdenzor200/sqlite_orm

denzor200

commit sha 0e22fc41acfb4727db8df4d7c30c230dc0042cdc

Implemented 'Every table must have at least one non-generated column' assert

view details

push time in a month

issue openedboostorg/spirit

Question about optimizer-friendly

Hi. I accidentally discovered that spirit is poorly optimized by the clang compiler, even in a so simple case: https://godbolt.org/z/Y1PhP4qEM Is it possible to do something about this, or is it a problem on the clang compiler side?

created time in a month

issue openedboostorg/metaparse

[Feature request] value based BOOST_METAPARSE_STRING macro analog

Hi. I am using boost::metaparse::string for value-based metaprogramming. For convenience, I created a macro for myself:

#ifdef BOOST_METAPARSE_MAKE_STRING
#error BOOST_METAPARSE_MAKE_STRING already defined
#endif
#define BOOST_METAPARSE_MAKE_STRING(S) (BOOST_METAPARSE_STRING(S){})

This macro allows me to write such statements succinctly and without unnecessary parentheses:

field<int, (name=BOOST_METAPARSE_MAKE_STRING("id"))> index;
field<std::string, (name=BOOST_METAPARSE_MAKE_STRING("user"))> username;

In modern C++(example above is C++17), the value-based metaprogramming approach is very often used. I believe that this macro will be useful not only for me. Why not add it to the library?

created time in a month

create barnchdenzor200/field

branch : main

created branch time in 2 months

created repositorydenzor200/field

created time in 2 months

push eventdenzor200/sqlite_orm

denzor200

commit sha 1ddc09c7640725204771a0de393faae4b144e5dc

clang-format

view details

push time in 2 months

push eventdenzor200/sqlite_orm

denzor200

commit sha 212d56ef9199917f099858d39a07d429ea17a98f

clang-format

view details

push time in 2 months

push eventdenzor200/sqlite_orm

denzor200

commit sha 721f45f0bddbe1f95a5428e099ca975971907b93

Resolved some discusstions

view details

push time in 2 months

push eventdenzor200/sqlite_orm

denzor200

commit sha 445e7e5e823168c9a3de7d22372703e3782841ec

Edited Cmake format

view details

push time in 2 months

issue commentboostorg/pfr

is it a way to serialize field names?

Continuing the ORM topic.. As a field_t parameter, we can pass any attribute, not just a name:

struct User {
    field<int,                             name=_STR("id"), autoincrement, primary_key>          id;
    field<std::string,                     name=_STR("login"), unique>                           login;
    field<int,                             name=_STR("birth_date")>                              birthDate;
    field<std::unique_ptr<std::string>,    name=_STR("image_url")>                               imageUrl;
    field<int,                             name=_STR("type_id")>                                 typeId;
};
denzor200

comment created time in 2 months

issue commentboostorg/pfr

is it a way to serialize field names?

Also, this approach allows us to to make field with N names. For example, each field has:

  • default name
  • boost.serialization's name
  • Some orm's name
struct gps_position
{
    field<int, (name=_STR("degrees")), (serialization_name=_STR("sdegrees")), (orm_name=_STR("odegrees"))> degrees;
    field<int, (name=_STR("minutes")), (serialization_name=_STR("sminutes")), (orm_name=_STR("ominutes"))> minutes;
    field<float, (name=_STR("seconds")), (serialization_name=_STR("sseconds")), (orm_name=_STR("oseconds"))> seconds;
};

Also we can bind a C++ keyword as field name:

struct A
{
   field<std::string, (name=_STR("new"))> _new;
};
denzor200

comment created time in 2 months

issue openedboostorg/pfr

is it a way to serialize field names?

#ifdef _STR
#  error _STR already defined
#endif
#define _STR(S) BOOST_METAPARSE_STRING(S){}

struct gps_position
{
    field<int, (name=_STR("degrees"))> degrees;
    field<int, (name=_STR("minutes"))> minutes;
    field<float, (name=_STR("seconds"))> seconds;
};

We need to:

  1. field<T, A> template class, this class is just a wrapper to T with std::reference_wrapper-like(??) iface.
  2. name object with overloaded operator=(std::string_view), and this overloaded operator must be constexpr

This short example: https://godbolt.org/z/nT4bdrnKc Interface of field_t<T,A> class is not ideal, but this short example shows that structure with named fields are possible.

created time in 2 months

push eventdenzor200/pfr

Antony Polukhin

commit sha c9674f61642073f13cd3b7a33a9adc21d96fa43f

use a murmur based implementation of hash_combine() to reduce collisions count

view details

Antony Polukhin

commit sha 9c812d42178498332906408e1f18d734cd054523

add missing include

view details

Antony Polukhin

commit sha 94315117fa61113b169a9be4d33a29215f43b178

disable clang-9 CI tests in c++2a mode because of the issues with comparisons in chrono

view details

Peter Dimov

commit sha da12b52759ea52c3e2341690f208fea898643bbb

Add CMakeLists.txt

view details

Antony Polukhin

commit sha 444094f20d0a38bf44eafdd578cc0160224f5553

add helper script to remove boost namespace from the library and smoke-test the result

view details

Antony Polukhin

commit sha b4bee46c542b25aa8418ec34c78def7e146e9ac4

Merge github.com:boostorg/pfr into develop

view details

Antony Polukhin

commit sha 2a1b2062444299f664bd3bdb9866db66c67a4f12

temporary disable inspect tool, as it is broken in develop

view details

Antony Polukhin

commit sha 12f2b3a365398d56140cd8fb40187f1e141e5261

CI fixes

view details

Antony Polukhin

commit sha e51a594dbb1e3820aa1ef3bb96504b0589c739b9

fix strip_boost_namespace.sh work if target pathh is missing

view details

Antony Polukhin

commit sha e75c066ddc447b5f41ca049a2921a0d0dfb0b13e

freestanding docs anc CI fixes

view details

Antony Polukhin

commit sha 4d9294cb1fd72eb995e69708f22346f73b905a38

final polishings for of boost-free version

view details

Antony Polukhin

commit sha 0436e48a7940b1de190b5065e0211f901a5b60de

Restore inspect tool runs

view details

Aleksei Romanov

commit sha d1e7e87a31e2b794783f23270c63219cf33be8f1

workaround for msvc compilers <= 1920

view details

Antony Polukhin

commit sha 87c9c2d76c09115a135498f755df78db55481a1e

Merge pull request #88 from alexey-romanov/develop workaround for msvc compilers <= 1920

view details

denzor200

commit sha eb181b2dc954a15459d19774735b4d4c0df4d0ee

Merge remote-tracking branch 'origin/develop' into GCC-7

view details

push time in 2 months

push eventdenzor200/pfr

Aleksei Romanov

commit sha d1e7e87a31e2b794783f23270c63219cf33be8f1

workaround for msvc compilers <= 1920

view details

Antony Polukhin

commit sha 87c9c2d76c09115a135498f755df78db55481a1e

Merge pull request #88 from alexey-romanov/develop workaround for msvc compilers <= 1920

view details

push time in 2 months

issue commentboostorg/serialization

[Feature request] Automatic aggregate serialization

#ifdef _STR
#  error _STR already defined
#endif
#define _STR(S) BOOST_METAPARSE_STRING(S){}

struct gps_position
{
    field<int, (name = _STR("degrees"))> degrees;
    field<int, (name = _STR("minutes"))> minutes;
    field<float, (name = _STR("seconds"))> seconds;

    template<class Archive>
    void serialize(Archive& ar, const unsigned int /* file_version */) {
        serialize_named_aggregate(ar, *this);
    }
};

// TODO: use BOOST_PFR_FUNCTIONS_FOR
std::ostream& operator<<(std::ostream& os, const gps_position& gp)
{
    return os << ' ' << gp.degrees.data() << (unsigned char)186 << gp.minutes.data() << '\'' << gp.seconds.data() << '"';
}
denzor200

comment created time in 2 months