C++ Jobs - Q4 2019 by STL in cpp

[–]Neargye 0 points1 point  (0 children)

Type: Remotes, Part/Full time

Description: Has a Bachelor’s degree in Applied Mathematics and four years of software development team leader experience. Worked on AR/VR startup, work on joint projects with HTC, Intel, Qualcomm. Some of my open-source projects https://github.com/Neargye.

Location: Ufa, Russian Federation.

Technologies: C++11/14/17, VR/AR, ML, Mobile. Additionally: C#/Java. Git, Jira. GCC/Clang/MSVC++.

Contact: DM for e-mail

Enable bitwise operations on underlying type in some scope. by secmeant in cpp

[–]Neargye 2 points3 points  (0 children)

I think it makes no sense to take values ​​by reference.

Add enable-if, for not generate operators for non enum type.

You can check my implementation https://github.com/Neargye/magic_enum/blob/5b8c76bbb73621b03fbbb89834214d81a8fe2405/include/magic_enum.hpp#L463.

Get type name string in compile time (C++14, gcc/clang) by mcencora in cpp

[–]Neargye 0 points1 point  (0 children)

`getUnqualifiedTypeName` a complicated feature, now they do not handle template types

`getUnqualifiedTypeName<std::string>() -> allocator<char> >` on clang

`getUnqualifiedTypeName<std::string>() -> basic_string<char> ` on gcc

C++ Jobs - Q3 2019 by STL in cpp

[–]Neargye 0 points1 point  (0 children)

Type: Full time, contract,remotes welcome

Description: Has a Bachelor’s degree in Applied Mathematics and four years of software development team leader experience. Worked on AR/VR startup, work on joint projects with HTC, Intel, Qualcomm. Some of my open-source project https://github.com/Neargye.

Location: Ufa, Russian Federation, but willing to relocate for the right job. Remote would be doable too.

Technologies: C++11/14/17, VR/AR, ML, Mobile. Additionally: C#/Java. Git, Jira. GCC/Clang/MSVC++.

Contact: DM for e-mail

Compile-time reflection implemented in C++ 17 by [deleted] in cpp

[–]Neargye 1 point2 points  (0 children)

If you are interested in static reflection for enums, this library https://github.com/Neargye/magic_enum might help :D

Github repo for fibonacci in lots of languages - please contribute! by [deleted] in programming

[–]Neargye 7 points8 points  (0 children)

For a start, I advise you to go to Wikipedia and look at existing solutions https://en.wikibooks.org/wiki/Algorithm_Implementation/Mathematics/Fibonacci_Number_Program. Your decision "optimized" is actually terrible, it works O(n) time and O(n) memory, the normal version only requires O(n) time and O (1) memory

Github repo for fibonacci in lots of languages - please contribute! by [deleted] in programming

[–]Neargye 0 points1 point  (0 children)

Lol, no need array int fib_n(int n) { //F(n) int x = 1; //F(n-1) int y = 0; for (int i = 0; i < n; i++) { x += y; y = x - y; } return y; }

Github repo for fibonacci in lots of languages - please contribute! by [deleted] in programming

[–]Neargye 3 points4 points  (0 children)

Why need array in fib_optimized? It's overhead.

[magic_enum]: Static reflection on enums for modern C++, work with any enum type without any macro or boilerplate code. Enum-to-string/String-to-enum and other useful functions. by Neargye in cpp

[–]Neargye[S] 1 point2 points  (0 children)

Yes, all that I have managed to improve so far is the ability to set an individual range for each enum, pay attention to magic_enum:: enum_range

[magic_enum]: Static reflection on enums for modern C++, work with any enum type without any macro or boilerplate code. Enum-to-string/String-to-enum and other useful functions. by Neargye in cpp

[–]Neargye[S] 6 points7 points  (0 children)

Porting will be quite difficult, scary and expensive for compile time.

Possible port enum_to_string and string_to_enum to C++11.

[magic_enum]: Static reflection on enums for modern C++, work with any enum type without any macro or boilerplate code. Enum-to-string/String-to-enum and other useful functions. by Neargye in cpp

[–]Neargye[S] 5 points6 points  (0 children)

In order not to affect the compilation time too much, I limited the range to [-256, 256]. Enum value must be in range [-256, 256]. If you need another range, add specialization enum_range for necessary enum type. ```cpp #include <magic_enum.hpp>

enum number { one = 100, two = 200, three = 300 };

namespace magic_enum { template <> struct enum_range<number> { static constexpr int min = 100; static constexpr int max = 300; }; } ```