{"id":345075,"date":"2023-02-07T15:01:51","date_gmt":"2023-02-07T15:01:51","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=345075"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2023-02-07T15:01:51","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=345075","title":{"rendered":"<span>\u0422\u043e\u043d\u043a\u043e\u0441\u0442\u0438 C++: \u0438\u0442\u0430\u043a, \u0432\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0441\u2026<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0448\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u044f\u0437\u044b\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u0440\u044f\u0434\u043e\u0432\u043e\u043c\u0443 C++ \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u043e\u0431\u044b\u0434\u0435\u043d\u043d\u0430\u044f \u0432\u0435\u0449\u044c \u2013 forward-\u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/681\/13c\/78f\/68113c78fdd695aab4502db9b37d9497.png\" width=\"780\" height=\"440\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/681\/13c\/78f\/68113c78fdd695aab4502db9b37d9497.png\"\/><figcaption><\/figcaption><\/figure>\n<h3>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u0432\u0435\u0442\u044c\u0442\u0435 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441: \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434?<\/p>\n<pre><code class=\"cpp\">namespace soundtouch {     class SoundTouch     {     public:         class TDStretch *pTDStretch;     };      class TDStretch     {     public:         void *getInput() { return nullptr; }     }; }  auto bbb = soundtouch::TDStretch {};  int main(int argc, char** argv) {     soundtouch::SoundTouch st;     st.pTDStretch = &amp;bbb;     return !!st.pTDStretch->getInput(); }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0441\u043c\u0443\u0442\u0438\u043b\u0430 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f <em>pTDStretch<\/em>, \u0442\u043e \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e \u2013 \u043e\u043d\u0430 \u0441\u043c\u0443\u0442\u0438\u043b\u0430 \u0438 \u043c\u0435\u043d\u044f. \u041d\u043e \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0438, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u0435\u0439 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u043e\u0442\u044b\u0441\u043a\u0430\u043b\u0438 \u0441\u0435\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 (\u0432 \u043d\u0435\u0441\u043e\u043a\u0440\u0430\u0449\u0451\u043d\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435) \u043c\u044b \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043b\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/cpp\/0992\/\">\u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0442\u0438\u043f\u043e\u0432<\/a> \u0432 PVS-Studio. \u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 &#171;\u0434\u0438\u0444\u0444&#187; \u2013 \u044d\u0442\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u0432 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043f\u0440\u0438 \u043f\u0440\u043e\u0433\u043e\u043d\u0435 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435:<\/p>\n<p>V547 Expression &#8216;psp&#8217; is always true. &#8212; MISSING IN CURRENT SoundTouch.cpp 493<\/p>\n<pre><code class=\"cpp\">class SoundTouch : public FIFOProcessor { private:     \/\/\/ Time-stretch class instance     class TDStretch *pTDStretch; };  \/\/\/ Class that does the time-stretch (tempo change) effect for the processed \/\/\/ sound. class TDStretch : public FIFOProcessor { public:     \/\/\/ Returns the input buffer object     FIFOSamplePipe *getInput() { return &amp;inputBuffer; }; };  \/\/\/ Returns number of samples currently unprocessed. uint SoundTouch::numUnprocessedSamples() const {     FIFOSamplePipe * psp;     if (pTDStretch)     {         psp = pTDStretch->getInput();         if (psp)                     \/\/ &lt;=         {             return psp->numSamples();         }     }     return 0; }<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>getInput<\/em> \u0441 \u0435\u0451 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0435\u0439. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 <em>TDStretch<\/em>. \u0418 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u2013 \u043f\u0440\u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435 \u043a\u043e\u0434\u0430 \u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0439\u0442\u0438! \u041d\u043e \u043e\u0442\u043a\u0443\u0434\u0430 \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0438 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044e \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0430\u043d\u044c\u0448\u0435, \u0434\u043e \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u043e\u043a? \u0418 \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0438 \u0435\u0451 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0435? \u0414\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c, \u044d\u0442\u043e \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430, \u0438 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u0423\u043f\u0440\u043e\u0449\u0430\u044e \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f <a href=\"https:\/\/godbolt.org\/z\/c74E1Y696\">Compiler Explorer<\/a> \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e \u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c&#8230; \u0421\u0442\u043e\u043f, \u0447\u0442\u043e?!? \u041e\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f?!? \u041d\u043e \u043f\u043e\u0447\u0435\u043c\u0443? \u0421\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e \u043e\u0431 \u044d\u0442\u043e\u043c \u0442\u0438\u043c\u043b\u0438\u0434\u0430 \u2013 \u043e\u043d \u0442\u043e\u0436\u0435 \u0432 \u043d\u0435\u0434\u043e\u0443\u043c\u0435\u043d\u0438\u0438. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0434\u0442\u0438 \u0438 \u0440\u0430\u0441\u043a\u0430\u043f\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u044b\u0445 \u0440\u0430\u0441\u043a\u043e\u043f\u043e\u043a \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0436\u0435 \u043b\u0435\u0436\u0438\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0443\u043d\u0434\u0443\u043a\u0430&#8230;<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9bc\/635\/bf7\/9bc635bf7b293ec517b2577653c615ca.png\" width=\"780\" height=\"842\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9bc\/635\/bf7\/9bc635bf7b293ec517b2577653c615ca.png\"\/><figcaption><\/figcaption><\/figure>\n<h3>\u041e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0418\u0442\u0430\u043a, \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 C++, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0432 \u043a\u0430\u043a\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441. \u041e\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <a href=\"https:\/\/timsong-cpp.github.io\/cppwp\/n4861\/basic.scope.pdecl#7\">[basic.scope.pdecl] p7<\/a>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"cpp\">class Foo;<\/code><\/pre>\n<p>\u0442\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f. <a href=\"https:\/\/godbolt.org\/z\/KqoWvxod6\">\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440<\/a>:<\/p>\n<pre><code class=\"cpp\">struct Foo; \/\/ declaration of class '::Foo'  \/\/ definition of previously-declared class '::Foo' struct Foo {   struct Bar; \/\/ declaration of class '::Foo::Bar' };  \/\/ definition of previously-declared class '::Foo::Bar' struct Foo::Bar { };  namespace Baz {   struct Qux; \/\/ declaration of class '::Baz::Qux' }  \/\/ definition of previously-declared class '::Baz::Qux' struct Baz::Qux { };<\/code><\/pre>\n<p>\u0418\u043d\u0430\u0447\u0435, \u0435\u0441\u043b\u0438 \u043a\u043b\u0430\u0441\u0441 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0438\u043b\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0442\u043e \u043a\u043b\u0430\u0441\u0441 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 <em>namespace<\/em>, \u0433\u0434\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f. <a href=\"https:\/\/godbolt.org\/z\/TxMW38Gzr\">\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440<\/a>:<\/p>\n<pre><code class=\"cpp\">void func(class Foo *p); \/\/ declaration of class '::Foo'  struct Bar {   struct Baz *funcReturningClassPtr(); \/\/ declaration of class '::Baz' };  namespace Qux {   struct Quux *anotherFunction(); \/\/ declaration of class '::Qux::Quux' }  \/\/ definition of previously-declared class '::Baz' struct Baz {};  \/\/ definition of previously-declared class '::Qux::Quux' struct ::Qux::Quux {};<\/code><\/pre>\n<p>\u0418\u043d\u0430\u0447\u0435 \u043a\u043b\u0430\u0441\u0441 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c \u0431\u043b\u043e\u043a\u0435 \u0438\u043b\u0438 <em>namespace<\/em>. <a href=\"https:\/\/godbolt.org\/z\/EYG4MYavW\">\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440<\/a>:<\/p>\n<pre><code class=\"cpp\">struct Foo {   class Bar *baz; \/\/ declaration of class '::Bar' };  void func() {   struct Baz *ptr; \/\/ declares local class 'Baz'   struct Baz {}; \/\/ definition of previously-declared class 'Baz' }  namespace Qux {   struct Baz   {     struct Quux *ptr; \/\/ declares class '::Qux::Quux'   }; }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u2013 friend-\u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438. \u041e\u043d\u0438 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0435 \u0432\u043d\u0435\u0434\u0440\u044f\u044e\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043d\u043e\u0432\u044b\u0445 \u0438\u043c\u0451\u043d.<\/p>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 (\u0441\u043c. \u0441\u0441\u044b\u043b\u043a\u0443 \u0432\u044b\u0448\u0435).<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0443\u043d\u043a\u0442. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0442\u043e\u0438\u0442 \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c <em>class TDStretch;<\/em> \u0432 \u043a\u043b\u0430\u0441\u0441 <em>SoundTouch<\/em>, \u0442\u043e \u043a\u043e\u0434 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<h3>Lookup<\/h3>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u0443\u043d\u043a\u0442. \u041d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f <em>class Foo;<\/em> \u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441. \u041e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0443\u0436\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043f\u0440\u0438\u0447\u0451\u043c \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0414\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0440\u0435\u0433\u043b\u0430\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <a href=\"https:\/\/timsong-cpp.github.io\/cppwp\/n4861\/basic.lookup.elab\">[basic.lookup.elab]<\/a> \u043f\u043e\u0434 \u043f\u0443\u043d\u043a\u0442\u043e\u043c 2:<\/p>\n<blockquote>\n<p>If the elaborated-type-specifier has no nested-name-specifier, and unless the elaborated-type-specifier appears in a declaration with the following form:<\/p>\n<p>class-key attribute-specifier-seqopt identifier ;<\/p>\n<p>the identifier is looked up according to [basic.lookup.unqual] but ignoring any non-type names that have been declared.<\/p>\n<p>If the elaborated-type-specifier is introduced by the enum keyword and this lookup does not find a previously declared type-name, the elaborated-type-specifier is ill-formed.<\/p>\n<p>If the elaborated-type-specifier is introduced by the class-key and this lookup does not find a previously declared type-name, or if the elaborated-type-specifier appears in a declaration with the form:<\/p>\n<p>class-key attribute-specifier-seqopt identifier ;<\/p>\n<p>the elaborated-type-specifier is a declaration that introduces the class-name as described in [basic.scope.pdecl].<\/p>\n<\/blockquote>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e, \u043e\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/language\/unqualified_lookup\">unqualified lookup<\/a> \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438. \u0415\u0441\u043b\u0438 \u0438\u043c\u044f \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e, \u0442\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0439 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>\u0418\u043d\u0430\u0447\u0435, \u0435\u0441\u043b\u0438 \u0438\u043c\u044f \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0435 \u0431\u044b\u043b\u043e, \u043e\u043d\u043e \u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"cpp\">struct Foo {   class Bar *ptr; \/\/ declaration of class '::Bar' };  namespace Baz {   class Bar *anotherPtr; \/\/ uses previously-declared class '::Bar' }<\/code><\/pre>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0438 \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0443\u044e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u044f\u0437\u044b\u043a\u0430. \u041d\u0430\u0434\u0435\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u043e\u043d\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0438 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u0432 \u0447\u0442\u0435\u043d\u0438\u0438 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u043e\u0434\u0430. \u0410 \u0442\u0435, \u043a\u0442\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u043b, \u0447\u0442\u043e \u043a\u043e\u0434 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u2013 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0435\u0431\u044f \u0433\u0443\u0440\u0443 C++!<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u044f\u0437\u044b\u043a\u0430 C++, \u0442\u043e \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u0432 \u043d\u0430\u0448 \u0431\u043b\u043e\u0433. \u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0442\u0430\u0442\u0435\u0439:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/cpp\/0909\/\">\u0414\u0438\u0437\u0430\u0439\u043d \u0438 \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u044f constexpr \u0432 C++<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/cpp\/0891\/\">\u0412\u044b\u0437\u043e\u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430\u0445 \u0438 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430\u0445 (C++)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/cpp\/0973\/\">\u041f\u043e\u0447\u0435\u043c\u0443 \u0432 \u0421++ \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u043d\u0443\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 delete[]<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/cpp\/0998\/\">\u0415\u0441\u0442\u044c \u043b\u0438 \u0436\u0438\u0437\u043d\u044c \u0431\u0435\u0437 RTTI: \u043f\u0438\u0448\u0435\u043c \u0441\u0432\u043e\u0439 dynamic_cast<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Sergey Larin. <a href=\"https:\/\/pvs-studio.com\/en\/blog\/posts\/cpp\/1031\/\">C++ subtleties: so, you&#8217;ve declared a class&#8230;<\/a>.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/715436\/\"> https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/715436\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0448\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u044f\u0437\u044b\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u0440\u044f\u0434\u043e\u0432\u043e\u043c\u0443 C++ \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u043e\u0431\u044b\u0434\u0435\u043d\u043d\u0430\u044f \u0432\u0435\u0449\u044c \u2013 forward-\u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u0432\u0435\u0442\u044c\u0442\u0435 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441: \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434?<\/p>\n<pre><code class=\"cpp\">namespace soundtouch {     class SoundTouch     {     public:         class TDStretch *pTDStretch;     };      class TDStretch     {     public:         void *getInput() { return nullptr; }     }; }  auto bbb = soundtouch::TDStretch {};  int main(int argc, char** argv) {     soundtouch::SoundTouch st;     st.pTDStretch = &amp;bbb;     return !!st.pTDStretch->getInput(); }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0441\u043c\u0443\u0442\u0438\u043b\u0430 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f <em>pTDStretch<\/em>, \u0442\u043e \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e \u2013 \u043e\u043d\u0430 \u0441\u043c\u0443\u0442\u0438\u043b\u0430 \u0438 \u043c\u0435\u043d\u044f. \u041d\u043e \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0438, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u0435\u0439 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u043e\u0442\u044b\u0441\u043a\u0430\u043b\u0438 \u0441\u0435\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 (\u0432 \u043d\u0435\u0441\u043e\u043a\u0440\u0430\u0449\u0451\u043d\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435) \u043c\u044b \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043b\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/cpp\/0992\/\">\u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0442\u0438\u043f\u043e\u0432<\/a> \u0432 PVS-Studio. \u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 &#171;\u0434\u0438\u0444\u0444&#187; \u2013 \u044d\u0442\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u0432 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043f\u0440\u0438 \u043f\u0440\u043e\u0433\u043e\u043d\u0435 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435:<\/p>\n<p>V547 Expression &#8216;psp&#8217; is always true. &#8212; MISSING IN CURRENT SoundTouch.cpp 493<\/p>\n<pre><code class=\"cpp\">class SoundTouch : public FIFOProcessor { private:     \/\/\/ Time-stretch class instance     class TDStretch *pTDStretch; };  \/\/\/ Class that does the time-stretch (tempo change) effect for the processed \/\/\/ sound. class TDStretch : public FIFOProcessor { public:     \/\/\/ Returns the input buffer object     FIFOSamplePipe *getInput() { return &amp;inputBuffer; }; };  \/\/\/ Returns number of samples currently unprocessed. uint SoundTouch::numUnprocessedSamples() const {     FIFOSamplePipe * psp;     if (pTDStretch)     {         psp = pTDStretch->getInput();         if (psp)                     \/\/ &lt;=         {             return psp->numSamples();         }     }     return 0; }<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>getInput<\/em> \u0441 \u0435\u0451 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0435\u0439. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 <em>TDStretch<\/em>. \u0418 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u2013 \u043f\u0440\u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435 \u043a\u043e\u0434\u0430 \u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0439\u0442\u0438! \u041d\u043e \u043e\u0442\u043a\u0443\u0434\u0430 \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0438 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044e \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0430\u043d\u044c\u0448\u0435, \u0434\u043e \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u043e\u043a? \u0418 \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0438 \u0435\u0451 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0435? \u0414\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c, \u044d\u0442\u043e \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430, \u0438 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u0423\u043f\u0440\u043e\u0449\u0430\u044e \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f <a href=\"https:\/\/godbolt.org\/z\/c74E1Y696\">Compiler Explorer<\/a> \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e \u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c&#8230; \u0421\u0442\u043e\u043f, \u0447\u0442\u043e?!? \u041e\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f?!? \u041d\u043e \u043f\u043e\u0447\u0435\u043c\u0443? \u0421\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e \u043e\u0431 \u044d\u0442\u043e\u043c \u0442\u0438\u043c\u043b\u0438\u0434\u0430 \u2013 \u043e\u043d \u0442\u043e\u0436\u0435 \u0432 \u043d\u0435\u0434\u043e\u0443\u043c\u0435\u043d\u0438\u0438. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0434\u0442\u0438 \u0438 \u0440\u0430\u0441\u043a\u0430\u043f\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u044b\u0445 \u0440\u0430\u0441\u043a\u043e\u043f\u043e\u043a \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0436\u0435 \u043b\u0435\u0436\u0438\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0443\u043d\u0434\u0443\u043a\u0430&#8230;<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>\u041e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0418\u0442\u0430\u043a, \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 C++, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0432 \u043a\u0430\u043a\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u043a\u043b\u0430\u0441\u0441. \u041e\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <a href=\"https:\/\/timsong-cpp.github.io\/cppwp\/n4861\/basic.scope.pdecl#7\">[basic.scope.pdecl] p7<\/a>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"cpp\">class Foo;<\/code><\/pre>\n<p>\u0442\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f. <a href=\"https:\/\/godbolt.org\/z\/KqoWvxod6\">\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440<\/a>:<\/p>\n<pre><code class=\"cpp\">struct Foo; \/\/ declaration of class '::Foo'  \/\/ definition of previously-declared class '::Foo' struct Foo {   struct Bar; \/\/ declaration of class '::Foo::Bar' };  \/\/ definition of previously-declared class '::Foo::Bar' struct Foo::Bar { };  namespace Baz {   struct Qux; \/\/ declaration of class '::Baz::Qux' }  \/\/ definition of previously-declared class '::Baz::Qux' struct Baz::Qux { };<\/code><\/pre>\n<p>\u0418\u043d\u0430\u0447\u0435, \u0435\u0441\u043b\u0438 \u043a\u043b\u0430\u0441\u0441 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0438\u043b\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0442\u043e \u043a\u043b\u0430\u0441\u0441 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 <em>namespace<\/em>, \u0433\u0434\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f. <a href=\"https:\/\/godbolt.org\/z\/TxMW38Gzr\">\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440<\/a>:<\/p>\n<pre><code class=\"cpp\">void func(class Foo *p); \/\/ declaration of class '::Foo'  struct Bar {   struct Baz *funcReturningClassPtr(); \/\/ declaration of class '::Baz' };  namespace Qux {   struct Quux *anotherFunction(); \/\/ declaration of class '::Qux::Quux' }  \/\/ definition of previously-declared class '::Baz' struct Baz {};  \/\/ definition of previously-declared class '::Qux::Quux' struct ::Qux::Quux {};<\/code><\/pre>\n<p>\u0418\u043d\u0430\u0447\u0435 \u043a\u043b\u0430\u0441\u0441 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c \u0431\u043b\u043e\u043a\u0435 \u0438\u043b\u0438 <em>namespace<\/em>. <a href=\"https:\/\/godbolt.org\/z\/EYG4MYavW\">\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440<\/a>:<\/p>\n<pre><code class=\"cpp\">struct Foo {   class Bar *baz; \/\/ declaration of class '::Bar' };  void func() {   struct Baz *ptr; \/\/ declares local class 'Baz'   struct Baz {}; \/\/ definition of previously-declared class 'Baz' }  namespace Qux {   struct Baz   {     struct Quux *ptr; \/\/ declares class '::Qux::Quux'   }; }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u2013 friend-\u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438. \u041e\u043d\u0438 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0435 \u0432\u043d\u0435\u0434\u0440\u044f\u044e\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043d\u043e\u0432\u044b\u0445 \u0438\u043c\u0451\u043d.<\/p>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 (\u0441\u043c. \u0441\u0441\u044b\u043b\u043a\u0443 \u0432\u044b\u0448\u0435).<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0443\u043d\u043a\u0442. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0442\u043e\u0438\u0442 \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c <em>class TDStretch;<\/em> \u0432 \u043a\u043b\u0430\u0441\u0441 <em>SoundTouch<\/em>, \u0442\u043e \u043a\u043e\u0434 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<h3>Lookup<\/h3>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u0443\u043d\u043a\u0442. \u041d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f <em>class Foo;<\/em> \u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441. \u041e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0443\u0436\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043f\u0440\u0438\u0447\u0451\u043c \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0414\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0440\u0435\u0433\u043b\u0430\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <a href=\"https:\/\/timsong-cpp.github.io\/cppwp\/n4861\/basic.lookup.elab\">[basic.lookup.elab]<\/a> \u043f\u043e\u0434 \u043f\u0443\u043d\u043a\u0442\u043e\u043c 2:<\/p>\n<blockquote>\n<p>If the elaborated-type-specifier has no nested-name-specifier, and unless the elaborated-type-specifier appears in a declaration with the following form:<\/p>\n<p>class-key attribute-specifier-seqopt identifier ;<\/p>\n<p>the identifier is looked up according to [basic.lookup.unqual] but ignoring any non-type names that have been declared.<\/p>\n<p>If the elaborated-type-specifier is introduced by the enum keyword and this lookup does not find a previously declared type-name, the elaborated-type-specifier is ill-formed.<\/p>\n<p>If the elaborated-type-specifier is introduced by the class-key and this lookup does not find a previously declared type-name, or if the elaborated-type-specifier appears in a declaration with the form:<\/p>\n<p>class-key attribute-specifier-seqopt identifier ;<\/p>\n<p>the elaborated-type-specifier is a declaration that introduces the class-name as described in [basic.scope.pdecl].<\/p>\n<\/blockquote>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e, \u043e\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/language\/unqualified_lookup\">unqualified lookup<\/a> \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438. \u0415\u0441\u043b\u0438 \u0438\u043c\u044f \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e, \u0442\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0439 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>\u0418\u043d\u0430\u0447\u0435, \u0435\u0441\u043b\u0438 \u0438\u043c\u044f \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0435 \u0431\u044b\u043b\u043e, \u043e\u043d\u043e \u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"cpp\">struct Foo {   class Bar *ptr; \/\/ declaration of class '::Bar' };  namespace Baz {   class Bar *anotherPtr; \/\/ uses previously-declared class '::Bar' }<\/code><\/pre>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0438 \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0443\u044e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u044f\u0437\u044b\u043a\u0430. \u041d\u0430\u0434\u0435\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u043e\u043d\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0438 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u0432 \u0447\u0442\u0435\u043d\u0438\u0438 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u043e\u0434\u0430. \u0410 \u0442\u0435, \u043a\u0442\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u043b, \u0447\u0442\u043e \u043a\u043e\u0434 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u2013 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0435\u0431\u044f \u0433\u0443\u0440\u0443 C++!<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u044f\u0437\u044b\u043a\u0430 C++, \u0442\u043e \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u0432 \u043d\u0430\u0448 \u0431\u043b\u043e\u0433. \u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0442\u0430\u0442\u0435\u0439:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/cpp\/0909\/\">\u0414\u0438\u0437\u0430\u0439\u043d \u0438 \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u044f constexpr \u0432 C++<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/cpp\/0891\/\">\u0412\u044b\u0437\u043e\u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430\u0445 \u0438 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430\u0445 (C++)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/cpp\/0973\/\">\u041f\u043e\u0447\u0435\u043c\u0443 \u0432 \u0421++ \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u043d\u0443\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 delete[]<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/cpp\/0998\/\">\u0415\u0441\u0442\u044c \u043b\u0438 \u0436\u0438\u0437\u043d\u044c \u0431\u0435\u0437 RTTI: \u043f\u0438\u0448\u0435\u043c \u0441\u0432\u043e\u0439 dynamic_cast<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Sergey Larin. <a href=\"https:\/\/pvs-studio.com\/en\/blog\/posts\/cpp\/1031\/\">C++ subtleties: so, you&#8217;ve declared a class&#8230;<\/a>.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/715436\/\"> https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/715436\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-345075","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/345075","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=345075"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/345075\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=345075"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=345075"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=345075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}