Created
June 2, 2018 16:56
-
-
Save friedmud/fc12e37974b2d3c5ebdf9a428d235beb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <tuple> | |
template <class... Ts> | |
void acceptsTuple(std::tuple<Ts...> values) | |
{ | |
std::cout << std::get<0>(values) << std::get<1>(values); | |
} | |
template <class... Ts> | |
class AcceptsTuple | |
{ | |
public: | |
void acceptsTuple(std::tuple<Ts...> values) | |
{ | |
std::cout << std::get<0>(values) << std::get<1>(values); | |
} | |
}; | |
int main() | |
{ | |
acceptsTuple<std::string, double>({"stuff", 1.2}); | |
AcceptsTuple<std::string, double> at; | |
at.acceptsTuple({"stuff", 1.2}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also works fine with the newest intel compiler available on Falcon:
icc/2018.1.163-GCC-6.4.0-2.28