C ++ N4741 (287) 23.17.10.3.1 Class nonexistent_local_time [time.zone.exception.nonexist] p719

Introduction (Introduction)

C++N4741 Working Draft, Standard for Programming Language C++
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4741.pdf

C ++ N4741 is the working draft of ISO/IEC JTC1 SC22 WG21 (Working Draft).

It is not an official ISO/IEC 14882 original.

In ISO/IEC JTC1 SC22 WG21, published a working document as much as possible, looking for a wide range of opinion.

Compilation series of articles is to consider how to form that can compile the code fragment, link, run, original and processing system of the draft standard (g ++, Clang ++) to make a difference and, considering the technical details, it used to be fed back to the ISO/IEC JTC1 SC22 WG21.

Hosted environment, such as Linux OS, or to confirm the function and role of C ++ in a freestanding environment, such as TOPPERS kernel, we are considering the re-use by the template of the CPU of the description due to system C.

CERT C ++, we believe that it Itadako by the reference when compiling the coding standard of the code fragment such as MISRA C ++. CERT C ++, MISRA C ++ is fortunate if it can be confirmed if there is a time lag between the motion of standardization. In addition, the context of the boost library, g ++ (GCC), is also under investigation relationship with the clang ++ (LLVM).

Something, omission, we hope give us News If you have any Essential reading information.

Background (back ground)

When the compilation errors appear in the C/C ++, it may often be bewildering.

Once to several times, you can find the appropriate error.

But, they have different conditions, it is also often do not achieve the purpose is there in the correction method. For compilation errors and the corresponding method of the various conditions, by widely record, we aim to stand to bake when you encounter sometime same error.

Between the last six months, three times, it may be helped to record in their own net.

Also scoring 10 or more types that could not be resolved in the past, you may have can be solved recently. It is based mainly on the following four pieces of information.

https://stackoverflow.com
https://cpprefjp.github.io
http://ja.cppreference.com/
https://teratail.com/

The
https://researchmap.jp/joub9b3my-1797580/#_1797580

has taken care of the site described.

Work policy (sequence)

Clang ++ In -std = c ++ 03, c ++ 17, 3 types of C ++ 2a

2 kinds of g ++ in -std = c ++ 03, c ++ 17

compiled,

1) to collect the compilation error.

2) to consider how to eliminate the compile error.

Code only purpose of illustrating an example in which a compilation error, rather than eliminate the compilation errors to only collect the type of compilation errors.

If the code is the purpose of the show the syntax, if it takes time and effort to eliminate the compile error, sequentially work.

3) to consider how to eliminate the link error.

If the code is the purpose of the show the syntax, if the time-consuming to eliminate the link error, and sequentially work.

4) meaningful produce an output.

Compile, even through links, and to try to show a meaningful output, it may be compile and link error unlikely to be settling out. Sequentially work.

1) various some state that the proceeds from only one 4) up. We look forward to your advice to go forward even one step. We try to record the current situation in the column of "considerations".

Coding standard correspondence

As a code under preparation for consideration of coding standards,

that it is better you have the initialization observe the coding standard

there is a way of thinking.

Here, on the contrary, there is a purpose that want to make sure whether the compiler warning how much help to the coding standard inspection.

Something even if using a special compiler, consider the future of portability,

G Tasutasu, Clang Tasutasu, or can be compiled in three types of compiler of visual C ++,

three kinds of compiler warnings want to make sure or not help.

Reason not to initialize

Often variables are not initialized.

Even when the initialization, we are as much as possible instead of 0, 1, substituting the number of otherwise. Compiler, or give what kind of warning, or in some cases is to ascertain and whether to compile error.

It is not the example that I want you to actually write this kind of code.

Reason to run

The meaning to be executed is running too much of is unlikely code is the purpose of collecting the error at the time of execution. Even through the compile and link, to collect what is likely to occur in the run-time error.

By any chance, and mechanisms to link at the time of execution, if we secure the space, you may not know the behavior If you do not run.

Compile fix for the first time of the CEDD (Compile Error Driven Design) 8 times.
https://qiita.com/kaizen_nagoya/items/9494236aa1753f3fd1e1

Because of compilation errors may be recorded seven
https://qiita.com/kaizen_nagoya/items/85c0e92b206883140e89

C++N4741, 2018 Standard Working Draft on ISO/IEC 14882 sample code compile list

https://qiita.com/kaizen_nagoya/items/3294c014044550896010

C ++ N4606, 2016 the code fragment compiled a list (example code compile list)

C++N4606, 2016 Working Draft 2016, ISO/IEC 14882, C++ standard(1) Example code compile list
https://qiita.com/kaizen_nagoya/items/df5d62c35bd6ed1c3d43/

C++N3242, 2011 sample code compile list on clang++ and g++

https://qiita.com/kaizen_nagoya/items/685b5c1a2c17c1bf1318

Compilation unit (Compiler)

clang++ --version

clang version 6.0.0 (tags/RELEASE_600/final)

