Updated Examples and Recipes (markdown)

Howard Hinnant
2017-04-17 12:48:16 -04:00
parent 0b2e54a561
commit 6691fc2b9f

@@ -1591,7 +1591,7 @@ Once we have a string of form 2), give this sample code a try (thank you [Aaron]
#include <string>
#include "tz.h"
void main()
int main()
{
using namespace std;
using namespace date;
@@ -1601,7 +1601,7 @@ Once we have a string of form 2), give this sample code a try (thank you [Aaron]
// Using local_seconds would resolve in ambiguous date exception
sys_seconds tp;
string tz_name;
parse(inputStream, "%F %T %Ez %Z", tp, tz_name);
inputStream >> parse("%F %T %Ez %Z", tp, tz_name);
// bool operator tells us whether stream was successfully parsed
assert(bool(inputStream));