Skip to content
  • Ognian Milanov @ognian.milanov ·

    More elegant solution by Reddit user mocabe_ :

    template <class T, auto = []{}> constexpr bool is_complete_v = requires(T) { sizeof(T); };

  • Ognian Milanov @ognian.milanov ·

    Solution by Reddit user Potatoswatter without default lambda argument:

    template< typename T, bool val = requires(T) { sizeof(T); } > constexpr bool is_complete_v = val;

0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment