ReactiveX / RxCpp

Reactive Extensions for C++
Apache License 2.0
3.03k stars 390 forks source link

enforce C++14 in cmake + added rxcpp::is_same_v C++14 compatible definition ... #581

Open RalphSteinhagen opened 2 years ago

RalphSteinhagen commented 2 years ago

... in view of >=C++17's std::is_same_v

see also post-PR discussion at: https://github.com/ReactiveX/RxCpp/pull/572#issuecomment-1066465190-permalink

I tried to keep it as non-intrusive as possible and defined a rxcpp::is_same_v template pair in rx-trace.cpp since this seems to be the place that most (all?) of the other includes reference. Needed the static constexpr bool ... because C++14 does not allow for 'inline' and since is_same_v is a value and not type trait*.

@guhwanbae @kirkshoop hope and please let me know if this helps with the issue mentioned above.

P.S. *I noticed that the build times are quite large (possibly because of SFINAE, enable_ifs, etc.). Would be worthwhile to perhaps consider moving RxCpp to the current standard (C++20)?? ... more features (concepts), lots of goodies, ranges (that seem to be similar/related to RxCpp), simpler/more succinct code, and faster compile-times. Food for thought.

RalphSteinhagen commented 1 year ago

@kirkshoop @guhwanbae is there an issue with this PR? It has been open for quite some time.

There is already a huge body of implementations available and we are evaluating whether to use RxCpp in other applications (mostly C++20). Having fewer compiler warnings/cleaner code wouldn't harm.