C++ 20 expert -- to convert existing code -- 2
Budget: $10 – $80 USD
The goal is to make some changes, taking advantage of what C++ 20 has to offer:
- Add a template <typename T> and concept Integral to create a concept for checking if a type is integral.
- Modify the is_digit function to use the Integral concept.
- Create a coroutine generator<int> generate_random_numbers(std::size_t count) that generates random numbers using coroutines. This is used in the generate_sequence function.
- Change the get_input_sequence function to use the is_digit function with the Integral concept.
- Change the generate_sequence function to use the generate_random_numbers coroutine to add a random digit to the previous sequence.
- Use modules instead of include files.
Please check the source code attached. You need Visual Studio 2022. The code you deliver should be based on that code and perform the same. It should also be multi platform like the original code.
- Add a template <typename T> and concept Integral to create a concept for checking if a type is integral.
- Modify the is_digit function to use the Integral concept.
- Create a coroutine generator<int> generate_random_numbers(std::size_t count) that generates random numbers using coroutines. This is used in the generate_sequence function.
- Change the get_input_sequence function to use the is_digit function with the Integral concept.
- Change the generate_sequence function to use the generate_random_numbers coroutine to add a random digit to the previous sequence.
- Use modules instead of include files.
Please check the source code attached. You need Visual Studio 2022. The code you deliver should be based on that code and perform the same. It should also be multi platform like the original code.