Commit eafb3fbc authored by Kenton Varda's avatar Kenton Varda

Delete default constructor in namespace classes.

parent 00616e70
...@@ -32,11 +32,13 @@ ...@@ -32,11 +32,13 @@
namespace capnproto { namespace capnproto {
struct Data { struct Data {
Data() = delete;
class Reader; class Reader;
class Builder; class Builder;
}; };
struct Text { struct Text {
Text() = delete;
class Reader; class Reader;
class Builder; class Builder;
}; };
......
...@@ -45,6 +45,8 @@ class MessageReader; ...@@ -45,6 +45,8 @@ class MessageReader;
class MessageBuilder; class MessageBuilder;
struct DynamicValue { struct DynamicValue {
DynamicValue() = delete;
enum Type { enum Type {
UNKNOWN, UNKNOWN,
// Means that the value has unknown type and content because it comes from a newer version of // Means that the value has unknown type and content because it comes from a newer version of
...@@ -72,14 +74,17 @@ struct DynamicValue { ...@@ -72,14 +74,17 @@ struct DynamicValue {
class DynamicEnum; class DynamicEnum;
class DynamicObject; class DynamicObject;
struct DynamicUnion { struct DynamicUnion {
DynamicUnion() = delete;
class Reader; class Reader;
class Builder; class Builder;
}; };
struct DynamicStruct { struct DynamicStruct {
DynamicStruct() = delete;
class Reader; class Reader;
class Builder; class Builder;
}; };
struct DynamicList { struct DynamicList {
DynamicList() = delete;
class Reader; class Reader;
class Builder; class Builder;
}; };
......
...@@ -181,6 +181,8 @@ template <typename T> ...@@ -181,6 +181,8 @@ template <typename T>
struct List<T, Kind::PRIMITIVE> { struct List<T, Kind::PRIMITIVE> {
// List of primitives. // List of primitives.
List() = delete;
class Reader { class Reader {
public: public:
typedef List<T> Reads; typedef List<T> Reads;
...@@ -278,6 +280,8 @@ template <typename T> ...@@ -278,6 +280,8 @@ template <typename T>
struct List<T, Kind::STRUCT> { struct List<T, Kind::STRUCT> {
// List of structs. // List of structs.
List() = delete;
class Reader { class Reader {
public: public:
typedef List<T> Reads; typedef List<T> Reads;
...@@ -368,6 +372,8 @@ template <typename T> ...@@ -368,6 +372,8 @@ template <typename T>
struct List<List<T>, Kind::LIST> { struct List<List<T>, Kind::LIST> {
// List of lists. // List of lists.
List() = delete;
class Reader { class Reader {
public: public:
typedef List<List<T>> Reads; typedef List<List<T>> Reads;
...@@ -464,6 +470,8 @@ private: ...@@ -464,6 +470,8 @@ private:
template <typename T> template <typename T>
struct List<T, Kind::BLOB> { struct List<T, Kind::BLOB> {
List() = delete;
class Reader { class Reader {
public: public:
typedef List<T> Reads; typedef List<T> Reads;
......
...@@ -46,6 +46,8 @@ namespace {{namespaceName}} { ...@@ -46,6 +46,8 @@ namespace {{namespaceName}} {
{{#typeStructOrUnion}} {{#typeStructOrUnion}}
struct {{typeFullName}} { struct {{typeFullName}} {
{{typeName}}() = delete;
class Reader; class Reader;
class Builder; class Builder;
{{#typeStruct}} {{#typeStruct}}
......
Markdown is supported
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