Home » Community » Newbie corner » Ini file
Re: Ini file [message #58112 is a reply to message #58111] |
Wed, 16 February 2022 14:31   |
jjacksonRIAB
Messages: 227 Registered: June 2011
|
Experienced Member |
|
|
Ahh yeah, I see what's going on. I'm using -std=c++2a for a later version of C++ which apparently doesn't require you to type in the template parameters. My bad for forgetting that not everyone is using later stuff.
If you don't want to have to do KeyValueRef<String, String> you can just use auto type deduction instead.
for(auto pair : ~kv) {
out << Format("%s=%s\n", pair.key, pair.value);
}
Apparently that's been the case since C++17 and I just never stumbled on it. Technically in c++17 onward you can also do
VectorMap vm = GetIniKeys();
and it will auto-deduce the template parameters for you. Anyway: cheers!
[Updated on: Wed, 16 February 2022 14:52] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Thu May 01 01:13:46 CEST 2025
Total time taken to generate the page: 0.00900 seconds
|