Timeline for static const in c++ class: undefined reference
Current License: CC BY-SA 3.0
21 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 17, 2022 at 10:07 | answer | added | Timmmm | timeline score: 0 | |
May 20, 2019 at 12:03 | answer | added | Jodo | timeline score: 2 | |
Jun 23, 2016 at 8:24 | review | Close votes | |||
Jun 27, 2016 at 0:06 | |||||
Jun 23, 2016 at 8:10 | answer | added | PcAF | timeline score: 4 | |
Jun 23, 2016 at 8:08 | comment | added | manlio | Possible duplicate of Undefined reference to static class member | |
Oct 2, 2014 at 15:59 | answer | added | Kemin Zhou | timeline score: 0 | |
Jun 6, 2013 at 9:16 | comment | added | user2379182 |
I am using icpc - intel C compiler.
|
|
Jun 6, 2013 at 9:12 | comment | added | juanchopanza | @billz strange, I can't reproduce on my gcc 4.8 snapshot. | |
Jun 6, 2013 at 9:10 | review | Close votes | |||
Oct 30, 2013 at 3:02 | |||||
Jun 6, 2013 at 8:59 | vote | accept | CommunityBot | ||
Jun 6, 2013 at 8:57 | comment | added | billz | I reproduced it on gcc4.8 | |
Jun 6, 2013 at 8:57 | comment | added | gx_ | "I modified this example from my code." => But did you check at least that you actually get the posted error with your posted code? (I ask because I can't reproduce the error.) | |
Jun 6, 2013 at 8:56 | comment | added | djf | Compiles just fine: ideone.com/2LlrHt | |
Jun 6, 2013 at 8:55 | comment | added | juanchopanza | How did you build this? I cannot reproduce the problem with gcc 4.7.3. | |
Jun 6, 2013 at 8:52 | comment | added | billz | possible dup of: stackoverflow.com/questions/5391973/… | |
Jun 6, 2013 at 8:52 | comment | added | user2379182 |
related answer (not dup) the special status of static ints : stackoverflow.com/a/1312267/2379182
|
|
Jun 6, 2013 at 8:51 | comment | added | user2379182 |
@KerrekSB - in general you are right. I modified this example from my code. There b was not int and therefore I needed to explicitly specify the template argument.
|
|
Jun 6, 2013 at 8:49 | answer | added | pserg | timeline score: 6 | |
Jun 6, 2013 at 8:46 | answer | added | gx_ | timeline score: 26 | |
Jun 6, 2013 at 8:46 | comment | added | Kerrek SB |
Don't specify function template arguments. Just std::min(A::MY_CONST, b) , it's cleaner.
|
|
Jun 6, 2013 at 8:41 | history | asked | user2379182 | CC BY-SA 3.0 |