Questions tagged as 'c++17'

1
answer

Is there a problem in declaring many noexcept functions?

I see many C ++ code in which the programmer is sure that the function is going to throw an exception, but does not tell this to the compiler, perhaps because it can cause some problem in reporting many functions like noexcept? Is there any prob...
asked by 27.11.2018 / 02:45
1
answer

What is the difference between "string_view" for "string" and which one should you prefer?

What's the difference between the new C ++ class and 17 string_view for string ? In what situations is the use of string_view indicated instead of string ?     
asked by 22.08.2018 / 20:22
1
answer

What is the noexcept keyword and when to use it?

What does keyword noexcept in C ++ and in what situation should it be used?     
asked by 07.07.2018 / 23:15
1
answer

How to use a template as a type on a map?

Is there any way to use template as type in a map in C ++ 17? template<typename T> std::map<std::string, T/* tipo desconhecido, pode ser qualquer tipo */> map_exemplo;     
asked by 01.10.2018 / 18:39
1
answer

How do I put strings of type 'char32_t' and 'char16_t' in the console in C ++?

In the new C ++ 17 they added the characters char32_t and char16_t , they also added 'u16string' and 'u32string', but they did not create any way to put them on the console screen. For example: int main() { std::u16string u1...
asked by 13.08.2018 / 03:19
1
answer

How much can an unodered_map access cost hamper the performance of a game?

Can access cost to unordered_map cause FPS drop in a game if accessed thousands of times per second? class var { public: template < typename t = double > static inline auto get( const std::string& var_name ) -> t&a...
asked by 02.08.2018 / 19:15