Changeset 3105 for trunk/external-alma/atnf/PKSIO/NROReader.cc
- Timestamp:
- 10/04/16 12:42:11 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/atnf/PKSIO/NROReader.cc
r3097 r3105 54 54 #include <string> 55 55 #include <iomanip> 56 #include <cassert> 56 57 57 58 using namespace std ; … … 60 61 // to limit template argument to specified type 61 62 template<class T> 62 constexprinline bool type_guard() {63 inline bool type_guard() { 63 64 return false; 64 65 } 65 66 template<> 66 constexprinline bool type_guard<string>() {67 inline bool type_guard<string>() { 67 68 return true; 68 69 } 69 70 template<> 70 constexprinline bool type_guard<String>() {71 inline bool type_guard<String>() { 71 72 return true; 72 73 } … … 75 76 template<class T> 76 77 inline String trim_nro_string(T const &s) { 77 static_assert(type_guard<T>(), "");78 assert(type_guard<T>()); 78 79 return s.substr(0, s.find_first_of('\0')); 79 80 }
Note: See TracChangeset
for help on using the changeset viewer.