Are notes and examples in the core language specification of the C++ Standard non-normative?

See ยง6.5 of the ISO/IEC Directives Part 2. Notes, examples, and footnotes are all considered “informational”, as opposed to “normative”. For notes and examples: Notes and examples integrated in the text of a document shall only be used for giving additional information intended to assist the understanding or use of the document. They shall not … Read more

Why an unnamed namespace is a “superior” alternative to static? [duplicate]

As you’ve mentioned, namespace works for anything, not just for functions and objects. As Greg has pointed out, static means too many things already. Namespaces provide a uniform and consistent way of controlling visibility at the global scope. You don’t have to use different tools for the same thing. When using an anonymous namespace, the … Read more

ISO to datetime object: ‘z’ is a bad directive [duplicate]

Welcome to Python datetime! Dealing with dates and times is necessarily complex, and Python doesn’t come fully with batteries included in this case. You can’t use %z in strptime because Python has no classes to represent timezones (you are supposed to implement your own, or better yet include some other libraries). You want to use … Read more

Converting an ISO 8601 timestamp into an NSDate: How does one deal with the UTC time offset?

No need to remove the :’s. To handle the “00:00” style timezone, you just need “ZZZZ”: Swift let dateString = “2014-07-06T07:59:00Z” let dateFormatter = NSDateFormatter() dateFormatter.locale = NSLocale(localeIdentifier: “en_US_POSIX”) dateFormatter.dateFormat = “yyyy-MM-dd’T’HH:mm:ssZZZZ” dateFormatter.dateFromString(dateString) Objective-C NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; dateFormat.locale = [[NSLocale alloc] initWithLocaleIdentifier:@”en_US_POSIX”]; NSString *input = @”2013-05-08T19:03:53+00:00″; [dateFormat setDateFormat:@”yyyy-MM-dd’T’HH:mm:ssZZZZ”]; //iso 8601 format NSDate … Read more