Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Type deduction in VC++
template<typename dataT> class DemographicNode { public: dataT data; template<typename varT> varT count(const varT dataT::* variable = &dataT::citizens) const { return data.*variable; }; }; struct Data { int variable; }; int main() { Data data{42}; DemographicNode<Data> dn{data}; return dn.count(&Data::variable); }
run
|
edit
|
history
|
help
0
Problem_rstring_1
Hangman
std::is_same doesn't check for calling convention
Postfix side effect returning 2
Visual Studio C++ wont accept >> or << past the initial declarations
calling convention is part of type(?)
Copy double[2][3] into vector<vector<double>>
Initializing member array of structs
post_decrement_example
Hangman