Skip to content

Commit

Permalink
Mark unspecialized versions of CGXDefault as deleted
Browse files Browse the repository at this point in the history
Before, writing e.g. `CGXDefault<int>();` would compile successfully (with a warning), but would fail on linking.  Now, it fails when compiling.
  • Loading branch information
Pokechu22 committed Apr 23, 2022
1 parent f1f2782 commit 53c1707
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gxtest/cgx_defaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
#include "gxtest/XFMemory.h"

template <typename T>
static T CGXDefault();
static T CGXDefault() = delete;

template <typename T>
static T CGXDefault(int);
static T CGXDefault(int) = delete;

template <typename T>
static T CGXDefault(int, bool);
static T CGXDefault(int, bool) = delete;

template <>
GenMode CGXDefault<GenMode>()
Expand Down

0 comments on commit 53c1707

Please sign in to comment.