Target: x86_64-apple-darwin17.4.0

g++-8 --version

g++-8 (Homebrew GCC 8.1.0) 8.1.0

Copyright (C) 2018 Free Software Foundation, Inc.

(287)23.17.10.3.1 Class nonexistent_local_time [time.zone.exception.nonexist]p719

No examples at C++N4606, 2016

No examples at C++N3242, 2011

p719.cpp

Calculated score (source code)

p719.cpp
//C++N4741 Committee Draft, Standard for Programming Language C++
 //http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n741.pdf
 const char* msg= "C++N4741(287)23.17.10.3.1 Class nonexistent_local_time [time.zone.exception.nonexist]p719.cpp";
 //Edited by Dr. Ogawa Kiyoshi. Compile procedure and results record.
 #include <chrono>

#include <iostream>
#include <cstdlib>
using namespace std;

int main() {
using namespace std::chrono;
try {
auto zt = zoned_time{"America/New_York",
local_days{Sunday[2]/March/2016} + 2h + 30min};
} catch (const nonexistent_local_time& e) {
cout << e.what() << '\n';
}
cout << msg << endl;
return EXIT_SUCCESS; }

Compilation and execution result (compile and go)

c1.sh
$ ../c1.sh p719
 $ clang++ p719.cpp  -std=c++2a -Wall
 p719.cpp:14:11: error: use of undeclared identifier 'zoned_time'

auto zt = zoned_time{"America/New_York",
^
p719.cpp:14:21: error: expected ';' at end of declaration auto zt = zoned_time{"America/New_York",
^
; p719.cpp:16:16: error: unknown type name 'nonexistent_local_time'
} catch (const nonexistent_local_time& e) {
^
3 errors generated.

Considerations (agenda)

Helpful or how to take the compilation errors meaningful

other output with a useful or meaning

References (reference)

docker gnu(gcc/g++) and llvm(clang/clang++)
https://qiita.com/drafts/059874ea39c4de64c0f7

[C] two challenges 7 when compiling the examples of international standards draft [C ++].
https://qiita.com/kaizen_nagoya/items/5f4b155030259497c4de

C ++ N4606 Working Draft 2016, ISO/IEC 14882, it is to compile the code fragment of C ++ standard
https://qiita.com/kaizen_nagoya/items/a8d7ee2f2e29e76c19c1

Compiled for the shell script C version (clang and gcc) and C ++ version (clang ++ and Tasutasu G)
https://qiita.com/kaizen_nagoya/items/74220c0577a512c2d7da

Clang/Clang ++ (LLVM) gcc/g ++ (GNU) compiler warnings, such as comparison
https://qiita.com/kaizen_nagoya/items/9a82b958cc3aeef0403f

C ++ 2003 and C ++ does not result in a compilation error in the 2017 case studies
https://qiita.com/kaizen_nagoya/items/a13ea3823441c430edff

C of Style example to post to Qiita (provisional)
https://qiita.com/kaizen_nagoya/items/946df1528a6a1ef2bc0d

compile test the decltype of Cpprefjp
https://qiita.com/kaizen_nagoya/items/090909af702f0d5d8a67

MISRA C++ 5-0-16
https://qiita.com/kaizen_nagoya/items/7df2d4e05db724752a74

C++ Templates Part1 BASICS Chapter 3. Class Templates 3.2 Use of Class Template Stack stack1test.cpp
https://qiita.com/kaizen_nagoya/items/cd5fc49106fad5a4e9ed

ISO/IEC TS 17961:2013 C Secure Coding Rules(1) All list(to be confirmed)
https://qiita.com/kaizen_nagoya/items/54e056195c4f11b850a1

Misunderstanding for the C language (C ++), perversion, lack of understanding, exhilarating.
https://qiita.com/kaizen_nagoya/items/3f3992c9722c1cee2e3a

One grateful Mi 5 of C Puzzle Book, recognizing the characteristics of the C language standard, and C compiler
https://qiita.com/kaizen_nagoya/items/d89a48c1536a02ecdec9

clang ++ macOS encounter any problems with the 'Wchar.H' File Not Found
https://qiita.com/kaizen_nagoya/items/de15cd46d657517fac11

I began to investigate the use of POSIX Test Suite Open
https://qiita.com/kaizen_nagoya/items/644d5e407f5faf96e6dc

MISRA-C 2012 Reference check the availability of the literature that has been published in
https://qiita.com/kaizen_nagoya/items/96dc8b125e462d5575bb

How to compile the MISRA Example Suite doing
https://qiita.com/kaizen_nagoya/items/fbdbff5ff696e2ca7f00

MISRA C Summary #Include
https://qiita.com/kaizen_nagoya/items/f1a79a7cbd281607c7c9

The top 10 can be the consent of the "C ++ thorough understanding guide"
https://qiita.com/kaizen_nagoya/items/aa5744e0c4a8618c7671

Document history (document history)

ver. 0.10 first draft 20180604