daily pastebin goal
14%
SHARE
TWEET

Untitled

a guest Dec 16th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifndef TEST_HPP
  2. #define TEST_HPP
  3.  
  4. class TestClass {
  5. public:
  6.     /** Constructor Version 1 */
  7.     TestClass() : v{0,0,0} { }
  8.  
  9.     /** Constructor Version 2 */
  10.     // TestClass() {
  11.     //     v[0] = 0;
  12.     //     v[1] = 0;
  13.     //     v[2] = 0;
  14.     // }
  15. protected:
  16.     /** my little array */
  17.     float[3] v;
  18. };
  19.  
  20. #endif // TEST_HPP
  21.    
  22. // not parsed correctly by doxygen 1.8.5
  23. class X
  24. {
  25. public:
  26.   typedef std::initializer_list<double> DoublesInitializer;
  27.   typedef std::initializer_list<int   >    IntsInitializer;
  28.  
  29.   X(DoublesInitializer d, IntsInitializer i={}) : d_(d), i_(i) {}
  30.   X(IntsInitializer i) : X({},i) {}
  31.  
  32. private:
  33.   const std::list<double> d_;
  34.   const std::list<int   > i_;
  35. };
  36.    
  37. {}
  38.  
  39. private:
  40.   const std::list<double> d_
  41.    
  42. // parsed correctly by doxygen 1.8.5
  43. class Y
  44. {
  45. public:
  46.   typedef std::initializer_list<double> DoublesInitializer;
  47.   typedef std::initializer_list<int   >    IntsInitializer;
  48.  
  49.   Y(DoublesInitializer d, IntsInitializer i={}) : d_(d), i_(i) {}
  50.   Y(IntsInitializer i) : Y(DoublesInitializer(),i) {}
  51.  
  52. private:
  53.   const std::list<double> d_;
  54.   const std::list<int   > i_;
  55. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top