diff --git a/src/gtests_functions.cpp b/src/gtests_functions.cpp index b31f0f989f..3c001e8e93 100644 --- a/src/gtests_functions.cpp +++ b/src/gtests_functions.cpp @@ -1195,5 +1195,14 @@ TEST ( functions, sphSplit ) ASSERT_STREQ ( dParts[1].cstr (), "a" ); } +// as we found g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28) works strange with curly initializer of refs +TEST ( functions, curledref ) +{ + CSphString sProof="abc"; + const CSphString &sTest { sProof }; + const CSphString &sTestc ( sProof ); + ASSERT_TRUE ( &sProof==&sTestc ) << "curly brackets"; + ASSERT_TRUE ( &sProof==&sTest ) << "figured brackets"; +} diff --git a/src/searchdhttp.cpp b/src/searchdhttp.cpp index 9156449e05..087c2c4f63 100644 --- a/src/searchdhttp.cpp +++ b/src/searchdhttp.cpp @@ -690,7 +690,7 @@ class HttpHandler_c { public: HttpHandler_c ( const CSphString & sQuery, int iCID, bool bNeedHttpResponse ) - : m_sQuery { sQuery } + : m_sQuery ( sQuery ) , m_iCID ( iCID ) , m_bNeedHttpResponse ( bNeedHttpResponse ) {}