File: cpp_ns_template_specialization.h

package info (click to toggle)
breathe 4.36.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,224 kB
  • sloc: python: 12,703; cpp: 1,737; makefile: 523; xml: 168; sh: 54; ansic: 52
file content (15 lines) | stat: -rw-r--r-- 255 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
namespace ns1 {
struct Foo {
  int value;
};
} // namespace ns1

namespace ns2 {
template <class U> struct Trait {
  static constexpr bool valid = false;
};

template <> struct Trait<ns1::Foo> {
  static constexpr bool valid = true;
};
} // namespace ns2