amos at ilogix dot com
2004-06-16 12:09:43 UTC
The warning "`class X' only defines private constructors and has no friends"
is redundant when using a typical singleton pattern implementation yet there
is no way to turn it off.
In a project with few singletons it cause redundant "noise" in the compiler
output.
example:
--------
class X
{
public:
// get X singleton instance
static X* instance();
private:
// prevent direct initialization
X();
};
--
Summary: Redundant warning `class X' only defines private
constructors and has no friends
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: amos at ilogix dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: 3.2
GCC host triplet: Any
GCC target triplet: Any
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16019
is redundant when using a typical singleton pattern implementation yet there
is no way to turn it off.
In a project with few singletons it cause redundant "noise" in the compiler
output.
example:
--------
class X
{
public:
// get X singleton instance
static X* instance();
private:
// prevent direct initialization
X();
};
--
Summary: Redundant warning `class X' only defines private
constructors and has no friends
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: amos at ilogix dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: 3.2
GCC host triplet: Any
GCC target triplet: Any
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16019