Home » Community » U++ community news and announcements » get_i
Re: get_i [message #54266 is a reply to message #54265] |
Wed, 17 June 2020 07:50   |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
Code below works for all data types, including const char*.
template <class T, class V>
constexpr auto decode(const T& sel, const V& def)
{
return def;
}
template <class T, class K, class V, typename... L>
constexpr auto decode(const T& sel, const K& k, const V& v, const L& ...args)
{
return sel == k ? v : decode(sel, args...);
}
Regards,
Novo
|
|
|
 |
|
get_i
By: mirek on Sun, 14 June 2020 19:10
|
 |
|
Re: get_i
By: Novo on Tue, 16 June 2020 17:45
|
 |
|
Re: get_i
By: mirek on Tue, 16 June 2020 17:52
|
 |
|
Re: get_i
By: Novo on Tue, 16 June 2020 18:02
|
 |
|
Re: get_i
By: Novo on Tue, 16 June 2020 18:21
|
 |
|
Re: get_i
By: mirek on Tue, 16 June 2020 21:20
|
 |
|
Re: get_i
By: Novo on Tue, 16 June 2020 22:15
|
 |
|
Re: get_i
By: mirek on Wed, 17 June 2020 00:01
|
 |
|
Re: get_i
By: Novo on Wed, 17 June 2020 07:01
|
 |
|
Re: get_i
By: Novo on Wed, 17 June 2020 07:09
|
 |
|
Re: get_i
By: Novo on Wed, 17 June 2020 07:23
|
 |
|
Re: get_i
By: Novo on Wed, 17 June 2020 07:50
|
 |
|
Re: get_i
By: mirek on Wed, 17 June 2020 09:35
|
 |
|
Re: get_i
By: mirek on Wed, 17 June 2020 13:03
|
 |
|
Re: get_i
By: Novo on Wed, 17 June 2020 19:00
|
 |
|
Re: get_i
By: Novo on Wed, 17 June 2020 19:14
|
 |
|
Re: get_i
By: mirek on Wed, 17 June 2020 21:03
|
 |
|
Re: get_i
By: Novo on Wed, 17 June 2020 23:21
|
 |
|
Re: get_i
By: Novo on Wed, 17 June 2020 23:59
|
 |
|
Re: get_i
By: mirek on Thu, 18 June 2020 08:39
|
 |
|
Re: get_i
By: Novo on Thu, 18 June 2020 23:56
|
 |
|
Re: get_i
By: Novo on Tue, 16 June 2020 21:22
|
 |
|
Re: get_i
By: mirek on Tue, 16 June 2020 21:25
|
 |
|
Re: get_i
By: Novo on Tue, 16 June 2020 21:42
|
 |
|
Re: get_i
By: Novo on Wed, 17 June 2020 06:39
|
 |
|
Re: get_i
By: mirek on Mon, 29 June 2020 19:23
|
 |
|
Re: get_i
By: Novo on Thu, 02 July 2020 22:08
|
 |
|
Re: get_i
By: mirek on Fri, 03 July 2020 09:38
|
 |
|
Re: get_i
By: Novo on Fri, 03 July 2020 18:53
|
 |
|
Re: get_i
By: mirek on Fri, 03 July 2020 19:03
|
Goto Forum:
Current Time: Wed Apr 30 01:02:05 CEST 2025
Total time taken to generate the page: 0.04254 seconds
|