SHARE
TWEET

Untitled

a guest Jul 26th, 2011 78 Never
  1. % cat variadic.cpp
  2. template <typename... TS>
  3. void do_stuff(TS... ts)
  4. {
  5.   auto f = [](TS... things) { };
  6. }
  7.  
  8. int main () {
  9.     do_stuff(10,20,30);
  10. }
  11.  
  12.  
  13. % LANG=C make CXXFLAGS="-std=c++0x -ggdb -Wall -Wextra -Wpacked" CXX=/home/evnu/bin/g++ variadic
  14. /home/evnu/bin/g++ -std=c++0x -ggdb -Wall -Wextra -Wpacked    variadic.cpp   -o variadic
  15. variadic.cpp: In instantiation of 'void do_stuff(TS ...) [with TS = {int, int, int}]':
  16. variadic.cpp:8:22:   required from here
  17. variadic.cpp:4:8: warning: variable 'f' set but not used [-Wunused-but-set-variable]
  18. variadic.cpp:2:6: warning: unused parameter 'ts#0' [-Wunused-parameter]
  19. variadic.cpp:2:6: warning: unused parameter 'ts#1' [-Wunused-parameter]
  20. variadic.cpp:2:6: warning: unused parameter 'ts#2' [-Wunused-parameter]
RAW Paste Data
Top