質問編集履歴

1

よく考えたらデータメンバ要らなかったので削除

2023/03/30 06:52

投稿

dameo
dameo

スコア995

test CHANGED
File without changes
test CHANGED
@@ -65,16 +65,10 @@
65
65
  #define LITERAL_CLASS(NAME, VALUE) \
66
66
  template<typename T> \
67
67
  struct NAME { \
68
- static const char* const str; \
69
- static const wchar_t* const wstr; \
70
68
  static const T* value(); \
71
69
  }; \
72
- template<typename T> \
73
- const char* const NAME<T>::str = VALUE; \
74
- template<typename T> \
75
- const wchar_t* const NAME<T>::wstr = L##VALUE; \
76
- template<> const char* NAME<char>::value() {return str;} \
70
+ template<> const char* NAME<char>::value() {return VALUE;} \
77
- template<> const wchar_t* NAME<wchar_t>::value() {return wstr;}
71
+ template<> const wchar_t* NAME<wchar_t>::value() {return L##VALUE;}
78
72
  LITERAL_CLASS(jp_bra, "「")
79
73
  LITERAL_CLASS(jp_ket, "」")
80
74
  template<typename Char>