Can we apply content not explicitly cited from the normative references to the C++ standard?

The function of the Normative References section of an ISO standard document is defined in ISO/IEC Directives, Part 2, 2011 §6.2.2: 6.2.2 Normative references This conditional element shall give a list of the referenced documents cited (see 6.6.7.5) in the document in such a way as to make them indispensable for the application of the … Read more

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

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